9#include <initializer_list>
109 explicit Vector(
size_t dim,
const std::initializer_list<T> &values)
122 explicit Vector(
const std::initializer_list<T> &values)
123 :
txeo::
Tensor<T>({values.size()}, std::vector<T>(values)) {};
229 using std::runtime_error::runtime_error;
Class that deals with the main tasks of prediction (inference)
A utility class for aggregation functions on tensors.
A utility class for common math functions on tensors.
Implements the mathematical concept of tensor, which is a magnitude of multiple order....
Tensor & operator=(const Tensor &tensor)
const txeo::TensorShape & shape() const
Returns the shape of this tensor.
size_t dim() const
Returns the dimension of this tensor.
A utility class for performing operations on tensors and vectors.
A utility class for partitioning tensors.
The shape of a tensor is an ordered collection of dimensions of mathematical vector spaces.
Exceptions concerning txeo::Vector.
A class representing a vector, derived from Tensor.
void reshape(const std::vector< size_t > &shape)
Vector(const std::initializer_list< T > &values)
Constructs a vector from an initializer list.
Vector(size_t dim, const std::initializer_list< T > &values)
Constructs a vector with the specified dimension and initializer list.
static Vector< T > to_vector(txeo::Tensor< T > &&tensor)
Converts a tensor to a vector by moving data.
static txeo::Tensor< T > to_tensor(Vector< T > &&vector)
Converts a vector to a tensor by moving data.
Vector(txeo::Tensor< T > &&tensor)
Constructs a vector by moving data from a Tensor.
static Vector< T > to_vector(const txeo::Tensor< T > &tensor)
Creates a vector from a tensor (performs copy).
Vector(Vector &&Vector) noexcept
friend class txeo::detail::TensorHelper
void reshape(const std::initializer_list< size_t > &shape)
Vector(size_t dim, const std::vector< T > &values)
Constructs a vector with the specified dimension and values.
Vector(const Vector &Vector)
Vector(size_t dim, const T &fill_value)
Constructs a vector with the specified dimension and fill value.
Vector & operator=(const Vector &Vector)
static txeo::Tensor< T > to_tensor(const Vector< T > &vector)
Creates a tensor from a vector (performs copy).
Vector & operator=(Vector &&Vector) noexcept
Vector(size_t dim)
Constructs a vector with the specified dimension.
void reshape(const txeo::TensorShape &shape)