Essentia  2.1-beta6-dev
TNT Namespace Reference

Classes

class  Array1D
 
class  Array2D
 
class  Array3D
 
class  Matrix
 
class  Fortran_Array1D
 
class  Fortran_Array2D
 
class  Fortran_Array3D
 
class  i_refvec
 
class  Sparse_Matrix_CompRow
 
class  Stopwatch
 
class  Vector
 

Typedefs

typedef int Subscript
 

Functions

template<class T >
std::ostream & operator<< (std::ostream &s, const Array1D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Array1D< T > &A)
 
template<class T >
Array1D< T > operator+ (const Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > operator- (const Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > operator* (const Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > operator/ (const Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > & operator+= (Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > & operator-= (Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > & operator*= (Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
Array1D< T > & operator/= (Array1D< T > &A, const Array1D< T > &B)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Array2D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Array2D< T > &A)
 
template<class T >
Array2D< T > operator+ (const Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > operator- (const Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > operator* (const Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > operator/ (const Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > & operator+= (Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > & operator-= (Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > & operator*= (Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > & operator/= (Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
Array2D< T > matmult (const Array2D< T > &A, const Array2D< T > &B)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Array3D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Array3D< T > &A)
 
template<class T >
Array3D< T > operator+ (const Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > operator- (const Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > operator* (const Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > operator/ (const Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > & operator+= (Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > & operator-= (Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > & operator*= (Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
Array3D< T > & operator/= (Array3D< T > &A, const Array3D< T > &B)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Matrix< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Matrix< T > &A)
 
template<class T >
Matrix< T > operator+ (const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
Matrix< T > operator- (const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
Matrix< T > mult_element (const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
Matrix< T > transpose (const Matrix< T > &A)
 
template<class T >
Matrix< T > matmult (const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
Matrix< T > operator* (const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
int matmult (Matrix< T > &C, const Matrix< T > &A, const Matrix< T > &B)
 
template<class T >
Vector< T > matmult (const Matrix< T > &A, const Vector< T > &x)
 
template<class T >
Vector< T > operator* (const Matrix< T > &A, const Vector< T > &x)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Fortran_Array1D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Fortran_Array1D< T > &A)
 
template<class T >
Fortran_Array1D< T > operator+ (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > operator- (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > operator* (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > operator/ (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > & operator+= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > & operator-= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > & operator*= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
Fortran_Array1D< T > & operator/= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Fortran_Array2D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Fortran_Array2D< T > &A)
 
template<class T >
Fortran_Array2D< T > operator+ (const Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > operator- (const Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > operator* (const Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > operator/ (const Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > & operator+= (Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > & operator-= (Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > & operator*= (Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
Fortran_Array2D< T > & operator/= (Fortran_Array2D< T > &A, const Fortran_Array2D< T > &B)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Fortran_Array3D< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Fortran_Array3D< T > &A)
 
template<class T >
Fortran_Array3D< T > operator+ (const Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > operator- (const Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > operator* (const Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > operator/ (const Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > & operator+= (Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > & operator-= (Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > & operator*= (Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class T >
Fortran_Array3D< T > & operator/= (Fortran_Array3D< T > &A, const Fortran_Array3D< T > &B)
 
template<class Real >
Real hypot (const Real &a, const Real &b)
 
static double seconds (void)
 
template<class T >
std::ostream & operator<< (std::ostream &s, const Vector< T > &A)
 
template<class T >
std::istream & operator>> (std::istream &s, Vector< T > &A)
 
template<class T >
Vector< T > operator+ (const Vector< T > &A, const Vector< T > &B)
 
template<class T >
Vector< T > operator- (const Vector< T > &A, const Vector< T > &B)
 
template<class T >
Vector< T > operator* (const Vector< T > &A, const Vector< T > &B)
 
template<class T >
dot_prod (const Vector< T > &A, const Vector< T > &B)
 

Typedef Documentation

◆ Subscript

typedef int Subscript

Function Documentation

◆ dot_prod()

T TNT::dot_prod ( const Vector< T > &  A,
const Vector< T > &  B 
)

◆ hypot()

Real TNT::hypot ( const Real &  a,
const Real &  b 
)
Returns
hypotenuse of real (non-complex) scalars a and b by avoiding underflow/overflow using (a * sqrt( 1 + (b/a) * (b/a))), rather than sqrt(a*a + b*b).

Referenced by QR< Real >::QR(), SVD< Real >::SVD(), and Eigenvalue< Real >::tql2().

◆ matmult() [1/4]

Array2D<T> TNT::matmult ( const Array2D< T > &  A,
const Array2D< T > &  B 
)

Matrix Multiply: compute C = A*B, where C[i][j] is the dot-product of row i of A and column j of B.

Parameters
Aan (m x n) array
Ban (n x k) array
Returns
the (m x k) array A*B, or a null array (0x0) if the matrices are non-conformant (i.e. the number of columns of A are different than the number of rows of B.)

References Array2D< T >::dim1(), Array2D< T >::dim2(), and essentia::sum().

Referenced by operator*().

◆ matmult() [2/4]

Matrix<T> TNT::matmult ( const Matrix< T > &  A,
const Matrix< T > &  B 
)
inline

◆ matmult() [3/4]

Vector<T> TNT::matmult ( const Matrix< T > &  A,
const Vector< T > &  x 
)

◆ matmult() [4/4]

int TNT::matmult ( Matrix< T > &  C,
const Matrix< T > &  A,
const Matrix< T > &  B 
)
inline

◆ mult_element()

Matrix<T> TNT::mult_element ( const Matrix< T > &  A,
const Matrix< T > &  B 
)

◆ operator*() [1/9]

Array1D<T> TNT::operator* ( const Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator*() [2/9]

Array2D<T> TNT::operator* ( const Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator*() [3/9]

Array3D<T> TNT::operator* ( const Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator*() [4/9]

Fortran_Array1D<T> TNT::operator* ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator*() [5/9]

Fortran_Array2D<T> TNT::operator* ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator*() [6/9]

◆ operator*() [7/9]

Matrix<T> TNT::operator* ( const Matrix< T > &  A,
const Matrix< T > &  B 
)
inline

References matmult().

◆ operator*() [8/9]

Vector<T> TNT::operator* ( const Matrix< T > &  A,
const Vector< T > &  x 
)
inline

References matmult().

◆ operator*() [9/9]

Vector<T> TNT::operator* ( const Vector< T > &  A,
const Vector< T > &  B 
)

References Vector< T >::dim().

◆ operator*=() [1/6]

Array1D<T>& TNT::operator*= ( Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator*=() [2/6]

Array2D<T>& TNT::operator*= ( Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator*=() [3/6]

Array3D<T>& TNT::operator*= ( Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator*=() [4/6]

Fortran_Array1D<T>& TNT::operator*= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator*=() [5/6]

Fortran_Array2D<T>& TNT::operator*= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator*=() [6/6]

◆ operator+() [1/8]

Array1D<T> TNT::operator+ ( const Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator+() [2/8]

Array2D<T> TNT::operator+ ( const Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator+() [3/8]

Array3D<T> TNT::operator+ ( const Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator+() [4/8]

Fortran_Array1D<T> TNT::operator+ ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator+() [5/8]

Fortran_Array2D<T> TNT::operator+ ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator+() [6/8]

◆ operator+() [7/8]

Matrix<T> TNT::operator+ ( const Matrix< T > &  A,
const Matrix< T > &  B 
)

◆ operator+() [8/8]

Vector<T> TNT::operator+ ( const Vector< T > &  A,
const Vector< T > &  B 
)

References Vector< T >::dim().

◆ operator+=() [1/6]

Array1D<T>& TNT::operator+= ( Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator+=() [2/6]

Array2D<T>& TNT::operator+= ( Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator+=() [3/6]

Array3D<T>& TNT::operator+= ( Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator+=() [4/6]

Fortran_Array1D<T>& TNT::operator+= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator+=() [5/6]

Fortran_Array2D<T>& TNT::operator+= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator+=() [6/6]

◆ operator-() [1/8]

Array1D<T> TNT::operator- ( const Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator-() [2/8]

Array2D<T> TNT::operator- ( const Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator-() [3/8]

Array3D<T> TNT::operator- ( const Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator-() [4/8]

Fortran_Array1D<T> TNT::operator- ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator-() [5/8]

Fortran_Array2D<T> TNT::operator- ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator-() [6/8]

◆ operator-() [7/8]

Matrix<T> TNT::operator- ( const Matrix< T > &  A,
const Matrix< T > &  B 
)

◆ operator-() [8/8]

Vector<T> TNT::operator- ( const Vector< T > &  A,
const Vector< T > &  B 
)

References Vector< T >::dim().

◆ operator-=() [1/6]

Array1D<T>& TNT::operator-= ( Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator-=() [2/6]

Array2D<T>& TNT::operator-= ( Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator-=() [3/6]

Array3D<T>& TNT::operator-= ( Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator-=() [4/6]

Fortran_Array1D<T>& TNT::operator-= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator-=() [5/6]

Fortran_Array2D<T>& TNT::operator-= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator-=() [6/6]

◆ operator/() [1/6]

Array1D<T> TNT::operator/ ( const Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator/() [2/6]

Array2D<T> TNT::operator/ ( const Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator/() [3/6]

Array3D<T> TNT::operator/ ( const Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator/() [4/6]

Fortran_Array1D<T> TNT::operator/ ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator/() [5/6]

Fortran_Array2D<T> TNT::operator/ ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator/() [6/6]

◆ operator/=() [1/6]

Array1D<T>& TNT::operator/= ( Array1D< T > &  A,
const Array1D< T > &  B 
)

References Array1D< T >::dim1().

◆ operator/=() [2/6]

Array2D<T>& TNT::operator/= ( Array2D< T > &  A,
const Array2D< T > &  B 
)

◆ operator/=() [3/6]

Array3D<T>& TNT::operator/= ( Array3D< T > &  A,
const Array3D< T > &  B 
)

◆ operator/=() [4/6]

Fortran_Array1D<T>& TNT::operator/= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
)

◆ operator/=() [5/6]

Fortran_Array2D<T>& TNT::operator/= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
)

◆ operator/=() [6/6]

◆ operator<<() [1/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Array1D< T > &  A 
)

References Array1D< T >::dim1().

◆ operator<<() [2/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Array2D< T > &  A 
)

◆ operator<<() [3/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Array3D< T > &  A 
)

◆ operator<<() [4/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array1D< T > &  A 
)

Write an array to a character outstream. Output format is one that can be read back in via the in-stream operator: one integer denoting the array dimension (n), followed by n elements, one per line.

References Fortran_Array1D< T >::dim1().

◆ operator<<() [5/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array2D< T > &  A 
)

◆ operator<<() [6/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array3D< T > &  A 
)

◆ operator<<() [7/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Matrix< T > &  A 
)

◆ operator<<() [8/8]

std::ostream& TNT::operator<< ( std::ostream &  s,
const Vector< T > &  A 
)

References Vector< T >::dim().

◆ operator>>() [1/8]

std::istream& TNT::operator>> ( std::istream &  s,
Array1D< T > &  A 
)

◆ operator>>() [2/8]

std::istream& TNT::operator>> ( std::istream &  s,
Array2D< T > &  A 
)

◆ operator>>() [3/8]

std::istream& TNT::operator>> ( std::istream &  s,
Array3D< T > &  A 
)

◆ operator>>() [4/8]

std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array1D< T > &  A 
)

Read an array from a character stream. Input format is one integer, denoting the dimension (n), followed by n whitespace-separated elments. Newlines are ignored

Note: the array being read into references new memory storage. If the intent is to fill an existing conformant array, use cin >> B; A.inject(B) ); instead or read the elements in one-a-time by hand.

Parameters
sthe charater to read from (typically std::in)
Athe array to read into.

◆ operator>>() [5/8]

std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array2D< T > &  A 
)

◆ operator>>() [6/8]

std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array3D< T > &  A 
)

◆ operator>>() [7/8]

std::istream& TNT::operator>> ( std::istream &  s,
Matrix< T > &  A 
)

◆ operator>>() [8/8]

std::istream& TNT::operator>> ( std::istream &  s,
Vector< T > &  A 
)

◆ seconds()

static double TNT::seconds ( void  )
inlinestatic

◆ transpose()

Matrix<T> TNT::transpose ( const Matrix< T > &  A)