Flood::Matrix< Type > Class Template Reference

#include <Matrix.h>

List of all members.

Public Member Functions

 Matrix (void)
 Matrix (int, int)
 Matrix (int, int, const Type &)
 Matrix (const char *)
 Matrix (const Matrix &)
virtual ~Matrix (void)
Matrix< Type > & operator= (const Matrix< Type > &)
Type * operator[] (int)
const Type * operator[] (int) const
Matrix< Type > operator+ (const Type &) const
Matrix< Type > operator+ (const Matrix< Type > &) const
Matrix< Type > operator- (const Type &) const
Matrix< Type > operator- (const Matrix< Type > &) const
Matrix< Type > operator* (const Type &) const
Matrix< Type > operator* (const Matrix< Type > &) const
Matrix< Type > operator/ (const Type &) const
Matrix< Type > operator/ (const Matrix< Type > &) const
bool operator== (const Matrix< Type > &) const
bool operator== (const Type &) const
bool operator!= (const Matrix< Type > &) const
bool operator!= (const Type &) const
bool operator> (const Matrix< Type > &) const
bool operator> (const Type &) const
bool operator< (const Matrix< Type > &) const
bool operator< (const Type &) const
bool operator>= (const Matrix< Type > &) const
bool operator>= (const Type &) const
bool operator<= (const Matrix< Type > &) const
bool operator<= (const Type &) const
int get_rows_number (void) const
int get_columns_number (void) const
Vector< Type > get_row (int) const
Vector< Type > get_column (int) const
Matrix< Type > get_submatrix (const Vector< int > &, const Vector< int > &) const
Vector< Type > get_diagonal (void) const
bool get_display (void) const
void set (void)
void set (int, int)
void set (int, int, const Type &)
void set (const Matrix &)
void set (const char *)
void set_row (int, const Vector< Type > &) const
void set_column (int, const Vector< Type > &) const
void set_rows_number (int)
void set_columns_number (int)
void set_display (bool)
void resize (int, int)
void add_row (const Vector< Type > &)
void add_column (const Vector< Type > &)
void subtract_row (int)
void subtract_column (int)
void initialize (const Type &) const
void initialize_uniform (void)
void initialize_uniform (double, double)
void initialize_uniform (const Matrix< double > &, const Matrix< double > &)
void initialize_normal (void)
void initialize_normal (double, double)
void initialize_normal (const Matrix< double > &, const Matrix< double > &)
void set_to_identity (void) const
Vector< Type > dot (const Vector< Type > &) const
Matrix< Type > dot (const Matrix< Type > &) const
Vector< Vector< double > > calculate_mean_standard_deviation (void) const
Vector< Vector< double > > calculate_mean_standard_deviation (const Vector< int > &) const
Vector< Vector< double > > calculate_mean_standard_deviation (const Vector< int > &, const Vector< int > &) const
Vector< Vector< Type > > calculate_minimum_maximum (void) const
Vector< Vector< Type > > calculate_minimum_maximum (const Vector< int > &) const
Vector< Vector< Type > > calculate_minimum_maximum (const Vector< int > &, const Vector< int > &) const
Type calculate_determinant (void) const
Matrix< Type > calculate_transpose (void) const
Matrix< Type > calculate_cofactor (void) const
Matrix< Type > calculate_inverse (void) const
bool is_symmetric (void) const
bool is_antisymmetric (void) const
void scale_mean_standard_deviation (const Vector< double > &, const Vector< double > &)
void scale_minimum_maximum (const Vector< double > &, const Vector< double > &)
void unscale_mean_standard_deviation (const Vector< double > &, const Vector< double > &)
void unscale_minimum_maximum (const Vector< double > &, const Vector< double > &)
std::string to_XML (bool)
void print (void)
void print_data (void)
void save (const char *)
void save_data (const char *)
void load (const char *)
void load_data (const char *)


Detailed Description

template<class Type>
class Flood::Matrix< Type >

This template class defines a matrix for general purpose use. This matrix also implements some mathematical methods which can be useful.

Definition at line 39 of file Matrix.h.


Constructor & Destructor Documentation

template<class Type >
Flood::Matrix< Type >::Matrix ( void   )  [inline, explicit]

