G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsCurveFitting< T > Class Template Reference

Detailed Description

template<class T>
class gismo::gsCurveFitting< T >

Class for performing a least squares fit to get a open/closed B-Spline curve for some given data.

+ Collaboration diagram for gsCurveFitting< T >:

Public Member Functions

void compute ()
 computes the least squares fit for a (closed) B-spline curve
 
void computeApproxError (T &error)
 computes the approximation error of the fitted curve to the original point cloud
 
const gsBSpline< T > & curve () const
 gives back the computed B-spline curve
 
 gsCurveFitting ()
 default constructor
 
 gsCurveFitting (gsMatrix< T > const &param_values, gsMatrix< T > const &points, gsKnotVector< T > const &knots, const bool &closed=false)
 constructor
 
gsKnotVector< T > returnKnotVector () const
 returns the knot vector
 
gsMatrix< T > returnParamValues () const
 returns the parameter values
 
gsMatrix< T > returnPoints () const
 returns the points
 
void setClosedCurve (bool closed)
 set m_closed to true/or false since we want to have a closed/open curve
 
 ~gsCurveFitting ()
 Destructor.
 

Protected Attributes

bool m_closed
 closed or not closed curve
 
gsBSpline< T > m_curve
 pointer to a B-spline curve
 
gsKnotVector< T > m_knots
 the knot vector of the desired B-spline curve
 
gsMatrix< T > m_param_values
 the parameter values of the point cloud
 
gsMatrix< T > m_points
 the points of the point cloud