37#ifndef STK_GRAMSCHMIDT_H
38#define STK_GRAMSCHMIDT_H
51template <
class TContainer2D>
55 for (
int j= A.beginCols(); j< A.endCols(); j++)
57 for(
int i= A.beginCols(); i < j; i++)
59 const Real dotij =
dot(A.asDerived().
col(i), A.asDerived().
col(j));
60 A.asDerived().
col(j) -= A.asDerived().
col(i) * dotij;
In this file we define the base class for Arrays.
base class for template arrays.
ColOperator< Derived > const col(int j) const
void gramSchmidt(ArrayBase< TContainer2D > &A)
The gramSchmidt method perform the Gram Schmidt orthonormalization of an Array of Real.
Real dot(ExprBase< Container1D1 > const &x, ExprBase< Container1D2 > const &y)
Compute the dot product.
Real norm(Real const &x, Real const &y)
Computation of sqrt(x^2 + y^2) without underflow or overflow.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.