Default constructor. It creates a matrix with zero rows and zero columns.

Definition at line 251 of file Matrix.h.

template<class Type >
Flood::Matrix< Type >::Matrix ( int  new_rows_number,
int  new_columns_number 
) [inline, explicit]

Constructor. It creates a matrix with n rows and m columns, containing n*m copies of the default value for Type.

Parameters:
new_rows_number Number of rows in matrix.
new_columns_number Number of columns in matrix.

Definition at line 266 of file Matrix.h.

template<class Type>
Flood::Matrix< Type >::Matrix ( int  new_rows_number,
int  new_columns_number,
const Type &  type 
) [inline, explicit]

Constructor. It creates a matrix with n rows and m columns, containing n*m copies of the type value of Type.

Parameters:
new_rows_number Number of rows in matrix.
new_columns_number Number of columns in matrix.
type Value of Type.

Definition at line 337 of file Matrix.h.

template<class Type>
Flood::Matrix< Type >::Matrix ( const char *  filename  )  [inline, explicit]

File constructor. It creates a matrix which members are loaded froma a XML-type file.

Parameters:
filename Name of matrix XML-type file.

Definition at line 418 of file Matrix.h.

template<class Type>
Flood::Matrix< Type >::Matrix ( const Matrix< Type > &  other_matrix  )  [inline]

Copy constructor. It creates a copy of an existing matrix.

Parameters:
other_matrix Matrix to be copied.

Definition at line 433 of file Matrix.h.

template<class Type >
Flood::Matrix< Type >::~Matrix ( void   )  [inline, virtual]

Destructor.

Definition at line 515 of file Matrix.h.


Member Function Documentation

template<class Type>
void Flood::Matrix< Type >::add_column ( const Vector< Type > &  new_column  )  [inline]

This method appends a new column to the matrix. The size of the column vector must be equal to the number of rows of the matrix. Note that resizing is necessary here and therefore this method can be very inefficient.

Parameters:
new_column Column to be appended.

Definition at line 1781 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::add_row ( const Vector< Type > &  new_row  )  [inline]

This method appends a new row to the matrix. The size of the row vector must be equal to the number of columns of the matrix. Note that resizing is necessary here and therefore this method can be very inefficient.

Parameters:
new_row Row to be appended.

Definition at line 1750 of file Matrix.h.

template<class Type >
Matrix< Type > Flood::Matrix< Type >::calculate_cofactor ( void   )  const [inline]

This method returns the cofactor matrix.

Definition at line 2965 of file Matrix.h.

template<class Type >
Type Flood::Matrix< Type >::calculate_determinant ( void   )  const [inline]

This method returns the determinant of a square matrix.

Definition at line 2888 of file Matrix.h.

template<class Type >
Matrix< Type > Flood::Matrix< Type >::calculate_inverse ( void   )  const [inline]

This method returns the inverse of a square matrix. An error message is printed if the matrix is singular.

Definition at line 3017 of file Matrix.h.

template<class Type >
Vector< Vector< double > > Flood::Matrix< Type >::calculate_mean_standard_deviation ( const Vector< int > &  row_indices,
const Vector< int > &  column_indices 
) const [inline]

This method returns a vector of vectors with the mean and standard deviation values of given columns for given rows. The size of the vector is two. The size of each element is equal to the size of the column indices vector.

Parameters:
row_indices Indices of rows.
column_indices Indices of columns.

Definition at line 2313 of file Matrix.h.

template<class Type >
Vector< Vector< double > > Flood::Matrix< Type >::calculate_mean_standard_deviation ( const Vector< int > &  column_indices  )  const [inline]

This method returns a vector of vectors with the mean and standard deviation values of given columns. The size of the vector is two. The size of each element is equal to the size of the column indices vector.

Parameters:
column_indices Indices of columns.

Definition at line 2234 of file Matrix.h.

template<class Type >
Vector< Vector< double > > Flood::Matrix< Type >::calculate_mean_standard_deviation ( void   )  const [inline]

This method returns a vector of vectors with the mean and standard deviation values of all the matrix columns. The size of the vector is two. The size of each element is equal to the number of columns in the matrix.

Definition at line 2166 of file Matrix.h.

