31 #pragma warning(disable : 4365) // unsigned/signed 32 #pragma warning(disable : 5031) // pragma warning mismatch 33 #pragma warning(disable : 4820) // padding 34 #pragma warning(disable : 4626) // assignment operator deleted 35 #pragma warning(disable : 5027) // move assignment operator deleted 48 explicit fgt_error(
const std::string what_arg)
49 : std::runtime_error(what_arg) {}
59 :
fgt_error(
"IFGT decided that it didn't need any clusters. These " 60 "parameters cannot be used for IFGT, try another method " 65 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
87 Vector
direct(
const MatrixRef source,
const MatrixRef target,
double bandwidth);
90 Vector
direct(
const MatrixRef source,
const MatrixRef target,
double bandwidth,
91 const VectorRef weights);
94 Vector
direct_tree(
const MatrixRef source,
const MatrixRef target,
95 double bandwidth,
double epsilon);
98 Vector
direct_tree(
const MatrixRef source,
const MatrixRef target,
99 double bandwidth,
double epsilon,
const VectorRef weights);
102 Vector
ifgt(
const MatrixRef source,
const MatrixRef target,
double bandwidth,
106 Vector
ifgt(
const MatrixRef source,
const MatrixRef target,
double bandwidth,
107 double epsilon,
const VectorRef weights);
118 Transform(
const MatrixRef source,
double bandwidth);
131 const MatrixRef
source()
const {
return m_source; }
136 Vector compute(
const MatrixRef target);
138 Vector compute(
const MatrixRef target,
const VectorRef weights);
141 virtual Vector compute_impl(
const MatrixRef target,
142 const VectorRef weights)
const = 0;
152 Direct(
const MatrixRef source,
double bandwidth);
162 virtual Vector compute_impl(
const MatrixRef target,
163 const VectorRef weights)
const;
173 DirectTree(
const MatrixRef source,
double bandwidth,
double epsilon);
191 struct NanoflannTree;
193 virtual Vector compute_impl(
const MatrixRef target,
194 const VectorRef weights)
const;
197 std::unique_ptr<NanoflannTree> m_tree;
210 Ifgt(
const MatrixRef source,
double bandwidth,
double epsilon);
215 Ifgt& operator=(
const Ifgt&) =
delete;
234 virtual Vector compute_impl(
const MatrixRef target,
235 const VectorRef weights)
const;
236 Vector compute_monomials(
const VectorRef d)
const;
237 Vector compute_constant_series()
const;
240 Matrix::Index m_nclusters;
241 std::unique_ptr<Clustering> m_clustering;
242 Matrix::Index m_truncation_number;
243 Matrix::Index m_p_max_total;
244 Vector m_constant_series;
bool with_openmp()
Returns true if the library was compiled with OpenMP support.
fgt exceptions.
Definition: fgt.hpp:46
Matrix::Index truncation_number() const
Returns the truncation number.
Definition: fgt.hpp:229
Thrown when an IFGT run asks for no clusters.
Definition: fgt.hpp:56
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Convenience typedef for our type of matrix.
Definition: fgt.hpp:66
Top-level namespace for all things fgt.
Definition: fgt.hpp:43
Improved Fast Gauss Transform.
Definition: fgt.hpp:204
Direct Gauss transform.
Definition: fgt.hpp:149
double epsilon() const
Returns the error tolerance value.
Definition: fgt.hpp:225
Vector direct(const MatrixRef source, const MatrixRef target, double bandwidth)
Computes the direct Gauss transform with equal weights.
const char * version()
Returns the version of the fgt library as a string.
Matrix::Index p_max_total() const
Returns the length of each monomial.
Definition: fgt.hpp:231
Eigen::Ref< const Vector > VectorRef
Convenience typedef for a reference to a Vector.
Definition: fgt.hpp:78
Eigen::VectorXd Vector
Convenience typedef for our flavor of Eigen::Vector.
Definition: fgt.hpp:75
Direct Gauss transform using a KD-tree truncation.
Definition: fgt.hpp:167
Eigen::Ref< const Matrix > MatrixRef
Convenience typedef for a reference to our type of Eigen::Matrix.
Definition: fgt.hpp:72
Vector ifgt(const MatrixRef source, const MatrixRef target, double bandwidth, double epsilon)
Computes the Improved Fast Gauss Transform.
double epsilon() const
Returns the error tolerance value.
Definition: fgt.hpp:188
Matrix::Index nclusters() const
Returns the number of clusters.
Definition: fgt.hpp:227
Vector direct_tree(const MatrixRef source, const MatrixRef target, double bandwidth, double epsilon)
Computes the direct Gauss transform using a kd-tree.