#include <Matrix.h>
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 *) |
Definition at line 39 of file Matrix.h.
Flood::Matrix< Type >::Matrix | ( | void | ) | [inline, explicit] |
Flood::Matrix< Type >::Matrix | ( | int | new_rows_number, | |
int | new_columns_number | |||
) | [inline, explicit] |
Flood::Matrix< Type >::Matrix | ( | int | new_rows_number, | |
int | new_columns_number, | |||
const Type & | type | |||
) | [inline, explicit] |
Flood::Matrix< Type >::Matrix | ( | const char * | filename | ) | [inline, explicit] |
Flood::Matrix< Type >::Matrix | ( | const Matrix< Type > & | other_matrix | ) | [inline] |
Flood::Matrix< Type >::~Matrix | ( | void | ) | [inline, virtual] |
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.
new_column | Column to be appended. |
void Flood::Matrix< Type >::add_row | ( | const Vector< Type > & | new_row | ) | [inline] |
Matrix< Type > Flood::Matrix< Type >::calculate_cofactor | ( | void | ) | const [inline] |
Type Flood::Matrix< Type >::calculate_determinant | ( | void | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::calculate_inverse | ( | void | ) | const [inline] |
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.
row_indices | Indices of rows. | |
column_indices | Indices of columns. |
Vector< Vector< double > > Flood::Matrix< Type >::calculate_mean_standard_deviation | ( | const Vector< int > & | column_indices | ) | const [inline] |
Vector< Vector< double > > Flood::Matrix< Type >::calculate_mean_standard_deviation | ( | void | ) | const [inline] |
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.
row_indices | Indices of rows. | |
column_indices | Indices of columns. |
Vector< Vector< Type > > Flood::Matrix< Type >::calculate_minimum_maximum | ( | const Vector< int > & | column_indices | ) | const [inline] |
Vector< Vector< Type > > Flood::Matrix< Type >::calculate_minimum_maximum | ( | void | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::calculate_transpose | ( | void | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::dot | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Vector< Type > Flood::Matrix< Type >::dot | ( | const Vector< Type > & | vector | ) | const [inline] |
Vector< Type > Flood::Matrix< Type >::get_column | ( | int | j | ) | const [inline] |
int Flood::Matrix< Type >::get_columns_number | ( | void | ) | const [inline] |
Vector< Type > Flood::Matrix< Type >::get_diagonal | ( | void | ) | const [inline] |
bool Flood::Matrix< Type >::get_display | ( | void | ) | const [inline] |
Vector< Type > Flood::Matrix< Type >::get_row | ( | int | i | ) | const [inline] |
int Flood::Matrix< Type >::get_rows_number | ( | void | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::get_submatrix | ( | const Vector< int > & | row_indices, | |
const Vector< int > & | column_indices | |||
) | const [inline] |
void Flood::Matrix< Type >::initialize | ( | const Type & | value | ) | const [inline] |
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.
mean | Mean values of uniform distributions. | |
standard_deviation | Standard deviation values of uniform distributions. |
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.
mean | Mean value of uniform distribution. | |
standard_deviation | Standard deviation value of uniform distribution. |
void Flood::Matrix< Type >::initialize_normal | ( | void | ) | [inline] |
void Flood::Matrix< Type >::initialize_uniform | ( | const Matrix< double > & | minimum, | |
const Matrix< double > & | maximum | |||
) | [inline] |
void Flood::Matrix< Type >::initialize_uniform | ( | double | minimum, | |
double | maximum | |||
) | [inline] |
void Flood::Matrix< Type >::initialize_uniform | ( | void | ) | [inline] |
bool Flood::Matrix< Type >::is_antisymmetric | ( | void | ) | const [inline] |
bool Flood::Matrix< Type >::is_symmetric | ( | void | ) | const [inline] |
void Flood::Matrix< Type >::load | ( | const char * | filename | ) | [inline] |
void Flood::Matrix< Type >::load_data | ( | const char * | filename | ) | [inline] |
bool Flood::Matrix< Type >::operator!= | ( | const Type & | value | ) | const [inline] |
bool Flood::Matrix< Type >::operator!= | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator* | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator* | ( | const Type & | scalar | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator+ | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator+ | ( | const Type & | scalar | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator- | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator- | ( | const Type & | scalar | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator/ | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
Matrix< Type > Flood::Matrix< Type >::operator/ | ( | const Type & | scalar | ) | const [inline] |
bool Flood::Matrix< Type >::operator< | ( | const Type & | value | ) | const [inline] |
bool Flood::Matrix< Type >::operator< | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
bool Flood::Matrix< Type >::operator<= | ( | const Type & | value | ) | const [inline] |
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.
other_matrix | Matrix to be compared with. |
Matrix< Type > & Flood::Matrix< Type >::operator= | ( | const Matrix< Type > & | other_matrix | ) | [inline] |
bool Flood::Matrix< Type >::operator== | ( | const Type & | value | ) | const [inline] |
bool Flood::Matrix< Type >::operator== | ( | const Matrix< Type > & | other_matrix | ) | const [inline] |
bool Flood::Matrix< Type >::operator> | ( | const Type & | value | ) | const [inline] |
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.
other_matrix | matrix to be compared with. |
bool Flood::Matrix< Type >::operator>= | ( | const Type & | value | ) | const [inline] |
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.
other_matrix | Matrix to be compared with. |
const Type * Flood::Matrix< Type >::operator[] | ( | int | i | ) | const [inline] |
Type * Flood::Matrix< Type >::operator[] | ( | int | i | ) | [inline] |
void Flood::Matrix< Type >::print | ( | void | ) | [inline] |
void Flood::Matrix< Type >::print_data | ( | void | ) | [inline] |
void Flood::Matrix< Type >::resize | ( | int | new_rows_number, | |
int | new_columns_number | |||
) | [inline] |
void Flood::Matrix< Type >::save | ( | const char * | filename | ) | [inline] |
void Flood::Matrix< Type >::save_data | ( | const char * | filename | ) | [inline] |
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.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
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.
minimum | Minimum values. | |
maximum | Maximum values. |
void Flood::Matrix< Type >::set | ( | const char * | filename | ) | [inline] |
void Flood::Matrix< Type >::set | ( | const Matrix< Type > & | other_matrix | ) | [inline] |
void Flood::Matrix< Type >::set | ( | int | new_rows_number, | |
int | new_columns_number, | |||
const Type & | value | |||
) | [inline] |
void Flood::Matrix< Type >::set | ( | int | new_rows_number, | |
int | new_columns_number | |||
) | [inline] |
void Flood::Matrix< Type >::set | ( | void | ) | [inline] |
void Flood::Matrix< Type >::set_column | ( | int | column_index, | |
const Vector< Type > & | new_column | |||
) | const [inline] |
void Flood::Matrix< Type >::set_columns_number | ( | int | new_columns_number | ) | [inline] |
void Flood::Matrix< Type >::set_display | ( | bool | new_display | ) | [inline] |
void Flood::Matrix< Type >::set_row | ( | int | row_index, | |
const Vector< Type > & | new_row | |||
) | const [inline] |
void Flood::Matrix< Type >::set_rows_number | ( | int | new_rows_number | ) | [inline] |
void Flood::Matrix< Type >::set_to_identity | ( | void | ) | const [inline] |
void Flood::Matrix< Type >::subtract_column | ( | int | column_index | ) | [inline] |
void Flood::Matrix< Type >::subtract_row | ( | int | row_index | ) | [inline] |
std::string Flood::Matrix< Type >::to_XML | ( | bool | show_declaration | ) | [inline] |
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.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
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.
minimum | Minimum values. | |
maximum | Maximum deviation values. |