Go to the source code of this file.
Compounds | |
class | matrix |
Implementation of a matrix with entries of type T. More... | |
class | vector |
Implementation of a vector with entries of type T. More... | |
Constants for matrix_status | |
const int | st_ok = 1 |
const int | st_out_of_memory = -1 |
const int | st_out_of_range = -2 |
const int | st_inconsistent_sizes = -3 |
const int | st_input_error = -4 |
const int | st_output_error = -5 |
const int | st_incorrect_index = -6 |
const int | st_matrix_must_be_square = -7 |
const int | st_matrix_is_singular = -8 |
Typedefs | |
typedef int | index |
Functions | |
template<class T> ostream & | operator<< (ostream &s, const vector< T > &x) |
template<class T> istream & | operator>> (istream &s, vector< T > &x) |
template<class T> ostream & | operator<< (ostream &s, const matrix< T > &x) |
template<class T> istream & | operator>> (istream &s, matrix< T > &x) |
template<class T> void | print2 (ostr &s, const matrix< T > &A, const matrix< T > &B) |
template<class T> void | print3 (ostr &s, const matrix< T > &A, const matrix< T > &B, const matrix< T > &C) |
Variables | |
int | matrix_status = st_ok |
index const | n_max_size = 10000 |
index const | m_max_size = 10000 |
This module containes description of two following classes:
These classes support all linear algebraic operations with appropriate mathematical objects.
The number of entries in a vector is bounded above by the constant n_max_size. The number of columns in a matrix is bounded above by the constant n_max_size. The number of rows in a matrix is bounded above by the constant m_max_size. Indices of enties in a vector/matrix begin from 0. The type subscript is specially defined for vector/matrix indices.
For error controlling there is a variable matrix_status which containes the code of a last error.
Definition in file matrices.h.
|
The type for index representation.
Definition at line 57 of file matrices.h. |
|
Then writes entries Definition at line 1083 of file matrices.h. |
|
First, writes the number of entries. Then writes entries Definition at line 665 of file matrices.h. |
|
Then reads entries Definition at line 1098 of file matrices.h. |
|
First, writes the number of entries. Then writes entries Definition at line 677 of file matrices.h. |
|
Prints matrices in the form:. A B Definition at line 1912 of file matrices.h. |
|
Prints matrices in the form:. A B C Definition at line 1962 of file matrices.h. |
|
The maximum number of rows in a matrix.
Definition at line 66 of file matrices.h. |
|
The code of the last error. If an error has occured an error message writes to std err Definition at line 53 of file matrices.h. |
|
The maximum number of column in a matrix, the maximum number of enties in a vector.
Definition at line 63 of file matrices.h. |
|
Inconsistent sizes of matrices.
Definition at line 41 of file matrices.h. |
|
Incorrect index.
Definition at line 44 of file matrices.h. |
|
Input error.
Definition at line 42 of file matrices.h. |
|
Matrix is singular.
Definition at line 46 of file matrices.h. |
|
Matrix must be square.
Definition at line 45 of file matrices.h. |
|
Ok.
Definition at line 38 of file matrices.h. |
|
Out of memory.
Definition at line 39 of file matrices.h. |
|
Out of range.
Definition at line 40 of file matrices.h. |
|
Output error.
Definition at line 43 of file matrices.h. |