|
| Matrix () |
| Default constructor. It creates a matrix with zero rows and zero columns.
|
|
| Matrix (const size_t &, const size_t &) |
|
| Matrix (const size_t &, const size_t &, const T &) |
|
| Matrix (const string &, const char &, const bool &) |
|
| Matrix (const Matrix &) |
|
| Matrix (const initializer_list< Vector< T >> &) |
|
| Matrix (const initializer_list< Vector< T >> &, const initializer_list< string > &) |
|
virtual | ~Matrix () |
| Destructor.
|
|
Matrix< T > & | operator= (const Matrix< T > &) |
|
T & | operator() (const size_t &, const size_t &) |
| Reference operator. More...
|
|
const T & | operator() (const size_t &, const size_t &) const |
| Reference operator. More...
|
|
T & | operator() (const size_t &, const string &) |
|
const T & | operator() (const size_t &, const string &) const |
| Reference operator.
|
|
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 |
|
Matrix< T > | operator+ (const T &) const |
|
Matrix< T > | operator+ (const Matrix< T > &) const |
|
Matrix< T > | operator- (const T &scalar) const |
|
Matrix< T > | operator- (const Matrix< T > &) const |
|
Matrix< T > | operator* (const T &) const |
|
Matrix< T > | operator* (const Matrix< T > &) const |
|
Matrix< T > | operator* (const Tensor< 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 > &) |
|
const size_t & | get_rows_number () const |
| Returns the number of rows in the matrix.
|
|
const size_t & | get_columns_number () const |
| Returns the number of columns in the matrix.
|
|
const Vector< string > | get_header () const |
| Returns a string vector with the header.
|
|
const string | get_header (const size_t &) const |
|
size_t | get_column_index (const string &) const |
|
Vector< size_t > | get_columns_indices (const Vector< string > &) const |
|
Vector< size_t > | get_binary_columns_indices () const |
| Returns a vector with the index of the binary columns.
|
|
Vector< size_t > | get_rows_equal_to (const Vector< T > &) const |
|
Matrix< T > | get_submatrix (const Vector< size_t > &, const Vector< size_t > &) const |
|
Tensor< T > | get_tensor (const Vector< size_t > &, const Vector< size_t > &, const Vector< size_t > &) const |
|
Matrix< T > | get_submatrix_rows (const Vector< size_t > &) const |
|
Matrix< T > | get_submatrix_columns (const Vector< size_t > &) const |
|
Vector< T > | get_row (const size_t &) const |
|
Vector< T > | get_rows (const size_t &, const size_t &) const |
|
Vector< T > | get_row (const size_t &, const Vector< size_t > &) const |
|
Vector< T > | get_column (const size_t &) const |
|
Vector< T > | get_column (const string &) const |
|
Matrix< T > | get_columns (const Vector< string > &) const |
|
Vector< T > | get_column (const size_t &, const Vector< size_t > &) const |
|
Vector< T > | get_diagonal () const |
| Returns the diagonal of the matrix.
|
|
T | get_first (const size_t &) const |
|
T | get_first (const string &) const |
|
T | get_last (const size_t &) const |
|
T | get_last (const string &) const |
|
Vector< size_t > | get_constant_columns_indices () const |
| Returns a indices vector with the index of columns that are constant.
|
|
Matrix< T > | get_first_rows (const size_t &) const |
|
Matrix< T > | get_first_columns (const size_t &) const |
|
Matrix< T > | get_last_columns (const size_t &) const |
|
Matrix< T > | get_last_rows (const size_t &) const |
|
void | set () |
| This method set the numbers of rows and columns of the matrix to zero.
|
|
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 string &) |
|
void | set (const initializer_list< Vector< T >> &) |
| Set the columns of the matrix.
|
|
void | set_identity (const size_t &) |
|
void | set_rows_number (const size_t &) |
|
void | set_columns_number (const size_t &) |
|
void | set_header (const Vector< string > &) |
|
void | set_header (const size_t &, const string &) |
|
void | set_row (const size_t &, const Vector< T > &) |
|
void | set_row (const size_t &, const T &) |
|
void | set_submatrix_rows (const size_t &, const Matrix< T > &) |
|
void | set_column (const size_t &, const Vector< T > &, const string &="") |
|
void | set_column (const string &, const Vector< T > &, const string &="") |
|
void | set_column (const string &, const T &, const string &="") |
|
void | set_column (const size_t &, const T &, const string &="") |
|
void | set_diagonal (const T &) |
|
void | set_diagonal (const Vector< T > &) |
|
bool | empty () const |
| Returns true if number of rows and columns is zero.
|
|
bool | is_square () const |
|
bool | is_symmetric () const |
|
bool | is_antisymmetric () const |
|
bool | is_diagonal () const |
|
bool | is_scalar () const |
|
bool | is_identity () const |
|
bool | is_binary () const |
| Returns true if this matrix has binary values.
|
|
bool | is_column_binary (const size_t &) const |
| Returns true if a column this matrix has binary values.
|
|
bool | is_column_constant (const size_t &) const |
|
bool | is_positive () const |
| Return true if all the elements of the matrix are positive. False otherwhise.
|
|
bool | is_row_equal_to (const size_t &, const Vector< size_t > &, const T &) const |
|
bool | has_column_value (const size_t &, const T &) const |
|
size_t | count_diagonal_elements () const |
|
size_t | count_off_diagonal_elements () const |
|
size_t | count_equal_to (const T &) const |
|
size_t | count_equal_to (const size_t &, const T &) const |
|
size_t | count_equal_to (const size_t &, const Vector< T > &) const |
|
size_t | count_equal_to (const size_t &, const Vector< T > &, const size_t &, const T &) const |
|
size_t | count_equal_to (const size_t &, const Vector< T > &, const size_t &, const T &, const size_t &, const T &, const size_t &, const T &) const |
|
size_t | count_equal_to (const size_t &, const T &, const size_t &, const T &) const |
|
size_t | count_equal_to (const size_t &, const T &, const size_t &, const T &, const size_t &, const T &, const size_t &, const T &) const |
|
size_t | count_equal_to (const string &, const T &) const |
|
size_t | count_equal_to (const string &, const Vector< T > &) const |
|
size_t | count_equal_to (const string &, const T &, const string &, const T &) const |
|
Vector< size_t > | count_equal_to_by_rows (const T &) const |
|
Vector< double > | count_equal_to_by_rows (const T &, const Vector< double > &) const |
|
size_t | count_not_equal_to (const T &) const |
|
size_t | count_not_equal_to (const size_t &, const T &) const |
|
size_t | count_not_equal_to (const size_t &, const Vector< T > &) const |
|
size_t | count_not_equal_to (const size_t &, const T &, const size_t &, const T &) const |
|
size_t | count_not_equal_to (const string &, const T &) const |
|
size_t | count_not_equal_to (const string &, const T &, const string &, const T &) const |
|
size_t | count_rows_equal_to (const T &) const |
|
size_t | count_rows_not_equal_to (const T &) const |
|
size_t | count_rows_equal_to (const Vector< size_t > &, const T &) const |
|
size_t | count_columns_equal_to (const Vector< T > &, const T &) const |
|
Vector< size_t > | count_unique_elements () const |
| Return the number of elements that are unquique in eacher column of the matrix.
|
|
Vector< size_t > | count_column_occurrences (const T &) const |
| Return the times that a given value is contain in each column of hte matrix.
|
|
bool | has_nan () const |
| Returns true if matrix contains nan, and false otherwise.
|
|
bool | has_nan_row (const size_t &) const |
|
bool | has_nan_column (const size_t &) const |
|
size_t | count_nan () const |
| Returns the number of elements that contains nan.
|
|
size_t | count_not_NAN () const |
| Returns the number of elements that not contains nan.
|
|
size_t | count_rows_with_nan () const |
| Returns the number of rows which contains at least one nan.
|
|
Vector< size_t > | get_nan_indices () const |
| Returns the number of rows which contains at least one nan.
|
|
size_t | count_columns_with_nan () const |
| Returns the number of columns which contains at least one nan.
|
|
Vector< size_t > | count_nan_rows () const |
|
Vector< size_t > | count_nan_columns () const |
|
void | filter (const T &, const T &) |
|
Matrix< T > | filter_column_equal_to (const size_t &, const T &) const |
|
Matrix< T > | filter_column_equal_to (const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const size_t &, const Vector< T > &) const |
|
Matrix< T > | filter_column_equal_to (const string &, const Vector< T > &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const size_t &, const Vector< T > &, const size_t &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const string &, const Vector< T > &, const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const size_t &, const T &, const size_t &, const T &, const size_t &, const T &, const size_t &, const T &) const |
| Returns a new matrix where certain columns has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const string &, const T &, const string &, const T &, const string &, const T &, const string &, const T &) const |
| Returns a new matrix where certain columns has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const size_t &, const Vector< T > &, const size_t &, const T &, const size_t &, const T &, const size_t &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_equal_to (const string &, const Vector< T > &, const string &, const T &, const string &, const T &, const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_not_equal_to (const size_t &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_not_equal_to (const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_not_equal_to (const string &, const Vector< T > &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_not_equal_to (const size_t &, const Vector< T > &) const |
|
Matrix< T > | filter_column_less_than (const size_t &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_less_than (const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_greater_than (const size_t &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_greater_than (const string &, const T &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_less_than_string (const string &, const double &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_greater_than_string (const string &, const double &) const |
| Returns a new matrix where a given column has been filtered.
|
|
Matrix< T > | filter_column_minimum_maximum (const size_t &, const T &, const T &) const |
|
Matrix< T > | filter_column_minimum_maximum (const string &, const T &, const T &) const |
|
Matrix< T > | filter_extreme_values (const size_t &, const double &, const double &) const |
|
Matrix< T > | filter_extreme_values (const string &, const double &, const double &) const |
|
void | initialize (const T &) |
|
void | initialize_sequential () |
| Initializes all the elements of the matrix in a sequential order (0, 1, 2...).
|
|
void | randomize_uniform (const double &=-1.0, const double &=1.0) |
|
void | randomize_uniform (const Vector< double > &, const Vector< double > &) |
|
void | randomize_uniform (const Matrix< double > &, const Matrix< double > &) |
|
void | randomize_normal (const double &=0.0, const double &=1.0) |
|
void | randomize_normal (const Vector< double > &, const Vector< double > &) |
|
void | randomize_normal (const Matrix< double > &, const Matrix< double > &) |
|
void | initialize_identity () |
|
void | initialize_diagonal (const T &) |
|
void | initialize_diagonal (const size_t &, const T &) |
|
void | initialize_diagonal (const size_t &, const Vector< T > &) |
|
void | append_header (const string &) |
| Append a string in all the elememts of the header.
|
|
void | embed (const size_t &, const size_t &, const Matrix< T > &) |
|
void | embed (const size_t &, const size_t &, const Vector< T > &) |
|
void | sum_diagonal (const T &) |
|
void | multiply_diagonal (const T &) |
|
void | sum_diagonal (const Vector< T > &) |
|
Matrix< T > | append_row (const Vector< T > &) const |
|
Matrix< T > | append_column (const Vector< T > &, const string &="") const |
|
Matrix< T > | insert_row (const size_t &, const Vector< T > &) const |
|
void | insert_row_values (const size_t &, const size_t &, const Vector< T > &) |
|
Matrix< T > | insert_column (const size_t &, const Vector< T > &, const string &="") const |
|
Matrix< T > | insert_column (const string &, const Vector< T > &, const string &="") const |
|
Matrix< T > | insert_matrix (const size_t &, const Matrix< T > &) const |
|
Matrix< T > | insert_padding (const size_t &, const size_t &) const |
|
Matrix< T > | add_columns (const size_t &) const |
|
Matrix< T > | add_columns_first (const size_t &) const |
|
void | split_column (const string &, const Vector< string > &, const char &=',', const string &="NA") |
|
void | split_column (const string &, const string &, const string &, const size_t &, const size_t &) |
|
void | swap_columns (const size_t &, const size_t &) |
|
void | swap_columns (const string &, const string &) |
|
void | merge_columns (const string &, const string &, const string &, const char &) |
|
void | merge_columns (const size_t &, const size_t &, const char &) |
|
Matrix< T > | merge_matrices (const Matrix< T > &, const string &, const string &, const string &="", const string &="") const |
|
Matrix< T > | merge_matrices (const Matrix< T > &, const size_t &, const size_t &) const |
|
Matrix< T > | right_join (const Matrix< T > &, const string &, const string &, const string &="", const string &="") const |
|
Matrix< T > | right_join (const Matrix< T > &, const size_t &, const size_t &) const |
|
Matrix< T > | left_join (const Matrix< T > &, const string &, const string &, const string &="", const string &="") const |
|
Matrix< T > | left_join (const Matrix< T > &, const string &, const string &, const string &, const string &, const string &="", const string &="") const |
|
Matrix< T > | left_join (const Matrix< T > &, const size_t &, const size_t &) const |
|
Matrix< T > | delete_row (const size_t &) const |
|
Matrix< T > | delete_rows (const Vector< size_t > &) const |
|
Matrix< T > | delete_rows_with_value (const T &) const |
|
Matrix< T > | delete_columns_with_value (const T &) const |
|
Matrix< T > | delete_rows_equal_to (const T &) const |
|
Matrix< T > | delete_first_rows (const size_t &) const |
|
Matrix< T > | delete_last_rows (const size_t &) const |
|
Matrix< T > | delete_first_columns (const size_t &) const |
|
Matrix< T > | delete_last_columns (const size_t &) const |
|
Matrix< T > | delete_column (const size_t &) const |
|
Matrix< T > | delete_columns (const Vector< size_t > &) const |
|
Matrix< T > | delete_column (const string &) const |
|
Matrix< T > | delete_columns (const Vector< string > &) const |
|
Matrix< T > | delete_columns_name_contains (const Vector< string > &) const |
|
Matrix< T > | delete_constant_rows () const |
|
Matrix< T > | delete_constant_columns () const |
|
Matrix< T > | delete_binary_columns () const |
|
Matrix< T > | delete_binary_columns (const double &) const |
|
Matrix< T > | assemble_rows (const Matrix< T > &) const |
|
Matrix< T > | assemble_columns (const Matrix< T > &) const |
|
Matrix< T > | sort_ascending (const size_t &) const |
|
Matrix< T > | sort_descending (const size_t &) const |
|
Matrix< T > | sort_ascending_strings (const size_t &) const |
|
Matrix< T > | sort_descending_strings (const size_t &) const |
|
Matrix< T > | sort_rank_rows (const Vector< size_t > &) const |
|
Matrix< T > | sort_columns (const Vector< size_t > &) const |
|
Matrix< T > | sort_columns (const Vector< string > &) const |
|
void | replace (const T &, const T &) |
|
void | replace_header (const string &, const string &) |
|
void | replace_in_row (const size_t &, const T &, const T &) |
|
void | replace_in_column (const size_t &, const T &, const T &) |
|
void | replace_in_column (const string &, const T &, const T &) |
|
void | replace_substring (const string &, const string &) |
|
void | replace_substring (const size_t &, const string &, const string &) |
|
void | replace_substring (const string &, const string &, const string &) |
|
void | replace_contains (const string &, const string &) |
|
void | replace_contains_in_row (const size_t &, const string &, const string &) |
|
void | replace_column_equal_to (const size_t &, const T &, const T &) |
|
void | replace_column_equal_to (const string &, const T &, const T &) |
|
void | replace_column_not_equal_to (const string &, const T &, const T &) |
|
void | replace_column_not_equal_to (const string &, const Vector< T > &, const T &) |
|
void | replace_column_less_than_string (const string &, const double &, const T &) |
|
void | replace_column_contains (const string &, const string &, const string &) |
|
size_t | count_column_contains (const string &, const string &) const |
|
T | calculate_sum () const |
| Returns the sum of all the elements in the matrix.
|
|
Vector< T > | calculate_rows_sum () const |
| Returns the sum of all the rows in the matrix.
|
|
Vector< T > | calculate_columns_sum () const |
| Returns the sum of all the columns in the matrix.
|
|
T | calculate_column_sum (const size_t &) const |
|
T | calculate_row_sum (const size_t &) const |
|
void | sum_row (const size_t &, const Vector< T > &) |
|
void | sum_column (const size_t &, const Vector< T > &) |
|
Matrix< T > | sum_rows (const Vector< T > &) const |
|
Matrix< T > | subtract_rows (const Vector< T > &) const |
|
Matrix< T > | multiply_rows (const Vector< T > &) const |
|
Vector< Matrix< T > > | multiply_rows (const Matrix< T > &) const |
|
double | calculate_trace () const |
|
Vector< double > | calculate_missing_values_percentage () const |
| Returns the percentage of missing values in each column.
|
|
Matrix< size_t > | get_indices_less_than (const T &) const |
|
Matrix< size_t > | get_indices_greater_than (const T &) const |
|
Matrix< T > | calculate_reverse_columns () const |
| Return a matrix the elements of the matrix changes. The last one will be the first.
|
|
Matrix< T > | calculate_transpose () const |
| Returns the transpose of the matrix.
|
|
bool | compare_rows (const size_t &, const Matrix< T > &, const size_t &) const |
|
void | divide_rows (const Vector< T > &) |
|
string | matrix_to_string (const char &=' ') const |
|
Matrix< size_t > | to_size_t_matrix () const |
| Returns a size_t representation of this matrix.
|
|
Matrix< float > | to_float_matrix () const |
| Returns a float representation of this matrix.
|
|
Matrix< double > | to_double_matrix () const |
| Returns a double representation of this matrix.
|
|
Matrix< string > | to_string_matrix (const size_t &=3) const |
| Returns a new matrix in which each entry has been converted to a string.
|
|
Matrix< double > | to_zeros () const |
| Set the elements of the matrix to zero.
|
|
Matrix< double > | to_ones () const |
| Set the elements of the matrix to zero.
|
|
Matrix< double > | bool_to_double () const |
| Returns a double representation of this bool matrix.
|
|
Matrix< size_t > | string_to_size_t () const |
| Returns a size_t representation of this string matrix.
|
|
Matrix< double > | string_to_double () const |
| Returns a double representation of this string matrix.
|
|
vector< T > | to_std_vector () const |
|
Vector< T > | to_vector () const |
|
Vector< Vector< T > > | to_vector_of_vectors () const |
|
Vector< Matrix< T > > | to_vector_matrix (const size_t &, const size_t &, const size_t &) const |
|
Matrix< T > | to_categorical (const size_t &) const |
|
Tensor< T > | to_tensor () const |
|
void | print () const |
| Prints to the screen in the matrix object.
|
|
void | load_csv (const string &, const char &=',', const bool &=false, const string &="NA") |
|
void | load_csv_string (const string &, const char &=',', const bool &=true) |
|
void | load_binary (const string &) |
|
void | save_binary (const string &) const |
|
void | save_csv (const string &, const char &=',', const Vector< string > &=Vector< string >(), const string &="Id") const |
|
void | save_json (const string &, const Vector< string > &=Vector< string >()) const |
|
void | parse (const string &) |
|
void | print_preview () const |
|