OpenNN
2.2
Open Neural Networks Library
|
#include <matrix.h>
Public Member Functions | |
Matrix (void) | |
Matrix (const size_t &, const size_t &) | |
Matrix (const size_t &, const size_t &, const T &) | |
Matrix (const std::string &) | |
Matrix (const Matrix &) | |
virtual | ~Matrix (void) |
Matrix< T > & | operator= (const Matrix< T > &) |
T & | operator() (const size_t &, const size_t &) |
const T & | operator() (const size_t &, const size_t &) const |
bool | operator== (const Matrix< T > &) const |
bool | operator== (const T &) const |
bool | operator!= (const Matrix< T > &) const |
bool | operator!= (const T &value) const |
bool | operator> (const Matrix< T > &) const |
bool | operator> (const T &value) const |
bool | operator< (const Matrix< T > &) const |
bool | operator< (const T &value) const |
bool | operator>= (const Matrix< T > &) const |
bool | operator>= (const T &) const |
bool | operator<= (const Matrix< T > &) const |
bool | operator<= (const T &) const |
const size_t & | get_rows_number (void) const |
const size_t & | get_columns_number (void) const |
void | set (void) |
void | set (const size_t &, const size_t &) |
void | set (const size_t &, const size_t &, const T &) |
void | set (const Matrix< T > &) |
void | set (const std::string &) |
void | set_identity (const size_t &) |
void | set_rows_number (const size_t &) |
void | set_columns_number (const size_t &) |
void | tuck_in (const size_t &, const size_t &, const Matrix< T > &) |
size_t | count_diagonal_elements (void) const |
size_t | count_off_diagonal_elements (void) const |
Matrix< T > | arrange_submatrix (const Vector< size_t > &, const Vector< size_t > &) const |
Matrix< T > | arrange_submatrix_rows (const Vector< size_t > &) const |
Matrix< T > | arrange_submatrix_columns (const Vector< size_t > &) const |
Vector< T > | arrange_row (const size_t &) const |
Vector< T > | arrange_row (const size_t &, const Vector< size_t > &) const |
Vector< T > | arrange_column (const size_t &) const |
Vector< T > | arrange_column (const size_t &, const Vector< size_t > &) const |
Vector< T > | get_diagonal (void) const |
void | set_row (const size_t &, const Vector< T > &) |
void | set_row (const size_t &, const T &) |
void | set_column (const size_t &, const Vector< T > &) |
void | set_column (const size_t &, const T &) |
void | set_diagonal (const T &) |
void | set_diagonal (const Vector< T > &) |
void | initialize_diagonal (const size_t &, const T &) |
void | initialize_diagonal (const size_t &, const Vector< T > &) |
Matrix< T > | sum_diagonal (const T &) const |
Matrix< T > | sum_diagonal (const Vector< T > &) const |
void | append_row (const Vector< T > &) |
void | append_column (const Vector< T > &) |
void | insert_row (const size_t &, const Vector< T > &) |
void | insert_column (const size_t &, const Vector< T > &) |
void | subtract_row (const size_t &) |
void | subtract_column (const size_t &) |
Matrix< T > | assemble_rows (const Matrix< T > &) const |
Matrix< T > | assemble_columns (const Matrix< T > &) const |
void | sort_less (const size_t &) |
void | sort_greater (const size_t &) |
void | initialize (const T &) |
void | randomize_uniform (const double &=-1.0, const double &=1.0) |
void | randomize_uniform (const Matrix< double > &, const Matrix< double > &) |
void | randomize_normal (const double &=0.0, const double &=1.0) |
void | randomize_normal (const Matrix< double > &, const Matrix< double > &) |
void | initialize_identity (void) |
void | initialize_diagonal (const T &) |
T | calculate_sum (void) const |
Vector< T > | calculate_rows_sum (void) const |
void | sum_row (const size_t &, const Vector< T > &) |
double | calculate_trace (void) const |
Vector< double > | calculate_mean (void) const |
double | calculate_mean (const size_t &) const |
Vector< double > | calculate_mean (const Vector< size_t > &) const |
Vector< double > | calculate_mean (const Vector< size_t > &, const Vector< size_t > &) const |
Vector< double > | calculate_mean_missing_values (const Vector< Vector< size_t > > &) const |
Vector< double > | calculate_mean_missing_values (const Vector< size_t > &, const Vector< size_t > &, const Vector< Vector< size_t > > &) const |
Vector< Vector< double > > | calculate_mean_standard_deviation (void) const |
Vector< Vector< double > > | calculate_mean_standard_deviation (const Vector< size_t > &) const |
Vector< Vector< double > > | calculate_mean_standard_deviation (const Vector< size_t > &, const Vector< size_t > &) const |
T | calculate_minimum (void) const |
T | calculate_maximum (void) const |
Vector< Vector< T > > | calculate_minimum_maximum (void) const |
Vector< Vector< T > > | calculate_minimum_maximum (const Vector< size_t > &) const |
Vector< Vector< T > > | calculate_minimum_maximum (const Vector< size_t > &, const Vector< size_t > &) const |
Vector< Statistics< T > > | calculate_statistics (void) const |
Vector< Statistics< T > > | calculate_statistics_missing_values (const Vector< Vector< size_t > > &) const |
Vector< Statistics< T > > | calculate_statistics (const Vector< size_t > &, const Vector< size_t > &) const |
Vector< Statistics< T > > | calculate_rows_statistics (const Vector< size_t > &) const |
Vector< Statistics< T > > | calculate_rows_statistics_missing_values (const Vector< size_t > &, const Vector< Vector< size_t > > &) const |
Vector< Statistics< T > > | calculate_columns_statistics (const Vector< size_t > &) const |
Vector< Statistics< T > > | calculate_columns_statistics_missing_values (const Vector< size_t > &, const Vector< Vector< size_t > >) const |
Vector< Histogram< T > > | calculate_histograms (const size_t &=10) const |
Vector< Histogram< T > > | calculate_histograms_missing_values (const Vector< Vector< size_t > > &, const size_t &=10) const |
Matrix< size_t > | calculate_less_than_indices (const T &) const |
Matrix< size_t > | calculate_greater_than_indices (const T &) const |
void | scale_mean_standard_deviation (const Vector< Statistics< T > > &) |
Vector< Statistics< T > > | scale_mean_standard_deviation (void) |
void | scale_rows_mean_standard_deviation (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | scale_columns_mean_standard_deviation (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | scale_minimum_maximum (const Vector< Statistics< T > > &) |
Vector< Statistics< T > > | scale_minimum_maximum (void) |
void | scale_rows_minimum_maximum (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | scale_columns_minimum_maximum (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | unscale_mean_standard_deviation (const Vector< Statistics< T > > &) |
void | unscale_rows_mean_standard_deviation (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | unscale_columns_mean_standard_deviation (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | unscale_minimum_maximum (const Vector< Statistics< T > > &) |
void | unscale_rows_minimum_maximum (const Vector< Statistics< T > > &, const Vector< size_t > &) |
void | unscale_columns_minimum_maximum (const Vector< Statistics< T > > &, const Vector< size_t > &) |
Vector< size_t > | calculate_minimal_indices (void) const |
Vector< size_t > | calculate_maximal_indices (void) const |
Vector< Vector< size_t > > | calculate_minimal_maximal_indices (void) const |
double | calculate_sum_squared_error (const Matrix< double > &) const |
double | calculate_sum_squared_error (const Vector< double > &) const |
Vector< double > | calculate_rows_norm (void) const |
Matrix< T > | calculate_absolute_value (void) const |
Matrix< T > | calculate_transpose (void) const |
T | calculate_determinant (void) const |
Matrix< T > | calculate_cofactor (void) const |
Matrix< T > | calculate_inverse (void) const |
Matrix< T > | operator+ (const T &) const |
Matrix< T > | operator+ (const Vector< T > &) const |
Matrix< T > | operator+ (const Matrix< T > &) const |
Matrix< T > | operator- (const T &scalar) const |
Matrix< T > | operator- (const Vector< T > &) const |
Matrix< T > | operator- (const Matrix< T > &) const |
Matrix< T > | operator* (const T &) const |
Matrix< T > | operator* (const Vector< T > &) const |
Matrix< T > | operator* (const Matrix< T > &) const |
Matrix< T > | operator/ (const T &) const |
Matrix< T > | operator/ (const Vector< T > &) const |
Matrix< T > | operator/ (const Matrix< T > &) const |
void | operator+= (const T &value) |
void | operator+= (const Matrix< T > &other_matrix) |
void | operator-= (const T &) |
void | operator-= (const Matrix< T > &) |
void | operator*= (const T &) |
void | operator*= (const Matrix< T > &) |
void | operator/= (const T &) |
void | operator/= (const Matrix< T > &) |
Vector< double > | dot (const Vector< double > &) const |
Matrix< double > | dot (const Matrix< double > &) const |
Matrix< T > | direct (const Matrix< T > &) const |
bool | empty (void) const |
bool | is_square (void) const |
bool | is_symmetric (void) const |
bool | is_antisymmetric (void) const |
bool | is_diagonal (void) const |
bool | is_scalar (void) const |
bool | is_identity (void) const |
Matrix< T > | filter (const size_t &, const T &, const T &) const |
void | convert_time_series (const size_t &) |
void | convert_autoassociation (void) |
void | convert_angular_variables_degrees (const size_t &) |
void | convert_angular_variables_radians (const size_t &) |
void | print (void) const |
void | load (const std::string &) |
void | save (const std::string &) const |
void | save_csv (const std::string &) const |
void | parse (const std::string &) |
std::string | to_string (const std::string &=" ") const |
Matrix< std::string > | write_string_matrix (const size_t &=3) const |
std::vector< T > | to_std_vector (void) const |
Vector< T > | to_vector (void) const |
void | print_preview (void) const |
Private Attributes | |
size_t | rows_number |
size_t | columns_number |
This template class defines a matrix for general purpose use. This matrix also implements some mathematical methods which can be useful.
|
explicit |
|
explicit |
|
explicit |
OpenNN::Matrix< T >::Matrix | ( | const Matrix< T > & | other_matrix | ) |
void OpenNN::Matrix< T >::append_column | ( | const Vector< T > & | new_column | ) |
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 OpenNN::Matrix< T >::append_row | ( | const Vector< T > & | new_row | ) |
Vector< T > OpenNN::Matrix< T >::arrange_column | ( | const size_t & | j | ) | const |
Vector< T > OpenNN::Matrix< T >::arrange_column | ( | const size_t & | column_index, |
const Vector< size_t > & | row_indices | ||
) | const |
Vector< T > OpenNN::Matrix< T >::arrange_row | ( | const size_t & | i | ) | const |
Vector< T > OpenNN::Matrix< T >::arrange_row | ( | const size_t & | row_index, |
const Vector< size_t > & | column_indices | ||
) | const |
Matrix< T > OpenNN::Matrix< T >::arrange_submatrix | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices | ||
) | const |
Matrix< T > OpenNN::Matrix< T >::arrange_submatrix_columns | ( | const Vector< size_t > & | column_indices | ) | const |
Matrix< T > OpenNN::Matrix< T >::arrange_submatrix_rows | ( | const Vector< size_t > & | row_indices | ) | const |
Matrix< T > OpenNN::Matrix< T >::assemble_columns | ( | const Matrix< T > & | other_matrix | ) | const |
Matrix< T > OpenNN::Matrix< T >::assemble_rows | ( | const Matrix< T > & | other_matrix | ) | const |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_columns_statistics | ( | const Vector< size_t > & | column_indices | ) | const |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_columns_statistics_missing_values | ( | const Vector< size_t > & | column_indices, |
const Vector< Vector< size_t > > | missing_indices | ||
) | const |
Returns the basic statistics of given columns when the matrix has missing values. The format is a vector of statistics structures. The size of that vector is equal to the number of given columns.
column_indices | Indices of the columns for which the statistics are to be computed. |
missing_indices | Vector of vectors with the indices of the missing values. |
Matrix< size_t > OpenNN::Matrix< T >::calculate_greater_than_indices | ( | const T & | value | ) | const |
Vector< Histogram< T > > OpenNN::Matrix< T >::calculate_histograms | ( | const size_t & | bins_number = 10 | ) | const |
Calculates a histogram for each column, each having a given number of bins. It returns a vector of vectors of vectors. The size of the main vector is the number of columns. Each subvector contains the frequencies and centers of that colums.
bins_number | Number of bins for each histogram. |
Vector< Histogram< T > > OpenNN::Matrix< T >::calculate_histograms_missing_values | ( | const Vector< Vector< size_t > > & | missing_indices, |
const size_t & | bins_number = 10 |
||
) | const |
Calculates a histogram for each column, each having a given number of bins, when the data has missing values. It returns a vector of vectors of vectors. The size of the main vector is the number of columns. Each subvector contains the frequencies and centers of that colums.
bins_number | Number of bins for each histogram. |
missing_indices | Vector of vectors with the indices of the missing values. |
Matrix< T > OpenNN::Matrix< T >::calculate_inverse | ( | void | ) | const |
Matrix< size_t > OpenNN::Matrix< T >::calculate_less_than_indices | ( | const T & | value | ) | const |
Vector< double > OpenNN::Matrix< T >::calculate_mean | ( | void | ) | const |
double OpenNN::Matrix< T >::calculate_mean | ( | const size_t & | column_index | ) | const |
Vector< double > OpenNN::Matrix< T >::calculate_mean | ( | const Vector< size_t > & | column_indices | ) | const |
Vector< double > OpenNN::Matrix< T >::calculate_mean | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices | ||
) | const |
Vector< double > OpenNN::Matrix< T >::calculate_mean_missing_values | ( | const Vector< Vector< size_t > > & | missing_indices | ) | const |
Returns a vector with the mean values of given columns for given rows when the matrix has missing values. The size of the vector is equal to the size of the column indices vector.
missing_indices | Vector of vectors with the indices of the missing values. |
Vector< double > OpenNN::Matrix< T >::calculate_mean_missing_values | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices, | ||
const Vector< Vector< size_t > > & | missing_indices | ||
) | const |
Returns a vector with the mean values of given columns for given rows when the matrix has missing values. The size of the vector is equal to the size of the column indices vector.
row_indices | Indices of rows. |
column_indices | Indices of columns. |
missing_indices | Vector of vectors with the indices of the missing values. |
Vector< Vector< double > > OpenNN::Matrix< T >::calculate_mean_standard_deviation | ( | void | ) | const |
Vector< Vector< double > > OpenNN::Matrix< T >::calculate_mean_standard_deviation | ( | const Vector< size_t > & | column_indices | ) | const |
Vector< Vector< double > > OpenNN::Matrix< T >::calculate_mean_standard_deviation | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices | ||
) | const |
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< size_t > > OpenNN::Matrix< T >::calculate_minimal_maximal_indices | ( | void | ) | const |
Returns the row and column indices corresponding to the entries with minimum and maximum values. The format is a vector of two vectors. Each subvector also has two elements. The first vector contains the minimal indices, and the second vector contains the maximal indices.
Vector< Vector< T > > OpenNN::Matrix< T >::calculate_minimum_maximum | ( | void | ) | const |
Vector< Vector< T > > OpenNN::Matrix< T >::calculate_minimum_maximum | ( | const Vector< size_t > & | column_indices | ) | const |
Vector< Vector< T > > OpenNN::Matrix< T >::calculate_minimum_maximum | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices | ||
) | const |
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< double > OpenNN::Matrix< T >::calculate_rows_norm | ( | void | ) | const |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_rows_statistics | ( | const Vector< size_t > & | row_indices | ) | const |
Returns the basic statistics of all the columns for given rows. The format is a vector of statistics structures. The size of that vector is equal to the number of columns in this matrix.
row_indices | Indices of the rows for which the statistics are to be computed. |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_rows_statistics_missing_values | ( | const Vector< size_t > & | row_indices, |
const Vector< Vector< size_t > > & | missing_indices | ||
) | const |
Returns the basic statistics of all the columns for given rows when the matrix has missing values. The format is a vector of statistics structures. The size of that vector is equal to the number of columns in this matrix.
row_indices | Indices of the rows for which the statistics are to be computed. |
missing_indices | Vector of vectors with the indices of the missing values. |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_statistics | ( | void | ) | const |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_statistics | ( | const Vector< size_t > & | row_indices, |
const Vector< size_t > & | column_indices | ||
) | const |
Returns the basic statistics of given columns for given rows. The format is a vector of statistics structures. The size of that vector is equal to the number of given columns.
row_indices | Indices of the rows for which the statistics are to be computed. |
column_indices | Indices of the columns for which the statistics are to be computed. |
Vector< Statistics< T > > OpenNN::Matrix< T >::calculate_statistics_missing_values | ( | const Vector< Vector< size_t > > & | missing_indices | ) | const |
Returns the basic statistics of the columns when the matrix has missing values. The format is a vector of statistics structures. The size of that vector is equal to the number of columns in this matrix.
missing_indices | Vector of vectors with the indices of the missing values. |
double OpenNN::Matrix< T >::calculate_sum_squared_error | ( | const Matrix< double > & | other_matrix | ) | const |
double OpenNN::Matrix< T >::calculate_sum_squared_error | ( | const Vector< double > & | vector | ) | const |
double OpenNN::Matrix< T >::calculate_trace | ( | void | ) | const |
void OpenNN::Matrix< T >::convert_angular_variables_degrees | ( | const size_t & | column_index | ) |
Converts a given column, representing angles in degrees, to two different columns with the sinus and the cosinus of the corresponding angles. Note that this method sets a new number of columns in the matrix.
column_index | Index of column to be converted. |
void OpenNN::Matrix< T >::convert_angular_variables_radians | ( | const size_t & | column_index | ) |
Converts a given column, representing angles in radians, to two different columns with the sinus and the cosinus of the corresponding angles. Note that this method sets a new number of columns in the matrix.
column_index | Index of column to be converted. |
void OpenNN::Matrix< T >::convert_autoassociation | ( | void | ) |
void OpenNN::Matrix< T >::convert_time_series | ( | const size_t & | lags_number | ) |
size_t OpenNN::Matrix< T >::count_diagonal_elements | ( | void | ) | const |
size_t OpenNN::Matrix< T >::count_off_diagonal_elements | ( | void | ) | const |
Matrix< T > OpenNN::Matrix< T >::direct | ( | const Matrix< T > & | other_matrix | ) | const |
Vector< double > OpenNN::Matrix< T >::dot | ( | const Vector< double > & | vector | ) | const |
Matrix< double > OpenNN::Matrix< T >::dot | ( | const Matrix< double > & | other_matrix | ) | const |
Matrix< T > OpenNN::Matrix< T >::filter | ( | const size_t & | column_index, |
const T & | minimum, | ||
const T & | maximum | ||
) | const |
void OpenNN::Matrix< T >::initialize | ( | const T & | value | ) |
void OpenNN::Matrix< T >::initialize_diagonal | ( | const size_t & | new_size, |
const T & | new_value | ||
) |
Sets this matrix to be diagonal. A diagonal matrix is a square matrix in which the entries outside the main diagonal are all zero. It also initializes the elements on the main diagonal to a unique given value.
new_size | Number of rows and colums in the matrix. |
new_value | Value of all the elements in the main diagonal. |
void OpenNN::Matrix< T >::initialize_diagonal | ( | const size_t & | new_size, |
const Vector< T > & | new_values | ||
) |
Sets this matrix to be diagonal. A diagonal matrix is a square matrix in which the entries outside the main diagonal are all zero. It also initializes the elements on the main diagonal to given values.
new_size | Number of rows and colums in the matrix. |
new_values | Values of the elements in the main diagonal. |
void OpenNN::Matrix< T >::initialize_diagonal | ( | const T & | value | ) |
void OpenNN::Matrix< T >::initialize_identity | ( | void | ) |
void OpenNN::Matrix< T >::insert_column | ( | const size_t & | position, |
const Vector< T > & | new_column | ||
) |
void OpenNN::Matrix< T >::insert_row | ( | const size_t & | position, |
const Vector< T > & | new_row | ||
) |
bool OpenNN::Matrix< T >::is_antisymmetric | ( | void | ) | const |
bool OpenNN::Matrix< T >::is_diagonal | ( | void | ) | const |
bool OpenNN::Matrix< T >::is_identity | ( | void | ) | const |
bool OpenNN::Matrix< T >::is_scalar | ( | void | ) | const |
bool OpenNN::Matrix< T >::is_square | ( | void | ) | const |
bool OpenNN::Matrix< T >::is_symmetric | ( | void | ) | const |
void OpenNN::Matrix< T >::load | ( | const std::string & | file_name | ) |
bool OpenNN::Matrix< T >::operator!= | ( | const Matrix< T > & | other_matrix | ) | const |
bool OpenNN::Matrix< T >::operator!= | ( | const T & | value | ) | const |
|
inline |
|
inline |
Matrix< T > OpenNN::Matrix< T >::operator* | ( | const T & | scalar | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator* | ( | const Vector< T > & | vector | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator* | ( | const Matrix< T > & | other_matrix | ) | const |
void OpenNN::Matrix< T >::operator*= | ( | const T & | value | ) |
void OpenNN::Matrix< T >::operator*= | ( | const Matrix< T > & | other_matrix | ) |
Matrix< T > OpenNN::Matrix< T >::operator+ | ( | const T & | scalar | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator+ | ( | const Vector< T > & | vector | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator+ | ( | const Matrix< T > & | other_matrix | ) | const |
void OpenNN::Matrix< T >::operator+= | ( | const T & | value | ) |
void OpenNN::Matrix< T >::operator+= | ( | const Matrix< T > & | other_matrix | ) |
Matrix< T > OpenNN::Matrix< T >::operator- | ( | const T & | scalar | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator- | ( | const Vector< T > & | vector | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator- | ( | const Matrix< T > & | other_matrix | ) | const |
void OpenNN::Matrix< T >::operator-= | ( | const T & | value | ) |
void OpenNN::Matrix< T >::operator-= | ( | const Matrix< T > & | other_matrix | ) |
Matrix< T > OpenNN::Matrix< T >::operator/ | ( | const T & | scalar | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator/ | ( | const Vector< T > & | vector | ) | const |
Matrix< T > OpenNN::Matrix< T >::operator/ | ( | const Matrix< T > & | other_matrix | ) | const |
void OpenNN::Matrix< T >::operator/= | ( | const T & | value | ) |
void OpenNN::Matrix< T >::operator/= | ( | const Matrix< T > & | other_matrix | ) |
bool OpenNN::Matrix< T >::operator< | ( | const Matrix< T > & | other_matrix | ) | const |
bool OpenNN::Matrix< T >::operator< | ( | const T & | value | ) | const |
bool OpenNN::Matrix< T >::operator<= | ( | const Matrix< T > & | other_matrix | ) | const |
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. |
bool OpenNN::Matrix< T >::operator<= | ( | const T & | value | ) | const |
|
inline |
bool OpenNN::Matrix< T >::operator== | ( | const Matrix< T > & | other_matrix | ) | const |
bool OpenNN::Matrix< T >::operator== | ( | const T & | value | ) | const |
bool OpenNN::Matrix< T >::operator> | ( | const Matrix< T > & | other_matrix | ) | const |
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 OpenNN::Matrix< T >::operator> | ( | const T & | value | ) | const |
bool OpenNN::Matrix< T >::operator>= | ( | const Matrix< T > & | other_matrix | ) | const |
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. |
bool OpenNN::Matrix< T >::operator>= | ( | const T & | value | ) | const |
void OpenNN::Matrix< T >::parse | ( | const std::string & | str | ) |
void OpenNN::Matrix< T >::print_preview | ( | void | ) | const |
void OpenNN::Matrix< T >::randomize_normal | ( | const double & | mean = 0.0 , |
const double & | standard_deviation = 1.0 |
||
) |
void OpenNN::Matrix< T >::randomize_normal | ( | const Matrix< double > & | mean, |
const Matrix< double > & | standard_deviation | ||
) |
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 OpenNN::Matrix< T >::randomize_uniform | ( | const double & | minimum = -1.0 , |
const double & | maximum = 1.0 |
||
) |
void OpenNN::Matrix< T >::randomize_uniform | ( | const Matrix< double > & | minimum, |
const Matrix< double > & | maximum | ||
) |
void OpenNN::Matrix< T >::save | ( | const std::string & | file_name | ) | const |
void OpenNN::Matrix< T >::save_csv | ( | const std::string & | file_name | ) | const |
void OpenNN::Matrix< T >::scale_columns_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | columns_indices | ||
) |
Scales given columns of this matrix with the mean and standard deviation method.
statistics | Vector of statistics structure containing the mean and standard deviation values for the scaling. The size of that vector must be equal to the number of columns to be scaled. |
columns_indices | Vector of indices with the columns to be scaled. The size of that vector must be equal to the number of columns to be scaled. |
void OpenNN::Matrix< T >::scale_columns_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | column_indices | ||
) |
Scales given columns of this matrix with the minimum and maximum method.
statistics | Vector of statistics structure containing the minimum and maximum values for the scaling. The size of that vector must be equal to the number of columns to be scaled. |
column_indices | Vector of indices with the columns to be scaled. The size of that vector must be equal to the number of columns to be scaled. |
void OpenNN::Matrix< T >::scale_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics | ) |
Scales the matrix elements with the mean and standard deviation method. It updates the data in the matrix.
statistics | Vector of statistics structures conatining the mean and standard deviation values for the scaling. The size of that vector must be equal to the number of columns in this matrix. |
Vector< Statistics< T > > OpenNN::Matrix< T >::scale_mean_standard_deviation | ( | void | ) |
void OpenNN::Matrix< T >::scale_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics | ) |
Scales the matrix columns with the minimum and maximum method. It updates the data in the matrix.
statistics | Vector of statistics structures containing the minimum and maximum values for the scaling. The size of that vector must be equal to the number of columns in this matrix. |
Vector< Statistics< T > > OpenNN::Matrix< T >::scale_minimum_maximum | ( | void | ) |
void OpenNN::Matrix< T >::scale_rows_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | row_indices | ||
) |
void OpenNN::Matrix< T >::scale_rows_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | row_indices | ||
) |
void OpenNN::Matrix< T >::set | ( | const size_t & | new_rows_number, |
const size_t & | new_columns_number | ||
) |
void OpenNN::Matrix< T >::set | ( | const size_t & | new_rows_number, |
const size_t & | new_columns_number, | ||
const T & | value | ||
) |
void OpenNN::Matrix< T >::set | ( | const Matrix< T > & | other_matrix | ) |
void OpenNN::Matrix< T >::set | ( | const std::string & | file_name | ) |
void OpenNN::Matrix< T >::set_column | ( | const size_t & | column_index, |
const Vector< T > & | new_column | ||
) |
void OpenNN::Matrix< T >::set_column | ( | const size_t & | column_index, |
const T & | value | ||
) |
void OpenNN::Matrix< T >::set_columns_number | ( | const size_t & | new_columns_number | ) |
void OpenNN::Matrix< T >::set_diagonal | ( | const T & | new_diagonal | ) |
void OpenNN::Matrix< T >::set_diagonal | ( | const Vector< T > & | new_diagonal | ) |
void OpenNN::Matrix< T >::set_identity | ( | const size_t & | new_size | ) |
void OpenNN::Matrix< T >::set_row | ( | const size_t & | row_index, |
const Vector< T > & | new_row | ||
) |
void OpenNN::Matrix< T >::set_row | ( | const size_t & | row_index, |
const T & | value | ||
) |
void OpenNN::Matrix< T >::set_rows_number | ( | const size_t & | new_rows_number | ) |
void OpenNN::Matrix< T >::sort_greater | ( | const size_t & | ) |
void OpenNN::Matrix< T >::sort_less | ( | const size_t & | ) |
void OpenNN::Matrix< T >::subtract_column | ( | const size_t & | column_index | ) |
void OpenNN::Matrix< T >::subtract_row | ( | const size_t & | row_index | ) |
Matrix< T > OpenNN::Matrix< T >::sum_diagonal | ( | const T & | value | ) | const |
Matrix< T > OpenNN::Matrix< T >::sum_diagonal | ( | const Vector< T > & | new_summing_values | ) | const |
void OpenNN::Matrix< T >::sum_row | ( | const size_t & | row_index, |
const Vector< T > & | vector | ||
) |
std::vector< T > OpenNN::Matrix< T >::to_std_vector | ( | void | ) | const |
std::string OpenNN::Matrix< T >::to_string | ( | const std::string & | separator = " " | ) | const |
Vector< T > OpenNN::Matrix< T >::to_vector | ( | void | ) | const |
void OpenNN::Matrix< T >::tuck_in | ( | const size_t & | row_position, |
const size_t & | column_position, | ||
const Matrix< T > & | other_matrix | ||
) |
void OpenNN::Matrix< T >::unscale_columns_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | column_indices | ||
) |
Scales given columns of this matrix with the mean and standard deviation method.
statistics | Vector of statistics structure containing the mean and standard deviation values for the scaling. The size of that vector must be equal to the number of columns in the matrix. |
column_indices | Vector of indices with the columns to be scaled. The size of that vector must be equal to the number of columns to be scaled. |
void OpenNN::Matrix< T >::unscale_columns_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | column_indices | ||
) |
Unscales given columns in the matrix with the minimum and maximum method.
statistics | Vector of statistics structures containing the minimum and maximum values for the unscaling. The size of that vector must be equal to the number of columns in the matrix. |
column_indices | Vector of indices of the columns to be unscaled. The size of that vector must be equal to the number of columns to be unscaled. |
void OpenNN::Matrix< T >::unscale_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics | ) |
Unscales the matrix columns with the mean and standard deviation method. It updates the matrix elements.
statistics | Vector of statistics structures containing the mean and standard deviations for the unscaling. The size of that vector must be equal to the number of columns in this matrix. |
void OpenNN::Matrix< T >::unscale_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics | ) |
void OpenNN::Matrix< T >::unscale_rows_mean_standard_deviation | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | row_indices | ||
) |
void OpenNN::Matrix< T >::unscale_rows_minimum_maximum | ( | const Vector< Statistics< T > > & | statistics, |
const Vector< size_t > & | row_indices | ||
) |