template<class Type >
Vector< Vector< Type > > Flood::Matrix< Type >::calculate_minimum_maximum ( const Vector< int > &  row_indices,
const Vector< int > &  column_indices 
) const [inline]

This method returns a vector of vectors with the minimum and maximum values of given columns for given rows. The size of the vector is two. The size of each element is equal to the size of the column indices vector.

Parameters:
row_indices Indices of rows.
column_indices Indices of columns.

Definition at line 2568 of file Matrix.h.

template<class Type >
Vector< Vector< Type > > Flood::Matrix< Type >::calculate_minimum_maximum ( const Vector< int > &  column_indices  )  const [inline]

This method returns a vector of vectors with the minimum and maximum values of given columns. The size of the vector is two. The size of each element is equal to the size of the column indices vector.

Parameters:
column_indices Indices of columns.

Definition at line 2496 of file Matrix.h.

template<class Type >
Vector< Vector< Type > > Flood::Matrix< Type >::calculate_minimum_maximum ( void   )  const [inline]

This method returns a vector of vectors with the minimum and maximum values of all the matrix columns. The size of the vector is two. The size of each element is equal to the number of columns in the matrix.

Definition at line 2456 of file Matrix.h.

template<class Type >
Matrix< Type > Flood::Matrix< Type >::calculate_transpose ( void   )  const [inline]

This method returns the transpose of the matrix.

Definition at line 2867 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::dot ( const Matrix< Type > &  other_matrix  )  const [inline]

This method returns the dot product of this matrix with another matrix.

Parameters:
other_matrix Matrix to be multiplied to this matrix.

Definition at line 3360 of file Matrix.h.

template<typename Type>
Vector< Type > Flood::Matrix< Type >::dot ( const Vector< Type > &  vector  )  const [inline]

This method returns the dot product of this matrix with a vector. The size of the vector must be equal to the number of columns of the matrix.

Parameters:
vector Vector to be multiplied to this matrix.

Definition at line 3316 of file Matrix.h.

template<class Type >
Vector< Type > Flood::Matrix< Type >::get_column ( int  j  )  const [inline]

This method returns the column j of the matrix.

Parameters:
j Index of column.

Definition at line 1608 of file Matrix.h.

template<class Type >
int Flood::Matrix< Type >::get_columns_number ( void   )  const [inline]

This method returns the number of columns in the matrix.

Definition at line 1109 of file Matrix.h.

template<class Type >
Vector< Type > Flood::Matrix< Type >::get_diagonal ( void   )  const [inline]

This method returns the diagonal of the matrix.

Definition at line 1626 of file Matrix.h.

template<class Type >
bool Flood::Matrix< Type >::get_display ( void   )  const [inline]

This method returns true if messages from this class are to be displayed on the screen, and false otherwise.

Definition at line 1120 of file Matrix.h.

template<class Type >
Vector< Type > Flood::Matrix< Type >::get_row ( int  i  )  const [inline]

This method returns the row i of the matrix.

Parameters:
i Index of row.

Definition at line 1589 of file Matrix.h.

template<class Type >
int Flood::Matrix< Type >::get_rows_number ( void   )  const [inline]

This method returns the number of rows in the matrix.

Definition at line 1098 of file Matrix.h.

template<class Type >
Matrix< Type > Flood::Matrix< Type >::get_submatrix ( const Vector< int > &  row_indices,
const Vector< int > &  column_indices 
) const [inline]

This method returns a matrix with the values of given rows and columns from this matrix.

Parameters:
row_indices Indices of matrix rows.
column_indices Indices of matrix columns.

Definition at line 1556 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::initialize ( const Type &  value  )  const [inline]

This method initializes all the elements of the matrix with a given value.

Parameters:
value Type value.

Definition at line 1930 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_normal ( const Matrix< double > &  mean,
const Matrix< double > &  standard_deviation 
) [inline]

This method assigns random values to each element in the vector, taken from normal distributions with given means and standard deviations for each element.

Parameters:
mean Mean values of uniform distributions.
standard_deviation Standard deviation values of uniform distributions.

Definition at line 2091 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_normal ( double  mean,
double  standard_deviation 
) [inline]

This method assigns random values to each element in the matrix, taken from a normal distribution with a given mean and a given standard deviation.

