|
| ~Vector ()=default |
|
| Vector (const Vector &Vector) |
|
| Vector (Vector &&Vector) noexcept |
|
Vector & | operator= (const Vector &Vector) |
|
Vector & | operator= (Vector &&Vector) noexcept |
|
| Vector (size_t dim) |
| Constructs a vector with the specified dimension.
|
|
| Vector (size_t dim, const T &fill_value) |
| Constructs a vector with the specified dimension and fill value.
|
|
| Vector (size_t dim, const std::vector< T > &values) |
| Constructs a vector with the specified dimension and values.
|
|
| Vector (size_t dim, const std::initializer_list< T > &values) |
| Constructs a vector with the specified dimension and initializer list.
|
|
| Vector (const std::initializer_list< T > &values) |
| Constructs a vector from an initializer list.
|
|
| Vector (txeo::Tensor< T > &&tensor) |
| Constructs a vector by moving data from a Tensor.
|
|
void | reshape (const txeo::TensorShape &shape) |
|
void | reshape (const std::vector< size_t > &shape) |
|
void | reshape (const std::initializer_list< size_t > &shape) |
|
| Tensor (const Tensor &tensor) |
|
| Tensor (Tensor &&tensor) noexcept |
|
| ~Tensor () |
|
Tensor & | operator= (const Tensor &tensor) |
|
Tensor & | operator= (Tensor &&tensor) noexcept |
|
bool | operator== (const Tensor &tensor) |
|
bool | operator!= (const Tensor &tensor) |
|
| Tensor (const txeo::TensorShape &shape) |
| Constructs a tensor from a specified txeo::TensorShape.
|
|
| Tensor (txeo::TensorShape &&shape) |
| Constructs a Tensor from a specified txeo::TensorShape.
|
|
| Tensor (const std::vector< size_t > &shape) |
| Constructs a Tensor from a specified shape std::vector.
|
|
| Tensor (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 (const txeo::TensorShape &shape, const T &fill_value) |
| Constructs a Tensor from a specified txeo::TensorShape and fills it with a value.
|
|
| Tensor (txeo::TensorShape &&shape, const T &fill_value) |
| Constructs a Tensor from a specified txeo::TensorShape 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 (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 > & | 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 |
|
template<typename T>
class txeo::Vector< T >
A class representing a vector, derived from Tensor.
This class provides constructors for creating vectors with various initialization methods. It inherits from txeo::Tensor<T>
and specializes it for order one data.
- Template Parameters
-
T | The data type of the vector elements (e.g., int, double). |
Definition at line 42 of file Vector.h.