TNT Namespace Reference


Namespaces

namespace  Linear_Algebra

Classes

class  Array1D
class  Array2D
class  Array3D
class  Fortran_Array1D
class  Fortran_Array2D
class  Fortran_Array3D
class  i_refvec
class  Matrix
class  Sparse_Matrix
class  Sparse_Vector_Element
class  Sparse_Vector
class  Stopwatch
class  Vector

Typedefs

typedef TNT_SUBSCRIPT_TYPE 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 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)
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 > & mult (Matrix< T > &C, const Matrix< T > &A, const Matrix< T > &B)
template<class T >
Matrix< T > mult (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 >
Vector< T > mult (const Matrix< T > &A, const Vector< T > &b)
template<class T >
Vector< T > operator* (const Matrix< T > &A, const Vector< T > &b)
template<class T >
Matrix< T > mult (const T &s, const Matrix< T > &A)
template<class T >
Matrix< T > mult (const Matrix< T > &A, const T &s)
template<class T >
Matrix< T > mult_eq (const T &s, const Matrix< T > &A)
template<class T >
Matrix< T > mult_eq (const Matrix< T > &A, const T &a)
template<class T >
Matrix< T > transpose_mult (const Matrix< T > &A, const Matrix< T > &B)
template<class T >
Vector< T > transpose_mult (const Matrix< T > &A, const Vector< T > &b)
template<class T >
Matrix< T > add (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 > & add_eq (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 > minus (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 > mult_element_eq (const Matrix< T > &A, const Matrix< T > &B)
template<class T >
double norm (const Matrix< T > &A)
template<class T >
Matrix< T > transpose (const Matrix< T > &A)
template<class T >
Vector< T > upper_triangular_solve (const Matrix< T > &A, const Vector< T > &b)
template<class T >
Vector< T > lower_triangular_solve (const Matrix< T > &A, const Vector< T > &b)
template<class T >
Vector< T > operator* (const Sparse_Matrix< T > &S, const Vector< T > &x)
template<class T >
double norm (const Sparse_Matrix< T > &S)
template<class T >
std::ostream & operator<< (std::ostream &s, const Sparse_Matrix< T > &A)
template<class T >
dot_product (const Sparse_Vector< T > &s, const Vector< T > &x)
template<class T >
dot_product (const Vector< T > &x, const Sparse_Vector< T > &s)
template<class T >
operator* (const Vector< T > &x, const Sparse_Vector< T > &s)
template<class T >
operator* (const Sparse_Vector< T > &s, const Vector< T > &x)
template<class T >
double norm (const Sparse_Vector< T > &s)
template<class T >
std::ostream & operator<< (std::ostream &s, const Sparse_Vector< T > &A)
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+= (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-= (Vector< T > &A, const Vector< T > &B)
template<class T >
Vector< T > elementwise_mult (const Vector< T > &A, const Vector< T > &B)
template<class T >
double norm (const Vector< T > &A)
template<class T >
dot_prod (const Vector< T > &A, const Vector< T > &B)
template<class T >
dot_product (const Vector< T > &A, const Vector< T > &B)
template<class T >
operator* (const Vector< T > &A, const Vector< T > &B)
template<class T >
Vector< T > operator* (const T &a, const Vector< T > &A)
template<class T >
Vector< T > operator* (const Vector< T > &A, const T &a)

Typedef Documentation

typedef TNT_SUBSCRIPT_TYPE TNT::Subscript

Definition at line 43 of file tnt_subscript.h.


Function Documentation

template<class T >
Matrix<T> TNT::add ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix addition: compute A + B

Parameters:
A matrix of size M x N.
B matrix of size M x N.
the sum A+B.

Definition at line 796 of file tnt_matrix.h.

template<class T >
Matrix<T>& TNT::add_eq ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix addition, in place : compute A = A + B.

Parameters:
A matrix of size M x N.
B matrix of size M x N.
the sum A+B.

Definition at line 843 of file tnt_matrix.h.

template<class T >
T TNT::dot_prod ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 441 of file tnt_vector.h.

template<class T >
T TNT::dot_product ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 456 of file tnt_vector.h.

template<class T >
T TNT::dot_product ( const Vector< T > &  x,
const Sparse_Vector< T > &  s 
) [inline]

Definition at line 213 of file tnt_sparse_vector.h.

template<class T >
T TNT::dot_product ( const Sparse_Vector< T > &  s,
const Vector< T > &  x 
) [inline]

Definition at line 207 of file tnt_sparse_vector.h.

template<class T >
Vector<T> TNT::elementwise_mult ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 411 of file tnt_vector.h.

template<class Real >
Real TNT::hypot ( const Real &  a,
const Real &  b 
) [inline]

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).

Definition at line 21 of file tnt_math_utils.h.

template<class T >
Vector<T> TNT::lower_triangular_solve ( const Matrix< T > &  A,
const Vector< T > &  b 
) [inline]

Solve the triangular system A_L *x=b, where A_L is the lower triangular portion (including the diagonal) of A.

Parameters:
A a square matrix of size N x N.
b the right-hand-side (solution vector) of size N.
Returns:
x, such that A_u * x = b.

Definition at line 1076 of file tnt_matrix.h.

template<class T >
Array2D<T> TNT::matmult ( const Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

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:
A an (m x n) array
B an (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.)

Definition at line 259 of file tnt_array2d_utils.h.

template<class T >
Matrix<T> TNT::minus ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix subtraction : compute A - B.

Parameters:
A matrix of size M x N.
B matrix of size M x N.
Returns:
the result A-B.

Definition at line 888 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult ( const Matrix< T > &  A,
const T &  s 
) [inline]

Matrix scaling: multiply each element of A by scalar s.

Same as mult(A,s), as this is a commutative operation.

NOTE: this creates a new copy of A. To scale "in place", use *= or mult_eq().

Parameters:
A matrix: to be scaled.
s scalar: multiplier.
Returns:
s*A, a new matrix with same size of A.

Definition at line 675 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult ( const T &  s,
const Matrix< T > &  A 
) [inline]

Matrix scaling: multiply each element of A by scalar s.

NOTE: this creates a new copy of A. To scale "in place", use *= or mult_eq().

Parameters:
A matrix: to be scaled.
s scalar: multiplier.
Returns:
s*A, a new matrix with same size of A.

Definition at line 647 of file tnt_matrix.h.

template<class T >
Vector<T> TNT::mult ( const Matrix< T > &  A,
const Vector< T > &  b 
) [inline]

Matrix/vector multiplication: compute A * b.

Parameters:
A matrix: left side operand (number of columns of A, must match the number of elements in b.)
b vector: right side operand.
Returns:
A*b (a new vector of size M.)

Definition at line 594 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix/matrix multiplication: compute A * B.

Parameters:
A matrix: left side operand (size M x N).
B matrix: right side operand (size N x K).
Returns:
A*B (a new matirx of size M x K).

Definition at line 540 of file tnt_matrix.h.

template<class T >
Matrix<T>& TNT::mult ( Matrix< T > &  C,
const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix-Matrix multiplication: C = A * B.

This is an optimizied (trinary) version of matrix multiply, where the destination matrix has already been allocated.

Parameters:
A matrix of size M x N.
B matrix of size N x K.
C the result A*B, of size M x K.
Returns:
a reference to C, after multiplication.

Definition at line 491 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult_element ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix element-by-elment multiplication: for each (i,j) compute A(i,j) * B(i,j).

Parameters:
A matrix of size M x N.
B matrix of size M x N.
Returns:
new matrix, where each (i,j) is A(i,j) * B(i,j);

Definition at line 937 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult_element_eq ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix element-by-elment multiplication, in place: for each (i,j) compute A(i,j) = A(i,j) * B(i,j).

Parameters:
A matrix of size M x N.
B matrix of size M x N.
Returns:
the resultant A, where A(i,j) *= B(i,j);

Definition at line 966 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult_eq ( const Matrix< T > &  A,
const T &  a 
) [inline]

Definition at line 705 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::mult_eq ( const T &  s,
const Matrix< T > &  A 
) [inline]

Matrix scale in-place, i.e. compute A *= s, where each element of A is multiplied (scaled) by the value s.

NOTE: this creates a new copy of A. To scale "in place", use *= or mult_eq().

Parameters:
A matrix: to be scaled.
s scalar: multiplier.
Returns:
A, after scaling.

Definition at line 694 of file tnt_matrix.h.

template<class T >
double TNT::norm ( const Vector< T > &  A  )  [inline]

Definition at line 428 of file tnt_vector.h.

template<class T >
double TNT::norm ( const Sparse_Vector< T > &  s  )  [inline]

Definition at line 232 of file tnt_sparse_vector.h.

template<class T >
double TNT::norm ( const Sparse_Matrix< T > &  S  )  [inline]

Definition at line 264 of file tnt_sparse_matrix.h.

template<class T >
double TNT::norm ( const Matrix< T > &  A  )  [inline]

Compute Frobenius norm of matrix. This is the square root of the sum of squares of each matrix entry, i.e.

			$$ \sqrt{ \sum_{i=1}{N} \sum_{j=1}{N} A_{i,j}^{2} } $$.
	
.

Parameters:
A the matrix to compute its Frobeinus norm.
Returns:
the Frobenius norm of A.

Definition at line 994 of file tnt_matrix.h.

template<class T >
Vector<T> TNT::operator* ( const Vector< T > &  A,
const T &  a 
) [inline]

Definition at line 483 of file tnt_vector.h.

template<class T >
Vector<T> TNT::operator* ( const T &  a,
const Vector< T > &  A 
) [inline]

Definition at line 471 of file tnt_vector.h.

template<class T >
T TNT::operator* ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 463 of file tnt_vector.h.

template<class T >
T TNT::operator* ( const Sparse_Vector< T > &  s,
const Vector< T > &  x 
) [inline]

Definition at line 225 of file tnt_sparse_vector.h.

template<class T >
T TNT::operator* ( const Vector< T > &  x,
const Sparse_Vector< T > &  s 
) [inline]

Definition at line 219 of file tnt_sparse_vector.h.

template<class T >
Vector<T> TNT::operator* ( const Sparse_Matrix< T > &  S,
const Vector< T > &  x 
) [inline]

Definition at line 258 of file tnt_sparse_matrix.h.

template<class T >
Vector<T> TNT::operator* ( const Matrix< T > &  A,
const Vector< T > &  b 
) [inline]

Matrix/vector multiplication: compute A * b.

Parameters:
A matrix: left side operand (number of columns of A, must match the number of elements in b.)
b vector: right side operand.
Returns:
A*b (a new vector of size M.)

Definition at line 629 of file tnt_matrix.h.

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

Matrix/matrix multiplication: compute A * B.

Parameters:
A matrix: left side operand (size M x N).
B matrix: right side operand (size N x K).
Returns:
A*B (a new matirx of size M x K).

Definition at line 579 of file tnt_matrix.h.

template<class T >
Fortran_Array3D<T> TNT::operator* ( const Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 124 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T> TNT::operator* ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 120 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T> TNT::operator* ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 123 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T> TNT::operator* ( const Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 109 of file tnt_array3d_utils.h.

template<class T >
Array2D<T> TNT::operator* ( const Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 119 of file tnt_array2d_utils.h.

template<class T >
Array1D<T> TNT::operator* ( const Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 107 of file tnt_array1d_utils.h.

template<class T >
Fortran_Array3D<T>& TNT::operator*= ( Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 210 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T>& TNT::operator*= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 201 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T>& TNT::operator*= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 207 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T>& TNT::operator*= ( Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 194 of file tnt_array3d_utils.h.

template<class T >
Array2D<T>& TNT::operator*= ( Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 208 of file tnt_array2d_utils.h.

template<class T >
Array1D<T>& TNT::operator*= ( Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 191 of file tnt_array1d_utils.h.

template<class T >
Vector<T> TNT::operator+ ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 342 of file tnt_vector.h.

template<class T >
Matrix<T> TNT::operator+ ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix addition: compute A + B.

NOTE: this is shorthand notation for add(A,B).

Parameters:
A matrix of size M x N.
B matrix of size M x N.
the sum A+B.

Definition at line 826 of file tnt_matrix.h.

template<class T >
Fortran_Array3D<T> TNT::operator+ ( const Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 76 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T> TNT::operator+ ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 75 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T> TNT::operator+ ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 80 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T> TNT::operator+ ( const Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 59 of file tnt_array3d_utils.h.

template<class T >
Array2D<T> TNT::operator+ ( const Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 74 of file tnt_array2d_utils.h.

template<class T >
Array1D<T> TNT::operator+ ( const Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 64 of file tnt_array1d_utils.h.

template<class T >
Vector<T> TNT::operator+= ( Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 359 of file tnt_vector.h.

template<class T >
Matrix<T> TNT::operator+= ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix addition, in place: compute A = A + B.

NOTE: this is shorthand notation for add_eq(A,B).

Parameters:
A matrix of size M x N.
B matrix of size M x N.
Returns:
the sum A+B.

Definition at line 873 of file tnt_matrix.h.

template<class T >
Fortran_Array3D<T>& TNT::operator+= ( Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 172 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T>& TNT::operator+= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 167 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T>& TNT::operator+= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 172 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T>& TNT::operator+= ( Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 158 of file tnt_array3d_utils.h.

template<class T >
Array2D<T>& TNT::operator+= ( Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 170 of file tnt_array2d_utils.h.

template<class T >
Array1D<T>& TNT::operator+= ( Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 156 of file tnt_array1d_utils.h.

template<class T >
Vector<T> TNT::operator- ( const Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 375 of file tnt_vector.h.

template<class T >
Matrix<T> TNT::operator- ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix subtraction : compute A - B.

This is shorthand notation for minus(A,B).

Parameters:
A matrix of size M x N.
B matrix of size M x N.
Returns:
the result A-B.

Definition at line 919 of file tnt_matrix.h.

template<class T >
Fortran_Array3D<T> TNT::operator- ( const Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 100 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T> TNT::operator- ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 97 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T> TNT::operator- ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 102 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T> TNT::operator- ( const Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 83 of file tnt_array3d_utils.h.

template<class T >
Array2D<T> TNT::operator- ( const Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 96 of file tnt_array2d_utils.h.

template<class T >
Array1D<T> TNT::operator- ( const Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 86 of file tnt_array1d_utils.h.

template<class T >
Vector<T> TNT::operator-= ( Vector< T > &  A,
const Vector< T > &  B 
) [inline]

Definition at line 392 of file tnt_vector.h.

template<class T >
Fortran_Array3D<T>& TNT::operator-= ( Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 191 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T>& TNT::operator-= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 184 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T>& TNT::operator-= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 190 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T>& TNT::operator-= ( Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 176 of file tnt_array3d_utils.h.

template<class T >
Array2D<T>& TNT::operator-= ( Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 189 of file tnt_array2d_utils.h.

template<class T >
Array1D<T>& TNT::operator-= ( Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 174 of file tnt_array1d_utils.h.

template<class T >
Fortran_Array3D<T> TNT::operator/ ( const Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 148 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T> TNT::operator/ ( const Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 143 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T> TNT::operator/ ( const Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 144 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T> TNT::operator/ ( const Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 133 of file tnt_array3d_utils.h.

template<class T >
Array2D<T> TNT::operator/ ( const Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 144 of file tnt_array2d_utils.h.

template<class T >
Array1D<T> TNT::operator/ ( const Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 128 of file tnt_array1d_utils.h.

template<class T >
Fortran_Array3D<T>& TNT::operator/= ( Fortran_Array3D< T > &  A,
const Fortran_Array3D< T > &  B 
) [inline]

Definition at line 229 of file tnt_fortran_array3d_utils.h.

template<class T >
Fortran_Array2D<T>& TNT::operator/= ( Fortran_Array2D< T > &  A,
const Fortran_Array2D< T > &  B 
) [inline]

Definition at line 218 of file tnt_fortran_array2d_utils.h.

template<class T >
Fortran_Array1D<T>& TNT::operator/= ( Fortran_Array1D< T > &  A,
const Fortran_Array1D< T > &  B 
) [inline]

Definition at line 225 of file tnt_fortran_array1d_utils.h.

template<class T >
Array3D<T>& TNT::operator/= ( Array3D< T > &  A,
const Array3D< T > &  B 
) [inline]

Definition at line 213 of file tnt_array3d_utils.h.

template<class T >
Array2D<T>& TNT::operator/= ( Array2D< T > &  A,
const Array2D< T > &  B 
) [inline]

Definition at line 229 of file tnt_array2d_utils.h.

template<class T >
Array1D<T>& TNT::operator/= ( Array1D< T > &  A,
const Array1D< T > &  B 
) [inline]

Definition at line 209 of file tnt_array1d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Vector< T > &  A 
) [inline]

Definition at line 304 of file tnt_vector.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Sparse_Vector< T > &  A 
) [inline]

Definition at line 239 of file tnt_sparse_vector.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Sparse_Matrix< T > &  A 
) [inline]

Definition at line 270 of file tnt_sparse_matrix.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Matrix< T > &  A 
) [inline]

Definition at line 430 of file tnt_matrix.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array3D< T > &  A 
) [inline]

Definition at line 32 of file tnt_fortran_array3d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array2D< T > &  A 
) [inline]

Definition at line 31 of file tnt_fortran_array2d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Fortran_Array1D< T > &  A 
) [inline]

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.

Definition at line 37 of file tnt_fortran_array1d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Array3D< T > &  A 
) [inline]

Definition at line 14 of file tnt_array3d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Array2D< T > &  A 
) [inline]

Definition at line 32 of file tnt_array2d_utils.h.

template<class T >
std::ostream& TNT::operator<< ( std::ostream &  s,
const Array1D< T > &  A 
) [inline]

Definition at line 31 of file tnt_array1d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Vector< T > &  A 
) [inline]

Definition at line 318 of file tnt_vector.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Matrix< T > &  A 
) [inline]

Definition at line 450 of file tnt_matrix.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array3D< T > &  A 
) [inline]

Definition at line 56 of file tnt_fortran_array3d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array2D< T > &  A 
) [inline]

Definition at line 52 of file tnt_fortran_array2d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Fortran_Array1D< T > &  A 
) [inline]

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:
s the charater to read from (typically std::in)
A the array to read into.

Definition at line 66 of file tnt_fortran_array1d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Array3D< T > &  A 
) [inline]

Definition at line 38 of file tnt_array3d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Array2D< T > &  A 
) [inline]

Definition at line 53 of file tnt_array2d_utils.h.

template<class T >
std::istream& TNT::operator>> ( std::istream &  s,
Array1D< T > &  A 
) [inline]

Definition at line 49 of file tnt_array1d_utils.h.

static double TNT::seconds ( void   )  [inline, static]

Definition at line 30 of file tnt_stopwatch.h.

template<class T >
Matrix<T> TNT::transpose ( const Matrix< T > &  A  )  [inline]

Matrix tranpose: return a new matrix B, where B(i,j) is A(j,i).

Parameters:
A matrix MxN
Returns:
new matrix of size N x M, where each (i,j) is A(j,i).

Definition at line 1017 of file tnt_matrix.h.

template<class T >
Vector<T> TNT::transpose_mult ( const Matrix< T > &  A,
const Vector< T > &  b 
) [inline]

Matrix-Vector tranpose multiplication, i.e. compute tranpose(A)*b.

NOTE: this is more efficient than computing the tranpose(A) explicitly, and then multiplying, as the tranpose of A is not explicitly constructed.

Parameters:
A Matrix: size M x N.
b Vector: size M.
Returns:
a new vector of size N.

Definition at line 762 of file tnt_matrix.h.

template<class T >
Matrix<T> TNT::transpose_mult ( const Matrix< T > &  A,
const Matrix< T > &  B 
) [inline]

Matrix-Matrix tranpose multiplication, i.e. compute tranpose(A)*B.

NOTE: this is more efficient than computing the tranpose(A) explicitly, and then multiplying, as the tranpose of A is never really constructed.

Parameters:
A matrix: size M x N.
B matrix: size M x K.
Returns:
a new matrix of size N x K.

Definition at line 723 of file tnt_matrix.h.

template<class T >
Vector<T> TNT::upper_triangular_solve ( const Matrix< T > &  A,
const Vector< T > &  b 
) [inline]

Solve the triangular system A_u *x=b, where A_u is the upper triangular portion (including the diagonal) of A.

Parameters:
A a square matrix of size N x N.
b the right-hand-side (solution vector) of size N.
Returns:
x, such that A_u * x = b.

Definition at line 1050 of file tnt_matrix.h.


Generated on Fri Feb 6 13:30:19 2009 for CorAL by  doxygen 1.5.8