Main Page Namespace List Compound List File List Namespace Members Compound Members File Members

# TNT Namespace Reference

## Compounds

class | TNT::Array1D
class | TNT::Array2D
class | TNT::Array3D
class | TNT::Fortran_Array1D
class | TNT::Fortran_Array2D
class | TNT::Fortran_Array3D
class | TNT::Matrix
class | TNT::Sparse_Matrix_CompRow
class | TNT::Stopwatch
class | TNT::Vector

## Typedefs

typedef TNT_SUBSCRIPT_TYPE | Subscript

## Functions

template<class T> std::ostream& | operator<< (std::ostream &s, const Array1D< T > &A)
std::istream& | operator>> (std::istream &s, Array1D< T > &A)
Array1D<T> | operator+ (const Array1D< T > &A, const Array1D< T > &B)
Array1D<T> | operator- (const Array1D< T > &A, const Array1D< T > &B)
Array1D<T> | operator * (const Array1D< T > &A, const Array1D< T > &B)
Array1D<T> | operator/ (const Array1D< T > &A, const Array1D< T > &B)
Array1D<T>& | operator+= (Array1D< T > &A, const Array1D< T > &B)
Array1D<T>& | operator-= (Array1D< T > &A, const Array1D< T > &B)
Array1D<T>& | operator *= (Array1D< T > &A, const Array1D< T > &B)
Array1D<T>& | operator/= (Array1D< T > &A, const Array1D< T > &B)
template<class T> std::ostream& | operator<< (std::ostream &s, const Array2D< T > &A)
std::istream& | operator>> (std::istream &s, Array2D< T > &A)
Array2D<T> | operator+ (const Array2D< T > &A, const Array2D< T > &B)
Array2D<T> | operator- (const Array2D< T > &A, const Array2D< T > &B)
Array2D<T> | operator * (const Array2D< T > &A, const Array2D< T > &B)
Array2D<T> | operator/ (const Array2D< T > &A, const Array2D< T > &B)
Array2D<T>& | operator+= (Array2D< T > &A, const Array2D< T > &B)
Array2D<T>& | operator-= (Array2D< T > &A, const Array2D< T > &B)
Array2D<T>& | operator *= (Array2D< T > &A, const Array2D< T > &B)
Array2D<T>& | operator/= (Array2D< T > &A, const Array2D< T > &B)
Array2D<T> | matmult (const Array2D< T > &A, const Array2D< T > &B)
template<class T> std::ostream& | operator<< (std::ostream &s, const Array3D< T > &A)
std::istream& | operator>> (std::istream &s, Array3D< T > &A)
Array3D<T> | operator+ (const Array3D< T > &A, const Array3D< T > &B)
Array3D<T> | operator- (const Array3D< T > &A, const Array3D< T > &B)
Array3D<T> | operator * (const Array3D< T > &A, const Array3D< T > &B)
Array3D<T> | operator/ (const Array3D< T > &A, const Array3D< T > &B)
Array3D<T>& | operator+= (Array3D< T > &A, const Array3D< T > &B)
Array3D<T>& | operator-= (Array3D< T > &A, const Array3D< T > &B)
Array3D<T>& | operator *= (Array3D< T > &A, const Array3D< T > &B)
Array3D<T>& | operator/= (Array3D< T > &A, const Array3D< T > &B)
template<class T> std::ostream& | operator<< (std::ostream &s, const Matrix< T > &A)
std::istream& | operator>> (std::istream &s, Matrix< T > &A)
Matrix<T> | operator+ (const Matrix< T > &A, const Matrix< T > &B)
Matrix<T> | operator- (const Matrix< T > &A, const Matrix< T > &B)
Matrix<T> | mult_element (const Matrix< T > &A, const Matrix< T > &B)
Matrix<T> | transpose (const Matrix< T > &A)
Matrix<T> | matmult (const Matrix< T > &A, const Matrix< T > &B)
Matrix<T> | operator * (const Matrix< T > &A, const Matrix< T > &B)
int | matmult (Matrix< T > &C, const Matrix< T > &A, const Matrix< T > &B)
Vector<T> | matmult (const Matrix< T > &A, const Vector< T > &x)
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)
std::istream& | operator>> (std::istream &s, Fortran_Array1D< T > &A)
Fortran_Array1D<T> | operator+ (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T> | operator- (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T> | operator * (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T> | operator/ (const Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T>& | operator+= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T>& | operator-= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
Fortran_Array1D<T>& | operator *= (Fortran_Array1D< T > &A, const Fortran_Array1D< T > &B)
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)
std::istream& | operator>> (std::istream &s, Fortran_Array2D< T > &A)
template<class T> std::ostream& | operator<< (std::ostream &s, const Fortran_Array3D< T > &A)
std::istream& | operator>> (std::istream &s, Fortran_Array3D< T > &A)
Real | hypot (const Real &a, const Real &b)
Scalar | min (const Scalar &a, const Scalar &b)
Scalar | max (const Scalar &a, const Scalar &b)
Real | abs (const Real &a)
template<class T> std::ostream& | operator<< (std::ostream &s, const Vector< T > &A)
std::istream& | operator>> (std::istream &s, Vector< T > &A)
Vector<T> | operator+ (const Vector< T > &A, const Vector< T > &B)
Vector<T> | operator- (const Vector< T > &A, const Vector< T > &B)
Vector<T> | operator * (const Vector< T > &A, const Vector< T > &B)
T | dot_prod (const Vector< T > &A, const Vector< T > &B)

## Typedef Documentation

typedef TNT_SUBSCRIPT_TYPE TNT::Subscript

## Function Documentation

Real TNT::abs ( | const Real & a )

Returns:
  the absolute value of a real (no-complex) scalar.

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

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

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

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

Matrix< T > TNT::matmult ( | const Matrix< T > & A,
| const Matrix< T > & B )`[inline]`

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:

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

Scalar TNT::max ( | const Scalar & a,
| const Scalar & b )

Returns:
  the maximum of scalars a and b.

Scalar TNT::min ( | const Scalar & a,
| const Scalar & b )

Returns:
  the minimum of scalars a and b.

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

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

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

Array multiplication (element-wise) : compute C = A*B, where each C(i) is A(i) * B(i).

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

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

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

Array multiplication (element-wise): compute C = A*B, where C[i][j][k] is the product of A[i][j][k] and B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A*B, or a null array (0x0x0) if the matrices are non-conformant.

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

Array (element-wise) multiplication: compute C = A*B, where C[i][j] is A[i][j] * B[i][j]. (Note: this is not matrix multiplcation, see Matrix<T> for linear algebra operations.)

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A*B, or a null array (0x0) if the matrices are non-conformant.

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

Array multiplication (element-wise) : compute C = A*B, where each C[i] is A[i] * B[i].

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

Array element-wise multiplication (in place): compute A = A*B, where each A(i) is replaced with A(i) * B(i).

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A*=B, or the original A if if the matrices are non-conformant.

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

Array multiplication (in place): compute A = A*B, where each A[i][j][k] is replaced by A[i][j][k] * B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A*B, or a the original array A, if they are non-conformant.

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

Array multiplication (in place): compute A = A*B, where each A[i][j] is replaced with A[i][j] * B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A*=B, or the original A if if the matrices are non-conformant.

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

Array element-wise multiplication (in place): compute A = A*B, where each A[i] is replaced with A[i] * B[i].

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A*=B, or the original A if if the matrices are non-conformant.

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

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

Array addition: compute C = A+B, where C(i) is the sum of A(i) and B(i).

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A+B, or a null array (0) if the matrices are non-conformant.

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

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

Array addition: compute C = A+B, where C[i][j][k] is the sum of A[i][j][k] and B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A+B, or a null array (0x0x0) if the matrices are non-conformant.

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

Array addition: compute C = A+B, where C[i][j] is the sum of A[i][j] and B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A+B, or a null array (0x0) if the matrices are non-conformant.

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

Array addition: compute C = A+B, where C[i] is the sum of A[i] and B[i].

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A+B, or a null array (0) if the matrices are non-conformant.

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

Array addition (in place): compute A = A+B, where each A(i) is replaced with A(i) + B(i).

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A+=B, or the original A if if the matrices are non-conformant.

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

Array addition (in place): compute A = A+B, where each A[i][j][k] is replaced by A[i][j][k] + B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A+B, or a the original array A, if they are non-conformant.

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

Array addition (in place): compute A = A+B, where each A[i][j] is replaced with A[i][j] + B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A+=B, or the original A if if the matrices are non-conformant.

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

Array addition (in place): compute A = A+B, where each A[i] is replaced with A[i] + B[i].

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A+=B, or the original A if if the matrices are non-conformant.

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

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

Array subtraction: compute C = A-B, where each C(i) is A(i) - B(i).

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

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

Array subtraction: compute C = A-B, where C[i][j][k] is the sum of A[i][j][k] and B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A-B, or a null array (0x0x0) if the matrices are non-conformant.

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

Array subtraction: compute C = A-B, where C[i][j] is A[i][j] - B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A-B, or a null array (0x0) if the matrices are non-conformant.

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

Array subtraction: compute C = A-B, where each C[i] is A[i] - B[i].

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

Array subtraction (in place): compute A = A-B, where each A(i) is replaced with A(i) - B(i).

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A-=B, or the original A if if the matrices are non-conformant.

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

Array subtraction (in place): compute A = A-B, where each A[i][j][k] is replaced by A[i][j][k] - B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A-B, or a the original array A, if they are non-conformant.

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

Array subtraction (in place): compute A = A-B, where each A[i][j] is replaced with A[i][j] - B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A-=B, or the original A if if the matrices are non-conformant.

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

Array subtraction (in place): compute A = A-B, where each A[i] is replaced with A[i] - B[i].

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A-=B, or the original A if if the matrices are non-conformant.

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

Array division (element-wise) : compute C = A*B, where each C(i) is A(i) / B(i).

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

Array division (element-wise): compute C = A/B, where C[i][j][k] is the A[i][j][k] / B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A/B, or a null array (0x0x0) if the matrices are non-conformant.

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

Array (element-wise) division: compute C = A/B, where C[i][j] is A[i][j] / B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A/B, or a null array (0x0) if the matrices are non-conformant.

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

Array division (element-wise) : compute C = A*B, where each C[i] is A[i] / B[i].

Parameters:

  A | an array of n elements
  B | an array of n elements

Returns:
  the n array A-B, or a null array (0) if the matrices are non-conformant.

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

Array element-wise division (in place): compute A = A/B, where each A(i) is replaced with A(i) / B(i).

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A/=B, or the original A if if the matrices are non-conformant.

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

Array division (in place): compute A = A/B, where each A[i][j][k] is replaced by A[i][j][k] / B[i][j][k].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A/B, or a the original array A, if they are non-conformant.

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

Array divsion (in place): compute A = A/B, where each A[i][j] is replaced with A[i][j] / B[i][j].

Parameters:

  A | an (m x n) array
  B | an (m x n) array

Returns:
  the (m x n) array A/=B, or the original A if if the matrices are non-conformant.

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

Array element-wise division (in place): compute A = A/B, where each A[i] is replaced with A[i] / B[i].

Parameters:

  A | an array of length n
  B | an array of length n

Returns:
  the n-length array A/=B, or the original A if if the matrices are non-conformant.

template<class T>
std::ostream& operator<< ( | std::ostream & s,
| const Vector< T > & A )

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

| Write an array to a character outstream. Output format is one that can be read back in via the in-stream operator: three integers denoting the array dimensions (m x n x k), followed by m (n x k) arrays in "row-major" order.

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

| Write an array to a character outstream. Output format is one that can be read back in via the in-stream operator: two integers denoting the array dimensions (m x n), followed by m lines of n elements.

template<class T>
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.

template<class T>
std::ostream& operator<< ( | std::ostream & s,
| const Matrix< T > & A )

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

| Write an array to a character outstream. Output format is one that can be read back in via the in-stream operator: three integers denoting the array dimensions (m x n x k), followed by m (n x k) arrays.

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

| Write an array to a character outstream. Output format is one that can be read back in via the in-stream operator: two integers denoting the array dimensions (m x n), followed by m lines of n elements.

template<class T>
std::ostream & TNT::operator<< ( | std::ostream & s,
| const 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.

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

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

Read an array from a character stream. Input format is three integers, denoting the dimensions (m x n x k), followed by m*n*k whitespace-separated elments in "row-major" order (i.e. right-most dimension varying fastest.) 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.

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

Read an array from a character stream. Input format is two integers, denoting the dimensions (m x n), followed by m*n whitespace-separated elments in "row-major" order (i.e. right-most dimension varying fastest.) 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.

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:

  s | the charater to read from (typically `std::in`)
  A | the array to read into.

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

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

Read an array from a character stream. Input format is three integers, denoting the dimensions (m x n x k), followed by m*n*k whitespace-separated elments in "row-major" order (i.e. right-most dimension varying fastest.) 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.

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

Read an array from a character stream. Input format is two integers, denoting the dimensions (m x n), followed by m*n whitespace-separated elments in "row-major" order (i.e. right-most dimension varying fastest.) 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.

std::istream & TNT::operator>> ( | std::istream & s,
| 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:

  s | the charater to read from (typically `std::in`)
  A | the array to read into.

Matrix<T> transpose ( | const Matrix< T > & A )