#include <vector.h>
Public Member Functions | |
Vector (void) | |
Vector (const unsigned int &new_size) | |
Vector (const unsigned int &new_size, const Type &value) | |
Vector (const std::string &filename) | |
Vector (const Type &first, const int &step, const Type &last) | |
template<class InputIterator > | |
Vector (InputIterator first, InputIterator last) | |
Vector (const Vector< Type > &other_vector) | |
~Vector (void) | |
bool | operator== (const Type &value) const |
bool | operator!= (const Type &value) const |
bool | operator> (const Type &value) const |
bool | operator< (const Type &value) const |
bool | operator>= (const Type &value) const |
bool | operator<= (const Type &value) const |
void | set (void) |
void | set (const unsigned int &new_size) |
void | set (const unsigned int &new_size, const Type &new_value) |
void | set (const std::string &filename) |
void | set (const Type &first, const int &step, const Type &last) |
void | set (const Type &first, const double &step, const Type &last) |
void | set (const Vector &other_vector) |
void | initialize (const Type &value) |
void | initialize_sequential (void) |
void | initialize_uniform (void) |
void | initialize_uniform (const double &minimum, double maximum) |
void | initialize_uniform (const Vector< double > &minimum, const Vector< double > &maximum) |
void | initialize_normal (void) |
void | initialize_normal (const double &mean, double standard_deviation) |
void | initialize_normal (const Vector< double > &mean, const Vector< double > &standard_deviation) |
Type | calculate_minimum (void) const |
Type | calculate_maximum (void) const |
Vector< Type > | calculate_minimum_maximum (void) const |
Vector< Vector< Type > > | calculate_histogram (const unsigned int &bins_number) const |
Vector< Vector< Type > > | calculate_histogram (void) const |
unsigned int | calculate_minimal_index (void) const |
unsigned int | calculate_maximal_index (void) const |
Vector< unsigned int > | calculate_minimal_maximal_index (void) const |
Vector< Type > | calculate_pow (const Type &exponent) const |
Vector< Type > | calculate_competitive (void) const |
Vector< Type > | calculate_softmax (void) const |
Matrix< Type > | calculate_softmax_Jacobian (void) const |
Vector< bool > | calculate_binary (void) const |
unsigned int | calculate_cumulative_index (const Type &value) const |
unsigned int | calculate_closest_index (const Type &value) const |
Type | calculate_sum (void) const |
Type | calculate_product (void) const |
double | calculate_mean (void) const |
double | calculate_standard_deviation (void) const |
Vector< double > | calculate_mean_standard_deviation (void) const |
Vector< double > | calculate_statistics (void) const |
double | calculate_norm (void) const |
double | calculate_distance (const Vector< double > &other_vector) const |
double | calculate_sum_squared_error (const Vector< double > &other_vector) const |
double | calculate_Minkowski_error (const Vector< double > &other_vector, double Minkowski_parameter) const |
Vector< Type > | calculate_absolute_value (void) const |
void | apply_absolute_value (void) |
Vector< Type > | calculate_lower_bounded (const Type &lower_bound) const |
Vector< Type > | calculate_lower_bounded (const Vector< Type > &lower_bound) const |
Vector< Type > | calculate_upper_bounded (const Type &upper_bound) const |
Vector< Type > | calculate_upper_bounded (const Vector< Type > &upper_bound) const |
Vector< Type > | calculate_lower_upper_bounded (const Type &lower_bound, const Type &upper_bound) const |
Vector< Type > | calculate_lower_upper_bounded (const Vector< Type > &lower_bound, const Vector< Type > &upper_bound) const |
void | apply_lower_bound (const Type &lower_bound) |
void | apply_lower_bound (const Vector< Type > &lower_bound) |
void | apply_upper_bound (const Type &upper_bound) |
void | apply_upper_bound (const Vector< Type > &upper_bound) |
void | apply_lower_upper_bounds (const Type &lower_bound, const Type &upper_bound) |
void | apply_lower_upper_bounds (const Vector< Type > &lower_bound, const Vector< Type > &upper_bound) |
Vector< Type > | operator+ (const Type &scalar) const |
Vector< Type > | operator+ (const Vector< Type > &other_vector) const |
Vector< Type > | operator- (const Type &scalar) const |
Vector< Type > | operator- (const Vector< Type > &other_vector) const |
Vector< Type > | operator* (const Type &scalar) const |
Vector< Type > | operator* (const Vector< Type > &other_vector) const |
Matrix< Type > | operator* (const Matrix< Type > &matrix) const |
Vector< Type > | dot (const Matrix< Type > &matrix) const |
Type | dot (const Vector< Type > &other_vector) const |
Matrix< Type > | direct (const Vector< Type > &other_vector) const |
Vector< Type > | operator/ (const Type &scalar) const |
Vector< Type > | operator/ (const Vector< Type > &other_vector) const |
void | operator+= (const Type &value) |
void | operator+= (const Vector< Type > &other_vector) |
void | operator-= (const Type &value) |
void | operator-= (const Vector< Type > &other_vector) |
void | operator*= (const Type &value) |
void | operator*= (const Vector< Type > &other_vector) |
void | operator/= (const Type &value) |
void | operator/= (const Vector< Type > &other_vector) |
void | scale_mean_standard_deviation (const Vector< Type > &mean, const Vector< Type > &standard_deviation) |
Vector< Type > | calculate_scaled_minimum_maximum (const Vector< Type > &minimum, const Vector< Type > &maximum) const |
Vector< Type > | calculate_scaled_mean_standard_deviation (const Vector< Type > &mean, const Vector< Type > &standard_deviation) const |
Vector< Type > | calculate_unscaled_minimum_maximum (const Vector< Type > &minimum, const Vector< Type > &maximum) const |
Vector< Type > | calculate_unscaled_mean_standard_deviation (const Vector< Type > &mean, const Vector< Type > &standard_deviation) const |
void | scale_minimum_maximum (const Vector< Type > &minimum, const Vector< Type > &maximum) |
void | unscale_minimum_maximum (const Vector< Type > &minimum, const Vector< Type > &maximum) |
void | unscale_mean_standard_deviation (const Vector< Type > &mean, const Vector< Type > &standard_deviation) |
Matrix< Type > | arrange_diagonal_matrix (void) const |
void | load (const std::string &filename) |
void | save (const std::string &filename) const |
void | tuck_in (const unsigned int &position, const Vector< Type > &other_vector) |
Vector< Type > | take_out (const unsigned int &position, const unsigned int &other_size) const |
Vector< Type > | get_assembly (const Vector< Type > &other_vector) const |
void | parse (const std::string &str) |
std::string | to_string (void) const |
Vector< std::string > | get_string_vector (void) const |
Matrix< Type > | to_matrix (const unsigned int &rows_number, const unsigned int &columns_number) const |
Definition at line 47 of file vector.h.
OpenNN::Vector< Type >::Vector | ( | void | ) | [inline, explicit] |
OpenNN::Vector< Type >::Vector | ( | const unsigned int & | new_size | ) | [inline, explicit] |
OpenNN::Vector< Type >::Vector | ( | const unsigned int & | new_size, | |
const Type & | value | |||
) | [inline, explicit] |
OpenNN::Vector< Type >::Vector | ( | const std::string & | filename | ) | [inline, explicit] |
OpenNN::Vector< Type >::Vector | ( | const Type & | first, | |
const int & | step, | |||
const Type & | last | |||
) | [inline, explicit] |
OpenNN::Vector< Type >::Vector | ( | InputIterator | first, | |
InputIterator | last | |||
) | [inline] |
OpenNN::Vector< Type >::Vector | ( | const Vector< Type > & | other_vector | ) | [inline] |
OpenNN::Vector< Type >::~Vector | ( | void | ) | [inline] |
bool OpenNN::Vector< Type >::operator== | ( | const Type & | value | ) | const [inline] |
bool OpenNN::Vector< Type >::operator!= | ( | const Type & | value | ) | const [inline] |
bool OpenNN::Vector< Type >::operator> | ( | const Type & | value | ) | const [inline] |
bool OpenNN::Vector< Type >::operator< | ( | const Type & | value | ) | const [inline] |
bool OpenNN::Vector< Type >::operator>= | ( | const Type & | value | ) | const [inline] |
bool OpenNN::Vector< Type >::operator<= | ( | const Type & | value | ) | const [inline] |
void OpenNN::Vector< Type >::set | ( | void | ) | [inline] |
void OpenNN::Vector< Type >::set | ( | const unsigned int & | new_size | ) | [inline] |
void OpenNN::Vector< Type >::set | ( | const unsigned int & | new_size, | |
const Type & | new_value | |||
) | [inline] |
void OpenNN::Vector< Type >::set | ( | const std::string & | filename | ) | [inline] |
void OpenNN::Vector< Type >::set | ( | const Type & | first, | |
const int & | step, | |||
const Type & | last | |||
) | [inline] |
This method makes this vector to have elements starting from a given value, continuing with a step value and finishing with a given value. Depending on the starting, step and finishin values, this method can produce a variety of sizes and data.
first | Starting value. | |
step | Step value. | |
last | Finishing value. |
void OpenNN::Vector< Type >::set | ( | const Type & | first, | |
const double & | step, | |||
const Type & | last | |||
) | [inline] |
This method makes this vector to have elements starting from a given value, continuing with a step value and finishing with a given value. Depending on the starting, step and finishin values, this method can produce a variety of sizes and data.
first | Starting value. | |
step | Step value. | |
last | Finishing value. |
void OpenNN::Vector< Type >::set | ( | const Vector< Type > & | other_vector | ) | [inline] |
void OpenNN::Vector< Type >::initialize | ( | const Type & | value | ) | [inline] |
void OpenNN::Vector< Type >::initialize_sequential | ( | void | ) | [inline] |
void OpenNN::Vector< Type >::initialize_uniform | ( | void | ) | [inline] |
void OpenNN::Vector< Type >::initialize_uniform | ( | const double & | minimum, | |
double | maximum | |||
) | [inline] |
void OpenNN::Vector< Type >::initialize_uniform | ( | const Vector< double > & | minimum, | |
const Vector< double > & | maximum | |||
) | [inline] |
void OpenNN::Vector< Type >::initialize_normal | ( | void | ) | [inline] |
void OpenNN::Vector< Type >::initialize_normal | ( | const double & | mean, | |
double | standard_deviation | |||
) | [inline] |
This method assigns random values to each element in the vector. These are taken from a normal distribution with single mean and standard deviation values for all the elements.
mean | Mean value of uniform distribution. | |
standard_deviation | Standard deviation value of uniform distribution. |
void OpenNN::Vector< Type >::initialize_normal | ( | const Vector< double > & | mean, | |
const Vector< double > & | standard_deviation | |||
) | [inline] |
This method assigns random values to each element in the vector. These are taken from normal distributions with given means and standard deviations for each element.
mean | Mean values of normal distributions. | |
standard_deviation | Standard deviation values of normal distributions. |
Type OpenNN::Vector< Type >::calculate_minimum | ( | void | ) | const [inline] |
Type OpenNN::Vector< Type >::calculate_maximum | ( | void | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_minimum_maximum | ( | void | ) | const [inline] |
Vector< Vector<Type> > OpenNN::Vector< Type >::calculate_histogram | ( | const unsigned int & | bins_number | ) | const [inline] |
This method bins the elements of the vector into a given number of equally spaced containers. It returns a vector of two vectors. The size of both subvectors is the number of bins. The first subvector contains the frequency of the bins. The second subvector contains the center of the bins.
Vector< Vector<Type> > OpenNN::Vector< Type >::calculate_histogram | ( | void | ) | const [inline] |
This method bins the elements of the vector into 10 equally spaced containers. It returns a vector of two vectors. The size of both subvectors is the number of bins (10). The first subvector contains the frequency of the bins. The second subvector contains the center of the bins.
unsigned int OpenNN::Vector< Type >::calculate_minimal_index | ( | void | ) | const [inline] |
unsigned int OpenNN::Vector< Type >::calculate_maximal_index | ( | void | ) | const [inline] |
Vector<unsigned int> OpenNN::Vector< Type >::calculate_minimal_maximal_index | ( | void | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_pow | ( | const Type & | exponent | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_competitive | ( | void | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_softmax | ( | void | ) | const [inline] |
Matrix<Type> OpenNN::Vector< Type >::calculate_softmax_Jacobian | ( | void | ) | const [inline] |
Vector<bool> OpenNN::Vector< Type >::calculate_binary | ( | void | ) | const [inline] |
unsigned int OpenNN::Vector< Type >::calculate_cumulative_index | ( | const Type & | value | ) | const [inline] |
unsigned int OpenNN::Vector< Type >::calculate_closest_index | ( | const Type & | value | ) | const [inline] |
Type OpenNN::Vector< Type >::calculate_sum | ( | void | ) | const [inline] |
Type OpenNN::Vector< Type >::calculate_product | ( | void | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_mean | ( | void | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_standard_deviation | ( | void | ) | const [inline] |
Vector<double> OpenNN::Vector< Type >::calculate_mean_standard_deviation | ( | void | ) | const [inline] |
Vector<double> OpenNN::Vector< Type >::calculate_statistics | ( | void | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_norm | ( | void | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_distance | ( | const Vector< double > & | other_vector | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_sum_squared_error | ( | const Vector< double > & | other_vector | ) | const [inline] |
double OpenNN::Vector< Type >::calculate_Minkowski_error | ( | const Vector< double > & | other_vector, | |
double | Minkowski_parameter | |||
) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_absolute_value | ( | void | ) | const [inline] |
void OpenNN::Vector< Type >::apply_absolute_value | ( | void | ) | [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_lower_bounded | ( | const Type & | lower_bound | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_lower_bounded | ( | const Vector< Type > & | lower_bound | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_upper_bounded | ( | const Type & | upper_bound | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_upper_bounded | ( | const Vector< Type > & | upper_bound | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_lower_upper_bounded | ( | const Type & | lower_bound, | |
const Type & | upper_bound | |||
) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_lower_upper_bounded | ( | const Vector< Type > & | lower_bound, | |
const Vector< Type > & | upper_bound | |||
) | const [inline] |
void OpenNN::Vector< Type >::apply_lower_bound | ( | const Type & | lower_bound | ) | [inline] |
void OpenNN::Vector< Type >::apply_lower_bound | ( | const Vector< Type > & | lower_bound | ) | [inline] |
void OpenNN::Vector< Type >::apply_upper_bound | ( | const Type & | upper_bound | ) | [inline] |
void OpenNN::Vector< Type >::apply_upper_bound | ( | const Vector< Type > & | upper_bound | ) | [inline] |
void OpenNN::Vector< Type >::apply_lower_upper_bounds | ( | const Type & | lower_bound, | |
const Type & | upper_bound | |||
) | [inline] |
void OpenNN::Vector< Type >::apply_lower_upper_bounds | ( | const Vector< Type > & | lower_bound, | |
const Vector< Type > & | upper_bound | |||
) | [inline] |
Vector<Type> OpenNN::Vector< Type >::operator+ | ( | const Type & | scalar | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator+ | ( | const Vector< Type > & | other_vector | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator- | ( | const Type & | scalar | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator- | ( | const Vector< Type > & | other_vector | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator* | ( | const Type & | scalar | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator* | ( | const Vector< Type > & | other_vector | ) | const [inline] |
Matrix<Type> OpenNN::Vector< Type >::operator* | ( | const Matrix< Type > & | matrix | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::dot | ( | const Matrix< Type > & | matrix | ) | const [inline] |
Type OpenNN::Vector< Type >::dot | ( | const Vector< Type > & | other_vector | ) | const [inline] |
Matrix<Type> OpenNN::Vector< Type >::direct | ( | const Vector< Type > & | other_vector | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator/ | ( | const Type & | scalar | ) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::operator/ | ( | const Vector< Type > & | other_vector | ) | const [inline] |
void OpenNN::Vector< Type >::operator+= | ( | const Type & | value | ) | [inline] |
void OpenNN::Vector< Type >::operator+= | ( | const Vector< Type > & | other_vector | ) | [inline] |
void OpenNN::Vector< Type >::operator-= | ( | const Type & | value | ) | [inline] |
void OpenNN::Vector< Type >::operator-= | ( | const Vector< Type > & | other_vector | ) | [inline] |
void OpenNN::Vector< Type >::operator*= | ( | const Type & | value | ) | [inline] |
void OpenNN::Vector< Type >::operator*= | ( | const Vector< Type > & | other_vector | ) | [inline] |
void OpenNN::Vector< Type >::operator/= | ( | const Type & | value | ) | [inline] |
void OpenNN::Vector< Type >::operator/= | ( | const Vector< Type > & | other_vector | ) | [inline] |
void OpenNN::Vector< Type >::scale_mean_standard_deviation | ( | const Vector< Type > & | mean, | |
const Vector< Type > & | standard_deviation | |||
) | [inline] |
This method scales the vector elements with given mean and standard deviation values. It updates the data in the vector. The size of the mean and standard deviation vectors must be equal to the size of the vector.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
Vector<Type> OpenNN::Vector< Type >::calculate_scaled_minimum_maximum | ( | const Vector< Type > & | minimum, | |
const Vector< Type > & | maximum | |||
) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::calculate_scaled_mean_standard_deviation | ( | const Vector< Type > & | mean, | |
const Vector< Type > & | standard_deviation | |||
) | const [inline] |
This method returns a vector with the scaled elements of this vector acording to the mean and standard deviation method. The size of the mean and standard deviation vectors must be equal to the size of the vector.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
Vector<Type> OpenNN::Vector< Type >::calculate_unscaled_minimum_maximum | ( | const Vector< Type > & | minimum, | |
const Vector< Type > & | maximum | |||
) | const [inline] |
This method returns a vector with the unscaled elements of this vector acording to the minimum and maximum method. The size of the minimum and maximum vectors must be equal to the size of the vector.
minimum | Minimum values. | |
maximum | Maximum values. |
Vector<Type> OpenNN::Vector< Type >::calculate_unscaled_mean_standard_deviation | ( | const Vector< Type > & | mean, | |
const Vector< Type > & | standard_deviation | |||
) | const [inline] |
This method returns a vector with the unscaled elements of this vector acording to the mean and standard deviation method. The size of the mean and standard deviation vectors must be equal to the size of the vector.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
void OpenNN::Vector< Type >::scale_minimum_maximum | ( | const Vector< Type > & | minimum, | |
const Vector< Type > & | maximum | |||
) | [inline] |
void OpenNN::Vector< Type >::unscale_minimum_maximum | ( | const Vector< Type > & | minimum, | |
const Vector< Type > & | maximum | |||
) | [inline] |
This method unscales the vector elements with given minimum and maximum values. It updates the vector elements. The size of the minimum and maximum vectors must be equal to the size of the vector.
minimum | Minimum values. | |
maximum | Maximum deviation values. |
void OpenNN::Vector< Type >::unscale_mean_standard_deviation | ( | const Vector< Type > & | mean, | |
const Vector< Type > & | standard_deviation | |||
) | [inline] |
This method unscales the vector elements with given mean and standard deviation values. It updates the vector elements. The size of the mean and standard deviation vectors must be equal to the size of the vector.
mean | Mean values. | |
standard_deviation | Standard deviation values. |
Matrix<Type> OpenNN::Vector< Type >::arrange_diagonal_matrix | ( | void | ) | const [inline] |
void OpenNN::Vector< Type >::load | ( | const std::string & | filename | ) | [inline] |
void OpenNN::Vector< Type >::save | ( | const std::string & | filename | ) | const [inline] |
void OpenNN::Vector< Type >::tuck_in | ( | const unsigned int & | position, | |
const Vector< Type > & | other_vector | |||
) | [inline] |
Vector<Type> OpenNN::Vector< Type >::take_out | ( | const unsigned int & | position, | |
const unsigned int & | other_size | |||
) | const [inline] |
Vector<Type> OpenNN::Vector< Type >::get_assembly | ( | const Vector< Type > & | other_vector | ) | const [inline] |
void OpenNN::Vector< Type >::parse | ( | const std::string & | str | ) | [inline] |
std::string OpenNN::Vector< Type >::to_string | ( | void | ) | const [inline] |
Vector<std::string> OpenNN::Vector< Type >::get_string_vector | ( | void | ) | const [inline] |
Matrix<Type> OpenNN::Vector< Type >::to_matrix | ( | const unsigned int & | rows_number, | |
const unsigned int & | columns_number | |||
) | const [inline] |
This method returns a matrix with given numbers of rows and columns and with the elements of this vector ordered by rows. The number of rows multiplied by the number of columns must be equal to the size of this vector.
rows_number | Number of rows in the new matrix. | |
columns_number | Number of columns in the new matrix. |