Parameters:
mean Mean value of uniform distribution.
standard_deviation Standard deviation value of uniform distribution.

Definition at line 2056 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_normal ( void   )  [inline]

This method assigns random values to each element in the matrix, taken from a normal distribution with mean 0 and standard deviation 1.

Definition at line 2036 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_uniform ( const Matrix< double > &  minimum,
const Matrix< double > &  maximum 
) [inline]

This method initializes all the elements in the matrix with random values comprised between a minimum and a maximum values for each element.

Parameters:
minimum Minimum possible values.
maximum Maximum possible values.

Definition at line 2002 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_uniform ( double  minimum,
double  maximum 
) [inline]

This method initializes all the elements in the matrix with random values comprised between a minimum and a maximum values.

Parameters:
minimum Minimum possible value.
maximum Maximum possible value.

Definition at line 1967 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::initialize_uniform ( void   )  [inline]

This method initializes all the elements in the matrix with random values comprised between -1 and 1.

Definition at line 1947 of file Matrix.h.

template<typename Type >
bool Flood::Matrix< Type >::is_antisymmetric ( void   )  const [inline]

This method returns true if this matrix is antysymmetric. A symmetric matrix is a squared matrix which its opposed is equal to its transpose.

Definition at line 3435 of file Matrix.h.

template<typename Type >
bool Flood::Matrix< Type >::is_symmetric ( void   )  const [inline]

This method returns true if this matrix is symmetric. A symmetric matrix is a squared matrix which is equal to its transpose.

Definition at line 3395 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::load ( const char *  filename  )  [inline]

This method loads the numbers of rows and columns and the values of the matrix from a XML-type file.

Parameters:
filename Filename.

Definition at line 3608 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::load_data ( const char *  filename  )  [inline]

This method loads the matrix data from a file.

Parameters:
filename Filename.

Definition at line 3770 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator!= ( const Type &  value  )  const [inline]

Not equivalent relational operator between this matrix and a Type value. It produces true if some element of this matrix is not equal to the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 772 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator!= ( const Matrix< Type > &  other_matrix  )  const [inline]

Not equivalent relational operator between this matrix and other matrix. It produces true if the two matrices have any not equal element, and false otherwise.

Parameters:
other_matrix Matrix to be compared with.

Definition at line 722 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator* ( const Matrix< Type > &  other_matrix  )  const [inline]

Product matrix+matrix arithmetic operator.

Parameters:
other_matrix Matrix to be multiplied to this vector.

Definition at line 3213 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator* ( const Type &  scalar  )  const [inline]

Product matrix*scalar arithmetic operator.

Parameters:
scalar Scalar value to be multiplied to this matrix.

Definition at line 3191 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator+ ( const Matrix< Type > &  other_matrix  )  const [inline]

Sum matrix+matrix arithmetic operator.

Parameters:
other_matrix Matrix to be added to this vector.

Definition at line 3089 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator+ ( const Type &  scalar  )  const [inline]

Sum matrix+scalar arithmetic operator.

Parameters:
scalar Scalar value to be added to this vector.

Definition at line 3067 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator- ( const Matrix< Type > &  other_matrix  )  const [inline]

Difference matrix-matrix arithmetic operator.

Parameters:
other_matrix Matrix to be subtracted to this matrix.

Definition at line 3151 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator- ( const Type &  scalar  )  const [inline]

Difference matrix-scalar arithmetic operator.

Parameters:
scalar Scalar value to be subtracted to this matrix.

Definition at line 3129 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator/ ( const Matrix< Type > &  other_matrix  )  const [inline]

Cocient matrix/matrix arithmetic operator.

Parameters:
other_matrix Matrix to be divided to this vector.

Definition at line 3275 of file Matrix.h.

template<typename Type>
Matrix< Type > Flood::Matrix< Type >::operator/ ( const Type &  scalar  )  const [inline]

Cocient Matrix/scalar arithmetic operator.

Parameters:
scalar Value of scalar.

Definition at line 3253 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator< ( const Type &  value  )  const [inline]

Less than relational operator between this matrix and a Type value. It produces true if all the elements of this matrix are less than the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 924 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator< ( const Matrix< Type > &  other_matrix  )  const [inline]

