13 #if !defined(KRATOS_DENSE_SVD_H_INCLUDED)
14 #define KRATOS_DENSE_SVD_H_INCLUDED
43 template<
class TDenseSpaceType>
54 typedef typename TDenseSpaceType::DataType
DataType;
82 return "dense_singular_value_decomposition";
155 virtual std::size_t
Rank() = 0;
162 virtual void PrintInfo(std::ostream &rOStream)
const = 0;
Definition: dense_svd_decomposition.h:45
virtual void PrintInfo(std::ostream &rOStream) const =0
SVD information Outputs the SVD class information.
virtual void Compute(MatrixType &rInputMatrix, VectorType &rVectorS, MatrixType &rMatrixU, MatrixType &rMatrixV, Parameters Settings)=0
Compute the SVD Computes the Singular Value Decomposition (SVD) of the given input matrix.
virtual ~DenseSingularValueDecomposition()=default
TDenseSpaceType::VectorType VectorType
Definition: dense_svd_decomposition.h:55
virtual void SetThreshold(const double RelTolerance)=0
Set the relative threshold tolerance This method sets the relative threshold tolerance to consider si...
virtual void SingularValues(VectorType &rVectorS)=0
Singular values vector getter This method sets the singular values vector in the provided array.
static std::string Name()
Name of the SVD Returns a string containing the name of the current SVD decomposition.
Definition: dense_svd_decomposition.h:80
DenseSingularValueDecomposition()=default
virtual std::size_t NonZeroSingularValues()=0
Number of non-zero singular values This method returns the number of non-zero singular values.
TDenseSpaceType::MatrixType MatrixType
Definition: dense_svd_decomposition.h:56
virtual std::size_t Rank()=0
Rank of the provided array Calculates and returns the rank of the array decomposed with the SVD.
TDenseSpaceType::DataType DataType
Definition: dense_svd_decomposition.h:54
virtual void MatrixU(MatrixType &rMatrixU)=0
Left singular vectors matrix getter If computed, this method sets the left singular vectors matrix in...
virtual void MatrixV(MatrixType &rMatrixV)=0
Right singular vectors matrix getter If computed, this method sets the right singular vectors matrix ...
KRATOS_CLASS_POINTER_DEFINITION(DenseSingularValueDecomposition)
Definition of the shared pointer of the class.
virtual void Compute(MatrixType &rInputMatrix, Parameters Settings)=0
Compute the SVD Computes the Singular Value Decomposition (SVD) of the given imput matrix.
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21