|
| | Matrix () |
| |
| | ~Matrix ()=default |
| |
| | Matrix (const Matrix &matrix) |
| |
| | Matrix (Matrix &&matrix) noexcept |
| |
| Matrix & | operator= (const Matrix &matrix) |
| |
| Matrix & | operator= (Matrix &&matrix) noexcept |
| |
| | Matrix (size_t row_size, size_t col_size) |
| | Constructs a matrix with the specified row and column sizes.
|
| |
| | Matrix (size_t row_size, size_t col_size, const T &fill_value) |
| | Constructs a matrix with the specified row and column sizes and a fill value.
|
| |
| | Matrix (size_t row_size, size_t col_size, const std::vector< T > &values) |
| | Constructs a matrix with the specified row and column sizes and values.
|
| |
| | Matrix (size_t row_size, size_t col_size, const std::initializer_list< T > &values) |
| | Constructs a matrix with the specified row and column sizes and initializer list.
|
| |
| | Matrix (const std::initializer_list< std::initializer_list< T > > &values) |
| | Constructs a matrix from a nested initializer list.
|
| |
| | Matrix (txeo::Tensor< T > &&tensor) |
| | Constructs a matrix by moving data from a Tensor.
|
| |
| size_t | size () const |
| | Returns the size of the matrix.
|
| |
| size_t | row_size () const |
| | Returns the row size of the matrix.
|
| |
| size_t | col_size () const |
| | Returns the column size of the matrix.
|
| |
| void | normalize_columns (txeo::NormalizationType type) |
| | Normalizes matrix columns in-place using specified normalization method.
|
| |
| void | normalize_rows (txeo::NormalizationType type) |
| | Normalizes matrix rows in-place using specified normalization method.
|
| |
| void | reshape (const txeo::TensorShape &shape) |
| |
| void | reshape (const std::vector< size_t > &shape) |
| |
| void | reshape (const std::initializer_list< size_t > &shape) |
| |
| Matrix< T > & | transpose () |
| | Transposes the matrix (swaps rows and columns) in-place.
|
| |
| Matrix< T > | dot (const Matrix< T > &matrix) const |
| | Performs matrix multiplication with another matrix.
|
| |
| Tensor< T > | dot (const txeo::Vector< T > &vector) const |
| | Performs matrix-vector multiplication.
|
| |
| Matrix< T > | clone () const |
| |
| | Tensor () |
| |
| | Tensor (const Tensor &tensor) |
| |
| | Tensor (Tensor &&tensor) noexcept |
| |
| virtual | ~Tensor () |
| |
| Tensor & | operator= (const Tensor &tensor) |
| |
| Tensor & | operator= (Tensor &&tensor) noexcept |
| |
| bool | operator== (const Tensor &tensor) |
| |
| bool | operator!= (const Tensor &tensor) |
| |
| | Tensor (txeo::TensorShape &&shape) |
| | Constructs a Tensor from a specified txeo::TensorShape.
|
| |
| | Tensor (const txeo::TensorShape &shape) |
| | Constructs a tensor from a specified txeo::TensorShape.
|
| |
| | Tensor (std::vector< size_t > &&shape) |
| | Constructs a Tensor from a specified shape std::vector.
|
| |
| | Tensor (const std::vector< size_t > &shape) |
| | Constructs a Tensor from a specified shape std::vector.
|
| |
| | Tensor (const std::initializer_list< size_t > &shape) |
| | Constructs a Tensor from a specified shape std::vector.
|
| |
| | Tensor (txeo::TensorShape &&shape, const T &fill_value) |
| | Constructs a Tensor from a specified txeo::TensorShape and fills it with a value.
|
| |
| | Tensor (const txeo::TensorShape &shape, const T &fill_value) |
| | Constructs a Tensor from a specified txeo::TensorShape and fills it with a value.
|
| |
| | Tensor (std::vector< size_t > &&shape, const T &fill_value) |
| | Constructs a Tensor from a specified shape std::vector and fills it with a value.
|
| |
| | Tensor (const std::vector< size_t > &shape, const T &fill_value) |
| | Constructs a Tensor from a specified shape std::vector and fills it with a value.
|
| |
| | Tensor (const std::initializer_list< size_t > &shape, const T &fill_value) |
| | Constructs a Tensor from a specified initializer list and fills it with a value.
|
| |
| | Tensor (const txeo::TensorShape &shape, const std::vector< T > &values) |
| | Constructs a Tensor object from a specified txeo::TensorShape and fills it with a std::vector of values in a row-major scheme.
|
| |
| | Tensor (const std::vector< size_t > &shape, const std::vector< T > &values) |
| | Constructs a Tensor object from a specified std::vector<size_t> and fills it with a std::vector of values in a row-major scheme.
|
| |
| | Tensor (const std::initializer_list< size_t > &shape, const std::vector< T > &values) |
| | Constructs a Tensor object from a specified initializer list and fills it with a std::vector of values in a row-major scheme.
|
| |
| | Tensor (const std::initializer_list< std::initializer_list< T > > &values) |
| | Constructs a second order Tensor from a nested std::initializer_list.
|
| |
| | Tensor (const std::initializer_list< std::initializer_list< std::initializer_list< T > > > &values) |
| | Constructs a third order Tensor from a nested std::initializer_list.
|
| |
| const txeo::TensorShape & | shape () const |
| | Returns the shape of this tensor.
|
| |
| constexpr std::type_identity_t< T > | type () const |
| | Returns the data type of this tensor.
|
| |
| int | order () const |
| | Returns the order of this tensor.
|
| |
| size_t | dim () const |
| | Returns the dimension of this tensor.
|
| |
| size_t | number_of_elements () const |
| | Returns the number of elements of this tensor, which corresponds to the dimension of this tensor.
|
| |
| size_t | memory_size () const |
| | Returns the number of bytes occupied by this tensor.
|
| |
| Tensor< T > | slice (size_t first_axis_begin, size_t first_axis_end) const |
| | Returns a view ot this tensor from a specified range of dimensions of the first axis.
|
| |
| void | view_of (const Tensor< T > &tensor, const txeo::TensorShape &shape) |
| | Views the content of the specified tensor according to the specified shape. There is no element copying.
|
| |
| template<typename U > |
| bool | is_equal_shape (const Tensor< U > &other) const |
| | Compares the shape of this tensor with the shape of the specified tensor.
|
| |
| T & | operator() () |
| | Accesses the value of this tensor if it is a scalar (order zero).
|
| |
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...) |
| T & | operator() (Args... args) |
| | Accesses an element of this tensor according to the specified indexes.
|
| |
| T & | at () |
| | Accesses the value of this tensor if it is a scalar (order zero).
|
| |
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...) |
| T & | at (Args... args) |
| | Accesses an element of this tensor according to the specified indexes.
|
| |
| const T & | operator() () const |
| | Reads the value of this tensor if it is a scalar (order zero).
|
| |
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...) |
| const T & | operator() (Args... args) const |
| | Reads an element of this tensor according to the specified indexes.
|
| |
| const T & | at () const |
| | Reads the value of this tensor if it is a scalar (order zero). Order checking is performed.
|
| |
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...) |
| const T & | at (Args... args) const |
| | Reads an element of this tensor according to the specified indexes.
|
| |
| void | reshape (const txeo::TensorShape &shape) |
| | Reshapes this tensor if the specified shape defines a number of elements equal to this tensor order.
|
| |
| void | reshape (const std::vector< size_t > &shape) |
| | Reshapes this tensor if the specified shape vector defines a number of elements equal to this tensor order.
|
| |
| void | reshape (const std::initializer_list< size_t > &shape) |
| | Reshapes this tensor if the specified shape vector defines a number of elements equal to this tensor order.
|
| |
| Tensor< T > | flatten () const |
| | Returns a first order reshaped view of this tensor.
|
| |
| void | fill (const T &value) |
| | Fills this tensor with the specified value.
|
| |
| void | fill_with_uniform_random (const T &min, const T &max) |
| | Fills the tensor with uniformly distributed random values ranging according to the specified interval.
|
| |
| void | fill_with_uniform_random (const T &min, const T &max, const size_t &seed1, const size_t &seed2) |
| | Fills the tensor with uniformly distributed random values ranging according to the specified interval.
|
| |
| void | shuffle () |
| | Shuffles the elements of this tensor.
|
| |
| void | squeeze () |
| | Reshapes this tensor by removing all the axes of dimension one.
|
| |
| Tensor< T > & | increase_dimension (size_t axis, T value) |
| | Increments the dimension of the specified axis.
|
| |
| Tensor< T > & | power (const T &exponent) |
| | Raises all tensor elements to the specified power.
|
| |
| Tensor< T > & | square () |
| | Squares all tensor elements in-place.
|
| |
| Tensor< T > & | sqrt () |
| | Computes square root of all tensor elements in-place.
|
| |
| Tensor< T > & | abs () |
| | Computes absolute value of all tensor elements in-place.
|
| |
| Tensor< T > & | permute (const std::vector< size_t > &axes) |
| | Permutes tensor dimensions according to specified axis order.
|
| |
| Tensor< T > & | normalize (size_t axis, txeo::NormalizationType type) |
| | Normalizes tensor along specified axis.
|
| |
| Tensor< T > & | normalize (txeo::NormalizationType type) |
| | Normalizes entire tensor.
|
| |
| T | inner (const Tensor< T > &tensor) const |
| | Computes inner product with another tensor.
|
| |
| Tensor< T > & | operator= (const T &value) |
| | Assigns a specified value to this tensor elements.
|
| |
| T * | data () |
| | Acesses the raw data of this tensor.
|
| |
| const T * | data () const |
| | Reads the raw data of this tensor.
|
| |
| Tensor< T > | clone () const |
| | Returns a clone of this tensor.
|
| |
| Tensor< T > & | operator+= (const Tensor< T > &tensor) |
| |
| Tensor< T > & | operator+= (const T &tensor) |
| |
| Tensor< T > & | operator-= (const Tensor< T > &tensor) |
| |
| Tensor< T > & | operator-= (const T &tensor) |
| |
| Tensor< T > & | operator*= (const T &scalar) |
| |
| Tensor< T > & | operator/= (const T &scalar) |
| |
| txeo::TensorIterator< T > | begin () |
| |
| txeo::TensorIterator< T > | end () |
| |
| txeo::TensorIterator< const T > | begin () const |
| |
| txeo::TensorIterator< const T > | end () const |
| |
A class representing a matrix, derived from Tensor.
This class provides constructors for creating matrices with various initialization methods. It inherits from txeo::Tensor<T> and specializes it for 2nd-order data.
- Template Parameters
-
| T | The data type of the matrix elements (e.g., int, double). |
- Examples
- /opt/build/repo/include/txeo/DataTable.h.
Definition at line 46 of file Matrix.h.