Less than relational operator between this matrix and other matrix. It produces true if all the elements of this matrix are less than the corresponding elements of the other matrix, and false otherwise.

Parameters:
other_matrix Matrix to be compared with.

Definition at line 874 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator<= ( const Type &  value  )  const [inline]

Less than or equal to than relational operator between this matrix and a Type value. It produces true if all the elements of this matrix are less than or equal to the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 1074 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator<= ( const Matrix< Type > &  other_matrix  )  const [inline]

Less than or equal to relational operator between this matrix and other matrix. It produces true if all the elements of this matrix are less than or equal to the corresponding elements of the other matrix, and false otherwise.

Parameters:
other_matrix Matrix to be compared with.

Definition at line 1024 of file Matrix.h.

template<class Type>
Matrix< Type > & Flood::Matrix< Type >::operator= ( const Matrix< Type > &  other_matrix  )  [inline]

Assignment operator. It assigns to self a copy of an existing matrix.

Parameters:
other_matrix Matrix to be assigned.

Definition at line 531 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator== ( const Type &  value  )  const [inline]

Equivalent relational operator between this matrix and a Type value. It produces true if all the elements of this matrix are equal to the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 698 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator== ( const Matrix< Type > &  other_matrix  )  const [inline]

Equivalent relational operator between this matrix and other matrix. It produces true if all the elements of the two matrices are equal, and false otherwise.

Parameters:
other_matrix Matrix to be compared with.

Definition at line 648 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator> ( const Type &  value  )  const [inline]

Greater than relational operator between this matrix and a Type value. It produces true if all the elements of this matrix are greater than the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 849 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator> ( const Matrix< Type > &  other_matrix  )  const [inline]

Greater than relational operator between this matrix and other vector. It produces true if all the elements of this matrix are greater than the corresponding elements of the other matrix, and false otherwise.

Parameters:
other_matrix matrix to be compared with.

Definition at line 799 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator>= ( const Type &  value  )  const [inline]

Greater than or equal to than relational operator between this matrix and a Type value. It produces true if all the elements of this matrix are greater than or equal to the Type value, and false otherwise.

Parameters:
value Type value to be compared with.

Definition at line 999 of file Matrix.h.

template<typename Type>
bool Flood::Matrix< Type >::operator>= ( const Matrix< Type > &  other_matrix  )  const [inline]

Greater than or equal to relational operator between this matrix and other matrix. It produces true if all the elements of this matrix are greater than or equal to the corresponding elements of the other matrix, and false otherwise.

Parameters:
other_matrix Matrix to be compared with.

Definition at line 949 of file Matrix.h.

template<class Type >
const Type * Flood::Matrix< Type >::operator[] ( int  i  )  const [inline]

Reference operator.

Definition at line 609 of file Matrix.h.

template<class Type >
Type * Flood::Matrix< Type >::operator[] ( int  i  )  [inline]

Reference operator.

Definition at line 574 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::print ( void   )  [inline]

This method prints to the screen in XML-type format the members of the matrix object.

Definition at line 3577 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::print_data ( void   )  [inline]

This method prints to the screen the matrix elements.

Definition at line 3588 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::resize ( int  new_rows_number,
int  new_columns_number 
) [inline]

This method sets new numbers of rows and columns in the vector. It does initialize the new matrix with the previous values.

Parameters:
new_rows_number New number of rows.
new_columns_number New number of columns.

Definition at line 1426 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::save ( const char *  filename  )  [inline]

This method saves the numbers of rows and columns and the values of the matrix to a XML-type file.

Parameters:
filename Filename.

Definition at line 3808 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::save_data ( const char *  filename  )  [inline]

This method saves the the matrix data to a file.

Parameters:
filename Filename.

Definition at line 3842 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::scale_mean_standard_deviation ( const Vector< double > &  mean,
const Vector< double > &  standard_deviation 
) [inline]

This method scales the matrix elements with given mean and standard deviation values. It updates the data in the matrix. The size of the mean and standard deviation vectors must be equal to the number of columns in the matrix.

Parameters:
mean Mean values.
standard_deviation Standard deviation values.

