File LooseEndsPenalizedLeastSquaresGenerator.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
namespace BSplines
class LooseEndsPenalizedLeastSquaresGenerator : public Scine::Utils::BSplines::Generator
#include <LooseEndsPenalizedLeastSquaresGenerator.h>

Generates a B-Spline curve with a specified number of control points approximating the dat a points with loose ends. „Loose ends” means that the first and last control points do not need to coincide with the first and last data point of the set. Thus, all n+1 control points are optimized. Still, the resulting B-Spline curve passes through the first and last control point since the first and last basis functions are equal to unity at the ends of the domain (N(u=0)=1, N(u=1)=1, therefore C(u=0)=P0 and C(u=1)=Plast). Penalization can be turned on by specifying a lambda value > 0 and difference orders can be specified by kappa.

Public Functions

LooseEndsPenalizedLeastSquaresGenerator(const Eigen::Ref<const Eigen::MatrixXd> &dataPoints, int numberOfControlPoints, int splineDegree = 3, bool uniformKnotVector = false, double lambda = 0, int kappa = 2)

Private Functions

Eigen::VectorXd generateKnotVector()
Eigen::MatrixXd generateControlPoints()

Private Members

bool uniformKnotVector_
double lambda_
int kappa_