|
IFEM
90A354
|
Simple template classes for dense rectangular matrices and vectors. More...
#include <vector>#include <iostream>#include <algorithm>#include <cstring>#include <cctype>#include <cmath>#include "BLAS.h"#include "print_tol.h"

Go to the source code of this file.
Classes | |
| class | utl::vector< T > |
| A vector class with some added algebraic operations. More... | |
| class | utl::matrixBase< T > |
| Common base class for multi-dimensional (2D and 3D) matrices. More... | |
| class | utl::matrix< T > |
| Two-dimensional rectangular matrix with some algebraic operations. More... | |
Namespaces | |
| utl | |
| General utility classes and functions. | |
Functions | |
| template<class T > | |
| T | utl::trunc (T v) |
| Truncate a value to zero when it is less than a given threshold. More... | |
| template<class T > | |
| std::istream & | utl::operator>> (std::istream &s, vector< T > &X) |
| Read the vector X from the stream s. | |
| template<class T > | |
| std::ostream & | utl::operator<< (std::ostream &s, const vector< T > &X) |
| Print the vector X to the stream s. | |
| template<class T > | |
| std::istream & | utl::operator>> (std::istream &s, matrix< T > &A) |
| Read the matrix A from the stream s. | |
| template<class T > | |
| std::ostream & | utl::operator<< (std::ostream &s, const matrix< T > &A) |
| Print the matrix A to the stream s. More... | |
| template<class T > | |
| void | utl::writeMatlab (const char *label, const vector< T > &X, std::ostream &s=std::cout) |
| Print the vector X to the stream s in matlab format. | |
| template<class T > | |
| void | utl::writeMatlab (const char *label, const matrix< T > &A, std::ostream &s=std::cout) |
| Print the matrix A to the stream s in matlab format. | |
Variables | |
| const char | utl::RETAIN = 2 |
| Flag for vector::resize() method telling it to retain its content. | |
Simple template classes for dense rectangular matrices and vectors.
The classes have some algebraic operators defined, such that the class type T has to be of a numerical type, i.e., float or double. The multiplication methods are implemented based on the BLAS library if an implementation is provided (HAS_BLAS is defined, see BLAS.h). Otherwise, inlined methods are used.