Definition at line 2619 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::scale_minimum_maximum ( const Vector< double > &  minimum,
const Vector< double > &  maximum 
) [inline]

This method scales the matrix elements with given minimum and maximum values. It updates the data in the matrix. The size of the minimum and maximum vectors must be equal to the number of columns in the matrix.

Parameters:
minimum Minimum values.
maximum Maximum values.

Definition at line 2683 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::set ( const char *  filename  )  [inline]

This method sets the members of this object by loading them from a XML-type file.

Parameters:
filename Name of XML-type matrix file.

Definition at line 1306 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::set ( const Matrix< Type > &  other_matrix  )  [inline]

This method sets all the members of the matrix to those of another matrix.

Parameters:
other_matrix Setting matrix.

Definition at line 1295 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::set ( int  new_rows_number,
int  new_columns_number,
const Type &  value 
) [inline]

This method set new numbers of rows and columns in the matrix. It also initializes all the matrix elements to a given value.

Parameters:
new_rows_number Number of rows.
new_columns_number Number of columns.
value Initialization value.

Definition at line 1232 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set ( int  new_rows_number,
int  new_columns_number 
) [inline]

This method set new numbers of rows and columns in the matrix.

Parameters:
new_rows_number Number of rows.
new_columns_number Number of columns.

Definition at line 1152 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set ( void   )  [inline]

This method set the numbers of rows and columns of the matrix to zero.

Definition at line 1131 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::set_column ( int  column_index,
const Vector< Type > &  new_column 
) const [inline]

This method sets new values of a single column in the matrix.

Parameters:
column_index Index of column.
new_column New values of single column.

Definition at line 1705 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set_columns_number ( int  new_columns_number  )  [inline]

This method sets a new number of columns in the matrix.

Parameters:
new_columns_number Number of matrix columns.

Definition at line 1387 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set_display ( bool  new_display  )  [inline]

This method sets a new display value.

Parameters:
new_display Display value.

Definition at line 1412 of file Matrix.h.

template<class Type>
void Flood::Matrix< Type >::set_row ( int  row_index,
const Vector< Type > &  new_row 
) const [inline]

This method sets new values of a single row in the matrix.

Parameters:
row_index Index of row.
new_row New values of single row.

Definition at line 1661 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set_rows_number ( int  new_rows_number  )  [inline]

This method sets a new number of rows in the matrix.

Parameters:
new_rows_number Number of matrix rows.

Definition at line 1318 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::set_to_identity ( void   )  const [inline]

This method sets the diagonal elements in the matrix with ones and the rest elements with zeros. The matrix must be square.

Definition at line 2125 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::subtract_column ( int  column_index  )  [inline]

This method removes the column with given index. Note that resizing is here necessary and this method can be very inefficient.

Parameters:
column_index Index of column to be removed.

Definition at line 1871 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::subtract_row ( int  row_index  )  [inline]

This method removes the row with given index. Note that resizing is here necessary and this method can be very inefficient.

Parameters:
row_index Index of row to be removed.

Definition at line 1811 of file Matrix.h.

template<class Type >
std::string Flood::Matrix< Type >::to_XML ( bool  show_declaration  )  [inline]

Parameters:
show_declaration True if an XML-type declaration is to be included at the beginning.

Definition at line 3524 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::unscale_mean_standard_deviation ( const Vector< double > &  mean,
const Vector< double > &  standard_deviation 
) [inline]

This method unscales the matrix elements with given mean and standard deviation values. It updates the matrix elements. The size of the mean and standard deviation vectors must be equal to the number of columns in the matrix.

Parameters:
mean Mean values.
standard_deviation Standard deviation values.

Definition at line 2747 of file Matrix.h.

template<class Type >
void Flood::Matrix< Type >::unscale_minimum_maximum ( const Vector< double > &  minimum,
const Vector< double > &  maximum 
) [inline]

This method unscales the matrix elements with given minimum and maximum values. It updates the matrix elements. The size of the minimum and maximum vectors must be equal to the number of columns in the matrix.

Parameters:
minimum Minimum values.
maximum Maximum deviation values.

Definition at line 2809 of file Matrix.h.


The documentation for this class was generated from the following file:

Generated on Fri Jul 30 09:52:01 2010 for Flood by  doxygen 1.5.9