The concept SvdTraits describes the set of requirements to be fulfilled by any class used to instantiate the third template parameter of the class Monge_via_jet_fitting<DataKernel,LocalKernel,SvdTraits>.

It describes the linear algebra types and algorithms needed by the class Monge_via_jet_fitting.


The scalar type, SvdTraits::FT, must be the same as that of the LocalKernel concept : LocalKernel::FT.


The scalar type.

The vector type.

The matrix type.


SvdTraits vector ( size_t n);
initialize all the elements of the vector to zero.

The type Vector has the access methods

size_t vector.size ()
FT vector ( size_t i ) return the ith entry, i from 0 to size()-1.
void vector.set ( size_t i, const FT value)
set the ith entry to value.

The type Matrix has the access methods

SvdTraits matrix ( size_t n1, size_t n2);
initialize all the entries of the matrix to zero.

size_t matrix.number_of_rows ()
size_t matrix.number_of_columns ()
FT matrix ( size_t i , size_t j ) return the entry at row i and column j, i from 0 to number_of_rows - 1, j from 0 to number_of_columns - 1.
void matrix.set ( size_t i, size_t j, const FT value)
set the entry at row i and column j to value.

The concept SvdTraits has a linear solver using a singular value decomposition algorithm.

FT traits.solve ( Matrix& M, Vector& B)
Solves the system MX=B (in the least square sense if M is not square) using a singular value decomposition and returns the condition number of M. The solution is stored in B.

Has Models


See Also