51 gsMappedBasis<2,T> & mbasis) ;
61 void parameterCorrection(T accuracy = 1e-8,
75 void get_Error(std::vector<T>& errors,
int type = 0)
const;
93 std::count_if(m_pointErrors.begin(), m_pointErrors.end(),
94 GS_BIND2ND(std::less<T>(), threshold));
99 void iterativeCompute( T
const & tolerance,
unsigned const & num_iters = 10);
185 std::vector<T> m_pointErrors;
187 mutable T m_last_lambda;
213 #ifdef GISMO_WITH_PYBIND11
218 void pybind11_init_gsFitting(pybind11::module &m);
220 #endif // GISMO_WITH_PYBIND11
226 #ifndef GISMO_BUILD_LIB
227 #include GISMO_HPP_HEADER(gsFitting.hpp)
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
void computeApproxError(T &error, int type=0) const
Computes the approximation error of the fitted curve to the original point cloud. ...
Definition: gsFitting.hpp:434
void setConstraints(const gsSparseMatrix< T > &lhs, const gsMatrix< T > &rhs)
Definition: gsFitting.h:133
virtual ~gsFitting()
Destructor.
Definition: gsFitting.hpp:28
size_t numPointsBelow(T threshold) const
Computes the number of points below the error threshold (or zero if not fitted)
Definition: gsFitting.h:90
void applySmoothing(T lambda, gsSparseMatrix< T > &A_mat)
Definition: gsFitting.hpp:299
gsMatrix< T > m_points
the points of the point cloud
Definition: gsFitting.h:170
void computeMaxNormErrors()
Computes the maximum norm error for each point.
Definition: gsFitting.hpp:413
const gsBasis< T > & getBasis() const
Returns the basis of the approximation.
Definition: gsFitting.h:118
void computeErrors()
Computes the euclidean error for each point.
Definition: gsFitting.hpp:388
T minPointError() const
Returns the minimum point-wise error from the pount cloud (or zero if not fitted) ...
Definition: gsFitting.h:78
#define index_t
Definition: gsConfig.h:32
A B-spline function of one argument, with arbitrary target dimension.
Definition: gsBSpline.h:50
gsSparseMatrix< T > m_constraintsLHS
Definition: gsFitting.h:199
void get_Error(std::vector< T > &errors, int type=0) const
return the errors for each point
Definition: gsFitting.hpp:475
void iterativeCompute(T const &tolerance, unsigned const &num_iters=10)
Computes the least squares fit for a gsBasis.
void assembleSystem(gsSparseMatrix< T > &A_mat, gsMatrix< T > &B)
Assembles system for the least square fit.
Definition: gsFitting.hpp:220
Class for performing a least squares fit of a parametrized point cloud with a gsGeometry.
Definition: gsFitting.h:32
gsMatrix< T > m_constraintsRHS
Definition: gsFitting.h:205
gsMatrix< T > & getreturnParamValues()
returns the parameter values
Definition: gsFitting.h:123
Provides declaration of Basis abstract interface.
gsFitting()
default constructor
Definition: gsFitting.h:36
const std::vector< T > & pointWiseErrors() const
Return the errors for each point.
Definition: gsFitting.h:84
T maxPointError() const
Returns the maximum point-wise error from the pount cloud (or zero if not fitted) ...
Definition: gsFitting.h:81
gsGeometry< T > * result() const
gives back the computed approximation
Definition: gsFitting.h:112
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
Provides forward declarations of types and structs.
Provides declaration of Basis abstract interface.
gsFunctionSet< T > * m_basis
Pointer keeping the basis.
Definition: gsFitting.h:176
gsMatrix< T > returnPoints() const
returns the points
Definition: gsFitting.h:127
gsMatrix< T > m_param_values
the parameter values of the point cloud
Definition: gsFitting.h:167
void extendSystem(gsSparseMatrix< T > &A_mat, gsMatrix< T > &m_B)
Extends the system of equations by taking constraints into account.
Definition: gsFitting.hpp:260
T m_min_error
Minimum point-wise error.
Definition: gsFitting.h:193
const gsMappedSpline< 2, T > & mresult() const
gives back the computed approximation for multipatch geometry
Definition: gsFitting.h:115
gsMappedSpline< 2, T > m_mresult
Pointer keeping the resulting multipatch geometry.
Definition: gsFitting.h:182
gsGeometry< T > * m_result
Pointer keeping the resulting geometry.
Definition: gsFitting.h:179
T m_max_error
Maximum point-wise error.
Definition: gsFitting.h:190
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
void compute(T lambda=0)
Computes the least squares fit for a gsBasis.
Definition: gsFitting.hpp:68