Txeo v0.1
A Developer-Friendly TensorFlow C++ Wrapper
Loading...
Searching...
No Matches
txeo::Tensor< T > Class Template Reference

Implements the mathematical concept of tensor, which is a magnitude of multiple order. A tensor of order zero is defined to be a scalar, of order one a vector, of order two a matrix and so on. Each order of the tensor has a dimension. Elements are addressed via multidimensional indexing. More...

#include <Tensor.h>

Inheritance diagram for txeo::Tensor< T >:
Inheritance graph
Collaboration diagram for txeo::Tensor< T >:
Collaboration graph

Public Member Functions

 Tensor ()
 
 Tensor (const Tensor &tensor)
 
 Tensor (Tensor &&tensor) noexcept
 
virtual ~Tensor ()
 
Tensoroperator= (const Tensor &tensor)
 
Tensoroperator= (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::TensorShapeshape () const
 Returns the shape of this tensor.
 
constexpr std::type_identity_t< Ttype () 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< Tslice (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.
 
Toperator() ()
 Accesses the value of this tensor if it is a scalar (order zero).
 
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
Toperator() (Args... args)
 Accesses an element of this tensor according to the specified indexes.
 
Tat ()
 Accesses the value of this tensor if it is a scalar (order zero).
 
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
Tat (Args... args)
 Accesses an element of this tensor according to the specified indexes.
 
const Toperator() () 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 Toperator() (Args... args) const
 Reads an element of this tensor according to the specified indexes.
 
const Tat () 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 Tat (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< Tflatten () 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.
 
Tdata ()
 Acesses the raw data of this tensor.
 
const Tdata () const
 Reads the raw data of this tensor.
 
Tensor< Tclone () 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< Tbegin ()
 
txeo::TensorIterator< Tend ()
 
txeo::TensorIterator< const Tbegin () const
 
txeo::TensorIterator< const Tend () const
 

Protected Member Functions

template<typename P >
void create_from_shape (P &&shape)
 
void fill_data_shape (const std::initializer_list< std::initializer_list< T > > &list, std::vector< T > &flat_data, std::vector< size_t > &shape)
 
void fill_data_shape (const std::initializer_list< std::initializer_list< std::initializer_list< T > > > &list, std::vector< T > &flat_data, std::vector< size_t > &shape)
 
void check_indexes (const std::vector< size_t > &indexes)
 

Protected Attributes

std::unique_ptr< Impl_impl {nullptr}
 

Friends

class txeo::Predictor< T >
 
class txeo::TensorAgg< T >
 
class txeo::TensorPart< T >
 
class txeo::TensorOp< T >
 
class txeo::TensorFunc< T >
 
class txeo::detail::TensorHelper
 
template<typename U >
std::ostream & operator<< (std::ostream &os, const Tensor< U > &tensor)
 
template<typename U >
txeo::Tensor< Uoperator+ (const txeo::Tensor< U > &left, const txeo::Tensor< U > &right)
 Returns the sum of two tensors.
 
template<typename U >
txeo::Tensor< Uoperator+ (const txeo::Tensor< U > &left, const U &right)
 
template<typename U >
txeo::Tensor< Uoperator- (const txeo::Tensor< U > &left, const txeo::Tensor< U > &right)
 Returns the subtraction of two tensors.
 
template<typename U >
txeo::Tensor< Uoperator- (const txeo::Tensor< U > &left, const U &right)
 Element-wise tensor-scalar addition operator.
 
template<typename U >
txeo::Tensor< Uoperator- (const U &left, const txeo::Tensor< U > &right)
 Element-wise scalar-tensor subtraction operator.
 
template<typename U >
txeo::Tensor< Uoperator* (const txeo::Tensor< U > &tensor, const U &scalar)
 Returns the scalar multiplication of a tensor.
 
template<typename U >
txeo::Tensor< Uoperator* (const U &scalar, const txeo::Tensor< U > &tensor)
 
template<typename U >
txeo::Tensor< Uoperator/ (const txeo::Tensor< U > &left, const U &right)
 Element-wise division operator (tensor / scalar)
 
template<typename U >
txeo::Tensor< Uoperator/ (const U &left, const txeo::Tensor< U > &right)
 Element-wise scalar-tensor division operator.
 

Detailed Description

template<typename T>
class txeo::Tensor< T >

Implements the mathematical concept of tensor, which is a magnitude of multiple order. A tensor of order zero is defined to be a scalar, of order one a vector, of order two a matrix and so on. Each order of the tensor has a dimension. Elements are addressed via multidimensional indexing.

Definition at line 50 of file Tensor.h.

Constructor & Destructor Documentation

◆ Tensor() [1/18]

template<typename T >
txeo::Tensor< T >::Tensor ( )
explicit

◆ Tensor() [2/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const Tensor< T > &  tensor)
Note
This copy constructor performs a deep copy, behaving differently from TensorFlow C++.

◆ Tensor() [3/18]

template<typename T >
txeo::Tensor< T >::Tensor ( Tensor< T > &&  tensor)
noexcept

◆ ~Tensor()

template<typename T >
virtual txeo::Tensor< T >::~Tensor ( )
virtual

◆ Tensor() [4/18]

template<typename T >
txeo::Tensor< T >::Tensor ( txeo::TensorShape &&  shape)
explicit

Constructs a Tensor from a specified txeo::TensorShape.

Parameters
shapeShape of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
// Move-construct a tensor with shape 3x4
std::cout << "Tensor created with shape: " << tensor.shape() << std::endl;
return 0;
}
A container for managing training, evaluation, and test data splits.
Definition DataTable.h:24
The shape of a tensor is an ordered collection of dimensions of mathematical vector spaces.
Definition TensorShape.h:31

◆ Tensor() [5/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const txeo::TensorShape shape)
inlineexplicit

Constructs a tensor from a specified txeo::TensorShape.

Parameters
shapeShape of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::TensorShape shape({3, 4}); // Define a 3x4 tensor shape
txeo::Tensor<int> tensor(shape); // Create a tensor with the given shape
std::cout << "Tensor created with shape: " << tensor.shape() << std::endl;
return 0;
}
const txeo::TensorShape & shape() const
Returns the shape of this tensor.

Definition at line 113 of file Tensor.h.

113: Tensor{shape.clone()} {};
DataTable< T > clone() const

◆ Tensor() [6/18]

template<typename T >
txeo::Tensor< T >::Tensor ( std::vector< size_t > &&  shape)
explicit

Constructs a Tensor from a specified shape std::vector.

Parameters
shapeVector of dimensions

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::cout << "Tensor created with shape: " << tensor.shape() << std::endl;
return 0;
}

◆ Tensor() [7/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::vector< size_t > &  shape)
inlineexplicit

Constructs a Tensor from a specified shape std::vector.

Parameters
shapeVector of dimensions

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::vector<size_t> shape = {3, 4};
txeo::Tensor<int> tensor(shape); // Create a tensor with shape 3x4
std::cout << "Tensor created with shape: " << tensor.shape() << std::endl;
return 0;
}

Definition at line 155 of file Tensor.h.

155: Tensor{std::vector<size_t>(shape)} {};

◆ Tensor() [8/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::initializer_list< size_t > &  shape)
inlineexplicit

Constructs a Tensor from a specified shape std::vector.

Parameters
shapeVector of dimensions

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::cout << "Tensor created with shape: " << tensor.shape() << std::endl;
return 0;
}

Definition at line 175 of file Tensor.h.

176 : Tensor(std::vector<size_t>(shape)) {}

◆ Tensor() [9/18]

template<typename T >
txeo::Tensor< T >::Tensor ( txeo::TensorShape &&  shape,
const T fill_value 
)
explicit

Constructs a Tensor from a specified txeo::TensorShape and fills it with a value.

Parameters
shapeShape of the constructed tensor
fill_valueValue of the elements of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

◆ Tensor() [10/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const txeo::TensorShape shape,
const T fill_value 
)
inlineexplicit

Constructs a Tensor from a specified txeo::TensorShape and fills it with a value.

Parameters
shapeShape of the constructed tensor
fill_valueValue of the elements of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor(shape, 5); // Create a 3x4 tensor filled with 5
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

Definition at line 221 of file Tensor.h.

222 : Tensor{shape.clone(), fill_value} {};

◆ Tensor() [11/18]

template<typename T >
txeo::Tensor< T >::Tensor ( std::vector< size_t > &&  shape,
const T fill_value 
)
explicit

Constructs a Tensor from a specified shape std::vector and fills it with a value.

Parameters
shapeShape of the constructed tensor
fill_valueValue of the elements of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor(std::vector<size_t>({3, 4}), 7);
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

◆ Tensor() [12/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::vector< size_t > &  shape,
const T fill_value 
)
inlineexplicit

Constructs a Tensor from a specified shape std::vector and fills it with a value.

Parameters
shapeShape of the constructed tensor
fill_valueValue of the elements of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::vector<size_t> shape = {3, 4};
txeo::Tensor<int> tensor(shape, 5); // Create a 3x4 tensor filled with 5
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

Definition at line 265 of file Tensor.h.

266 : Tensor(std::vector<size_t>(shape), fill_value) {};

◆ Tensor() [13/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::initializer_list< size_t > &  shape,
const T fill_value 
)
inlineexplicit

Constructs a Tensor from a specified initializer list and fills it with a value.

Parameters
shapeShape of the constructed tensor
fill_valueValue of the elements of the constructed tensor

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

Definition at line 287 of file Tensor.h.

288 : Tensor(std::vector<size_t>(shape), fill_value) {}

◆ Tensor() [14/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const txeo::TensorShape shape,
const std::vector< T > &  values 
)
explicit

Constructs a Tensor object from a specified txeo::TensorShape and fills it with a std::vector of values in a row-major scheme.

Parameters
shapeShape of the constructed tensor
valuesElements of the constructed tensor
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor(txeo::TensorShape({2, 3}), {1, 2, 3, 4, 5, 6}); // Create a 2x3
tensor initialized with given values
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

◆ Tensor() [15/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::vector< size_t > &  shape,
const std::vector< T > &  values 
)
explicit

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.

Parameters
shapeShape of the constructed tensor
valuesElements of the constructed tensor
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor(std::vector<size_t>({2, 3}), {1, 2, 3, 4, 5, 6});
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

◆ Tensor() [16/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::initializer_list< size_t > &  shape,
const std::vector< T > &  values 
)
inlineexplicit

Constructs a Tensor object from a specified initializer list and fills it with a std::vector of values in a row-major scheme.

Parameters
shapeShape of the constructed tensor
valuesElements of the constructed tensor
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor({2, 3}, {1, 2, 3, 4, 5, 6});
std::cout << "Tensor initialized with: " << tensor << std::endl;
return 0;
}

Definition at line 364 of file Tensor.h.

365 : Tensor(std::vector<size_t>(shape), values) {}

◆ Tensor() [17/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::initializer_list< std::initializer_list< T > > &  values)
explicit

Constructs a second order Tensor from a nested std::initializer_list.

Parameters
valuesNested initializer list
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}};
std::cout << tensor << std::endl; // Print the tensor
return 0;
}

◆ Tensor() [18/18]

template<typename T >
txeo::Tensor< T >::Tensor ( const std::initializer_list< std::initializer_list< std::initializer_list< T > > > &  values)
explicit

Constructs a third order Tensor from a nested std::initializer_list.

Parameters
valuesNested initializer list
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
// Creating a 3D tensor with shape (4,2,3)
{{1, 2, 3}, {4, 5, 6}},
{{7, 8, 9}, {10, 11, 12}},
{{-1, -2, -3}, {-4, -5, -6}},
{{-7, -8, -9}, {-10, -11, -12}}
};
std::cout << tensor << std::endl; // Print the tensor
return 0;
}

Member Function Documentation

◆ abs()

template<typename T >
Tensor< T > & txeo::Tensor< T >::abs ( )

Computes absolute value of all tensor elements in-place.

Returns
Reference to this tensor

Example Usage:

txeo::Tensor<int> t({3}, {-5, 0, 8});
t.abs();
// Result: [5, 0, 8]

◆ at() [1/4]

template<typename T >
T & txeo::Tensor< T >::at ( )

Accesses the value of this tensor if it is a scalar (order zero).

Returns
T& Value of the zeroth order tensor
Exceptions
txeo::TensorError
Note
Order checking is performed.

◆ at() [2/4]

template<typename T >
const T & txeo::Tensor< T >::at ( ) const

Reads the value of this tensor if it is a scalar (order zero). Order checking is performed.

Exceptions
txeo::TensorError
Returns
T& Value of the zeroth order tensor

◆ at() [3/4]

template<typename T >
requires (std::convertible_to<Args, size_t> && ...)
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
T & txeo::Tensor< T >::at ( Args...  args)
inline

Accesses an element of this tensor according to the specified indexes.

Template Parameters
ArgsA variadic list of indices that must be convertible to size_t.
Parameters
argsThe indices specifying the position of the element.
Returns
Element at the specified indices.
Exceptions
txeo::TensorError
Note
Bound and order checkings are performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}};
tensor(1, 2) = 42; // Modify an element at row 1, column 2
std::cout << "Updated value: " << tensor(1, 2) << std::endl;
return 0;
}

Definition at line 1254 of file Tensor.h.

1254 {
1255 if (this->order() != sizeof...(Args))
1256 throw TensorError("The number of axes specified and the order of this tensor do no match.");
1257 try {
1258 check_indexes({static_cast<size_t>(args)...});
1259 } catch (std::exception e) {
1260 throw txeo::TensorError(e.what());
1261 }
1262
1263 return (*this)(args...);
1264}
Exceptions concerning txeo::Tensor.
Definition Tensor.h:1216
void check_indexes(const std::vector< size_t > &indexes)
int order() const
Returns the order of this tensor.

◆ at() [4/4]

template<typename T >
requires (std::convertible_to<Args, size_t> && ...)
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
const T & txeo::Tensor< T >::at ( Args...  args) const
inline

Reads an element of this tensor according to the specified indexes.

Template Parameters
ArgsA variadic list of indices that must be convertible to size_t.
Parameters
argsThe indices specifying the position of the element.
Returns
Element at the specified indices.
Exceptions
txeo::TensorError
Note
Bound and order checkings are performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}};
tensor(1, 2) = 42; // Modify an element at row 1, column 2
std::cout << "Updated value: " << tensor(1, 2) << std::endl;
return 0;
}

Definition at line 1269 of file Tensor.h.

1269 {
1270 if (this->order() != sizeof...(Args))
1271 throw TensorError("The number of axes specified and the order of this tensor do no match.");
1272 try {
1273 check_indexes({static_cast<size_t>(args)...});
1274 } catch (std::exception e) {
1275 throw txeo::TensorError(e.what());
1276 }
1277
1278 return (*this)(args...);
1279}

◆ begin() [1/2]

template<typename T >
txeo::TensorIterator< T > txeo::Tensor< T >::begin ( )

◆ begin() [2/2]

template<typename T >
txeo::TensorIterator< const T > txeo::Tensor< T >::begin ( ) const

◆ check_indexes()

template<typename T >
void txeo::Tensor< T >::check_indexes ( const std::vector< size_t > &  indexes)
protected

◆ clone()

template<typename T >
Tensor< T > txeo::Tensor< T >::clone ( ) const

Returns a clone of this tensor.

Returns
Tensor<T> A clone of this tensor
Note
A copy is performed

◆ create_from_shape()

template<typename T >
template<typename P >
void txeo::Tensor< T >::create_from_shape ( P &&  shape)
protected

◆ data() [1/2]

template<typename T >
T * txeo::Tensor< T >::data ( )

Acesses the raw data of this tensor.

Returns
T*

◆ data() [2/2]

template<typename T >
const T * txeo::Tensor< T >::data ( ) const

Reads the raw data of this tensor.

Returns
const T*

◆ dim()

template<typename T >
size_t txeo::Tensor< T >::dim ( ) const

Returns the dimension of this tensor.

Returns
size_t
Here is the caller graph for this function:

◆ end() [1/2]

template<typename T >
txeo::TensorIterator< T > txeo::Tensor< T >::end ( )

◆ end() [2/2]

template<typename T >
txeo::TensorIterator< const T > txeo::Tensor< T >::end ( ) const

◆ fill()

template<typename T >
void txeo::Tensor< T >::fill ( const T value)

Fills this tensor with the specified value.

Parameters
valueValue to fill this tensor

◆ fill_data_shape() [1/2]

template<typename T >
void txeo::Tensor< T >::fill_data_shape ( const std::initializer_list< std::initializer_list< std::initializer_list< T > > > &  list,
std::vector< T > &  flat_data,
std::vector< size_t > &  shape 
)
protected

Definition at line 1298 of file Tensor.h.

1300 {
1301 shape.emplace_back(list.size());
1302 std::vector<std::initializer_list<std::initializer_list<T>>> v_list(list);
1303 for (size_t i{1}; i < v_list.size(); ++i)
1304 if (v_list[i].size() != v_list[i - 1].size())
1305 throw txeo::TensorError("Tensor initialization is inconsistent!");
1306
1307 shape.emplace_back(v_list[0].size());
1308 bool emplaced{false};
1309 for (size_t i{0}; i < v_list.size(); ++i) {
1310 std::vector<std::initializer_list<T>> v_sublist(v_list[i]);
1311 for (size_t i{1}; i < v_sublist.size(); ++i)
1312 if (v_sublist[i].size() != v_sublist[i - 1].size())
1313 throw txeo::TensorError("Tensor initialization is inconsistent!");
1314
1315 if (!emplaced) {
1316 shape.emplace_back(v_sublist[0].size());
1317 emplaced = true;
1318 }
1319 for (auto &item : v_sublist)
1320 for (auto &subitem : item)
1321 flat_data.emplace_back(subitem);
1322 }
1323}

◆ fill_data_shape() [2/2]

template<typename T >
void txeo::Tensor< T >::fill_data_shape ( const std::initializer_list< std::initializer_list< T > > &  list,
std::vector< T > &  flat_data,
std::vector< size_t > &  shape 
)
protected

Definition at line 1282 of file Tensor.h.

1283 {
1284
1285 shape.emplace_back(list.size());
1286 std::vector<std::initializer_list<T>> v_list(list);
1287 for (size_t i{1}; i < v_list.size(); ++i)
1288 if (v_list[i].size() != v_list[i - 1].size())
1289 throw txeo::TensorError("Tensor initialization is inconsistent!");
1290
1291 shape.emplace_back(v_list[0].size());
1292 for (auto &item : v_list)
1293 for (auto &subitem : item)
1294 flat_data.emplace_back(subitem);
1295}

◆ fill_with_uniform_random() [1/2]

template<typename T >
void txeo::Tensor< T >::fill_with_uniform_random ( const T min,
const T max 
)

Fills the tensor with uniformly distributed random values ranging according to the specified interval.

Template Parameters
TThe data type of the tensor elements.
Parameters
minThe minimum possible random value.
maxThe maximum possible random value.
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<float> tensor{3, 3}; // Create a 3x3 tensor
tensor.fill_with_uniform_random(0.0f, 1.0f);
std::cout << "Tensor filled with random values: " << tensor << std::endl;
return 0;
}

◆ fill_with_uniform_random() [2/2]

template<typename T >
void txeo::Tensor< T >::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.

Template Parameters
TThe data type of the tensor elements.
Parameters
minThe minimum possible random value.
maxThe maximum possible random value.
seed1The first seed for random number generation (in order to enable reproducibility).
seed2The second seed for random number generation (in order to enable reproducibility).
Exceptions
txeo::TensorError

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<float> tensor{3, 3}; // Create a 3x3 tensor
tensor.fill_with_uniform_random(0.0f, 1.0f, 42, 123);
std::cout << "Tensor filled with random values: " << tensor << std::endl;
return 0;
}

◆ flatten()

template<typename T >
Tensor< T > txeo::Tensor< T >::flatten ( ) const

Returns a first order reshaped view of this tensor.

Returns
Tensor<T> First order tensor that views this tensor.
Exceptions
txeo::TensorError
Note
No copy is performed.

◆ increase_dimension()

template<typename T >
Tensor< T > & txeo::Tensor< T >::increase_dimension ( size_t  axis,
T  value 
)

Increments the dimension of the specified axis.

Parameters
axisPosition where new dimension will be inserted
valueValue to fill the new dimension elements with
Returns
Reference to this tensor

Example Usage:

// Add new dimension to 2x3 matrix making it 2x1x3
txeo::Tensor<float> t({2, 3}, {1,2,3,4,5,6});
t.increase_dimension(1, -1.0f);
// New shape: [2, 4]
// t(0,2) == -1.0f, t(1,2) == -1.0f

◆ inner()

template<typename T >
T txeo::Tensor< T >::inner ( const Tensor< T > &  tensor) const

Computes inner product with another tensor.

Parameters
tensorRight-hand operand for dot product
Returns
Inner product product result
Exceptions
TensorOpError

Example Usage:

// Matrix-matrix product
txeo::Tensor<double> a({2,3}, {1,2,3,4,5,6});
txeo::Tensor<double> b({2,3}, {6,5,4,3,2,1});
auto mat_result = a.inner(b);
// mat_result = 1*6 + 2*5 + 3*4 + 4*3 + 5*2 + 6*1

◆ is_equal_shape()

template<typename T >
template<typename U >
bool txeo::Tensor< T >::is_equal_shape ( const Tensor< U > &  other) const
inline

Compares the shape of this tensor with the shape of the specified tensor.

Template Parameters
UData type of the specfied tensor
Parameters
otherThe tensor to compare
Returns
true if both this tensor and the other have the same shape
false otherwise

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor1{{1, 2, 3}, {4, 5, 6}};
txeo::Tensor<double> tensor2{{7.0, 8.0, 9.0}, {10.0, 11.0, 12.0}};
if (tensor1.is_equal_shape(tensor2)) {
std::cout << "Tensors have the same shape." << std::endl;
} else {
std::cout << "Tensors have different shapes." << std::endl;
}
return 0;
}

Definition at line 524 of file Tensor.h.

524 {
525 return this->shape() == other.shape();
526 };
Here is the call graph for this function:

◆ memory_size()

template<typename T >
size_t txeo::Tensor< T >::memory_size ( ) const

Returns the number of bytes occupied by this tensor.

Returns
size_t

◆ normalize() [1/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::normalize ( size_t  axis,
txeo::NormalizationType  type 
)

Normalizes tensor along specified axis.

Parameters
axisAxis to normalize along
typeNormalization type (MIN_MAX or Z_SCORE)
Returns
Reference to this tensor

Example Usage:

// Z-score normalization along columns
txeo::Tensor<float> t({3, 2}, {1, 2, 3, 4, 5, 6});
// Each column will have μ=0, σ=1
// Min-max normalization of entire tensor
// All values scaled between 0 and 1

◆ normalize() [2/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::normalize ( txeo::NormalizationType  type)

Normalizes entire tensor.

Parameters
typeNormalization type (MIN_MAX or Z_SCORE)
Returns
Reference to modified tensor

◆ number_of_elements()

template<typename T >
size_t txeo::Tensor< T >::number_of_elements ( ) const
inline

Returns the number of elements of this tensor, which corresponds to the dimension of this tensor.

Returns
size_t

Definition at line 452 of file Tensor.h.

452{ return this->dim(); };
size_t dim() const
Returns the dimension of this tensor.
Here is the call graph for this function:

◆ operator!=()

template<typename T >
bool txeo::Tensor< T >::operator!= ( const Tensor< T > &  tensor)

◆ operator()() [1/4]

template<typename T >
T & txeo::Tensor< T >::operator() ( )

Accesses the value of this tensor if it is a scalar (order zero).

Since this function does not perform any checking, it accesses the first value of this tensor if it has order greater than zero.

Returns
T& Value of the zeroth order tensor

◆ operator()() [2/4]

template<typename T >
const T & txeo::Tensor< T >::operator() ( ) const

Reads the value of this tensor if it is a scalar (order zero).

Returns
T& Value of the zeroth order tensor
Note
Since this function does not perform any checking, it accesses the first value of this tensor if it has order greater than zero.

◆ operator()() [3/4]

template<typename T >
requires (std::convertible_to<Args, size_t> && ...)
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
T & txeo::Tensor< T >::operator() ( Args...  args)
inline

Accesses an element of this tensor according to the specified indexes.

Template Parameters
ArgsA variadic list of indices that must be convertible to size_t.
Parameters
argsThe indices specifying the position of the element.
Returns
Element at the specified indices.
Note
No checking is performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}};
tensor(1, 2) = 42; // Modify an element at row 1, column 2
std::cout << "Updated value: " << tensor(1, 2) << std::endl;
return 0;
}

Definition at line 1224 of file Tensor.h.

1224 {
1225 size_t indexes[] = {static_cast<size_t>(args)...};
1226 size_t size = this->order();
1227 auto *stride = this->shape().stride().data();
1228 size_t flat_index{indexes[size - 1]};
1229
1230 for (size_t i = 0; i < size - 1; ++i)
1231 flat_index += indexes[i] * stride[i];
1232
1233 return this->data()[flat_index];
1234}
T * data()
Acesses the raw data of this tensor.

◆ operator()() [4/4]

template<typename T >
requires (std::convertible_to<Args, size_t> && ...)
template<typename... Args>
requires (std::convertible_to<Args, size_t> && ...)
const T & txeo::Tensor< T >::operator() ( Args...  args) const
inline

Reads an element of this tensor according to the specified indexes.

Template Parameters
ArgsA variadic list of indices that must be convertible to size_t.
Parameters
argsThe indices specifying the position of the element.
Returns
Element at the specified indices.
Note
No checking is performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}};
tensor(1, 2) = 42; // Modify an element at row 1, column 2
std::cout << "Updated value: " << tensor(1, 2) << std::endl;
return 0;
}

Definition at line 1239 of file Tensor.h.

1239 {
1240 size_t indexes[] = {static_cast<size_t>(args)...};
1241 size_t size = this->order();
1242 auto *stride = this->shape().stride().data();
1243 size_t flat_index{indexes[size - 1]};
1244
1245 for (size_t i = 0; i < size - 1; ++i)
1246 flat_index += indexes[i] * stride[i];
1247
1248 return this->data()[flat_index];
1249}

◆ operator*=()

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator*= ( const T scalar)

◆ operator+=() [1/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator+= ( const T tensor)

◆ operator+=() [2/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator+= ( const Tensor< T > &  tensor)

◆ operator-=() [1/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator-= ( const T tensor)

◆ operator-=() [2/2]

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator-= ( const Tensor< T > &  tensor)

◆ operator/=()

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator/= ( const T scalar)

◆ operator=() [1/3]

template<typename T >
Tensor< T > & txeo::Tensor< T >::operator= ( const T value)

Assigns a specified value to this tensor elements.

Parameters
valueValue to be assigned
Returns
Tensor<T>&

◆ operator=() [2/3]

template<typename T >
Tensor & txeo::Tensor< T >::operator= ( const Tensor< T > &  tensor)
Note
This copy assignment performs a deep copy, behaving differently from TensorFlow C++.
Here is the caller graph for this function:

◆ operator=() [3/3]

template<typename T >
Tensor & txeo::Tensor< T >::operator= ( Tensor< T > &&  tensor)
noexcept

◆ operator==()

template<typename T >
bool txeo::Tensor< T >::operator== ( const Tensor< T > &  tensor)

◆ order()

template<typename T >
int txeo::Tensor< T >::order ( ) const

Returns the order of this tensor.

Returns
int

◆ permute()

template<typename T >
Tensor< T > & txeo::Tensor< T >::permute ( const std::vector< size_t > &  axes)

Permutes tensor dimensions according to specified axis order.

Parameters
axesNew axis order (must be valid permutation of existing axes)
Returns
Reference to this tensor
Exceptions
TensorFuncErrorfor invalid permutation

Example Usage:

txeo::Tensor<int> t({2, 3, 4}); // Shape [2,3,4]
t.permute({2, 0, 1}); // New shape [4,2,3]
// Element at (i,j,k) moves to (k,i,j)

◆ power()

template<typename T >
Tensor< T > & txeo::Tensor< T >::power ( const T exponent)

Raises all tensor elements to the specified power.

Parameters
exponentPower to raise elements to
Returns
Reference to modified tensor

Example Usage:

txeo::Tensor<int> t({2, 2}, {2, 3, 4, 5});
t.power(3);
// Result: [8, 27, 64, 125]

◆ reshape() [1/3]

template<typename T >
void txeo::Tensor< T >::reshape ( const std::initializer_list< size_t > &  shape)
inline

Reshapes this tensor if the specified shape vector defines a number of elements equal to this tensor order.

Parameters
shapeNew shape vector for this tensor
Exceptions
txeo::TensorError
Note
No copy is performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3, 4}}; // Shape (1, 4)
tensor.reshape({2, 2}); // Change shape to (2, 2)
std::cout << "Reshaped Tensor: " << tensor << std::endl;
return 0;
}

Definition at line 761 of file Tensor.h.

761 {
762 this->reshape(std::vector<size_t>(shape));
763 };
void reshape(const txeo::TensorShape &shape)
Reshapes this tensor if the specified shape defines a number of elements equal to this tensor order.
Here is the call graph for this function:

◆ reshape() [2/3]

template<typename T >
void txeo::Tensor< T >::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.

Parameters
shapeNew shape vector for this tensor
Exceptions
txeo::TensorError
Note
No copy is performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3, 4}}; // Shape (1, 4)
tensor.reshape(std::vector<size_t>{2, 2}); // Change shape to (2, 2)
std::cout << "Reshaped Tensor: " << tensor << std::endl;
return 0;
}

◆ reshape() [3/3]

template<typename T >
void txeo::Tensor< T >::reshape ( const txeo::TensorShape shape)

Reshapes this tensor if the specified shape defines a number of elements equal to this tensor order.

Parameters
shapeNew shape for this tensor
Exceptions
txeo::TensorError
Note
No copy is performed.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3, 4}}; // Shape (1, 4)
tensor.reshape(txeo::TensorShape({2, 2})); // Change shape to (2, 2)
std::cout << "Reshaped Tensor: " << tensor << std::endl;
return 0;
}
Here is the caller graph for this function:

◆ shape()

template<typename T >
const txeo::TensorShape & txeo::Tensor< T >::shape ( ) const

Returns the shape of this tensor.

Returns
const txeo::TensorShape&
Here is the caller graph for this function:

◆ shuffle()

template<typename T >
void txeo::Tensor< T >::shuffle ( )

Shuffles the elements of this tensor.

◆ slice()

template<typename T >
Tensor< T > txeo::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.

This function creates a new tensor that views the content of this tensor according to the specified parameters. There is no element copying.

Parameters
first_axis_beginInitial index along the first axis (inclusive).
first_axis_endFinal index along the first axis (exclusive).
Returns
Tensor<T>

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
txeo::Tensor<int> sliced_tensor = tensor.slice(0, 2); // Extract rows 0 and 1
std::cout << "Sliced Tensor: " << sliced_tensor << std::endl; // {{1, 2}, {4, 5}, {7, 8}}
return 0;
}

◆ sqrt()

template<typename T >
Tensor< T > & txeo::Tensor< T >::sqrt ( )

Computes square root of all tensor elements in-place.

Returns
Reference to modified tensor

Example Usage:

txeo::Tensor<float> t({2, 2}, {9.0f, 16.0f, 25.0f, 36.0f});
t.sqrt();
// Result: [3.0f, 4.0f, 5.0f, 6.0f]

◆ square()

template<typename T >
Tensor< T > & txeo::Tensor< T >::square ( )

Squares all tensor elements in-place.

Returns
Reference to modified tensor

Example Usage:

txeo::Tensor<double> t({3}, {-1.5, 2.0, 3.5});
t.square();
// Result: [2.25, 4.0, 12.25]

◆ squeeze()

template<typename T >
void txeo::Tensor< T >::squeeze ( )

Reshapes this tensor by removing all the axes of dimension one.

Note
If the tensor has no axes of order one, its shape remains unchanged.

Example Usage:

#include <iostream>
#include "txeo/Tensor.h"
int main() {
txeo::Tensor<int> tensor{{1}, {2}, {3}}; // Shape (3,1)
tensor.squeeze(); // Removes singleton dimension
std::cout << "Squeezed Tensor: " << tensor << std::endl;
return 0;
}

◆ type()

template<typename T >
constexpr std::type_identity_t< T > txeo::Tensor< T >::type ( ) const
constexpr

Returns the data type of this tensor.

Returns
constexpr std::type_identity_t<T>

◆ view_of()

template<typename T >
void txeo::Tensor< T >::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.

Parameters
tensorViewed tensor
shapeNew shape of this tensor

Friends And Related Symbol Documentation

◆ operator* [1/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator* ( const txeo::Tensor< U > &  tensor,
const U scalar 
)
friend

Returns the scalar multiplication of a tensor.

Template Parameters
Utype of the tensor involved
Parameters
tensorOperand to be multiplied
scalarOperand that multiplies
Returns
txeo::Tensor Result

Example Usage:

txeo::Tensor<int> a({3}, {1,2,3});
auto b = a * 2; // Result: [2,4,6]

◆ operator* [2/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator* ( const U scalar,
const txeo::Tensor< U > &  tensor 
)
friend

◆ operator+ [1/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator+ ( const txeo::Tensor< U > &  left,
const txeo::Tensor< U > &  right 
)
friend

Returns the sum of two tensors.

Template Parameters
Utype of the tensors involved
Parameters
leftLeft operand
rightRight operand
Returns
txeo::Tensor Result
Exceptions
txeo::TensorOpError

Example Usage:

txeo::Tensor<float> a({2,2}, {1,2,3,4});
txeo::Tensor<float> b({2,2}, {5,6,7,8});
auto c = a + b; // Result: [[6,8],[10,12]]

◆ operator+ [2/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator+ ( const txeo::Tensor< U > &  left,
const U right 
)
friend

◆ operator- [1/3]

template<typename T >
template<typename U >
txeo::Tensor< U > operator- ( const txeo::Tensor< U > &  left,
const txeo::Tensor< U > &  right 
)
friend

Returns the subtraction of two tensors.

Template Parameters
Utype of the tensors involved
Parameters
leftLeft operand
rightRight operand
Returns
txeo::Tensor Result
Exceptions
txeo::TensorOpError

Example Usage:

txeo::Tensor<double> a({2}, {5,7});
txeo::Tensor<double> b({2}, {1,3});
auto c = a - b; // Result: [4,4]

◆ operator- [2/3]

template<typename T >
template<typename U >
txeo::Tensor< U > operator- ( const txeo::Tensor< U > &  left,
const U right 
)
friend

Element-wise tensor-scalar addition operator.

Template Parameters
UNumeric type of tensor elements
Parameters
leftInput tensor
rightScalar to add
Returns
New tensor with elements: left[i] + right

Example Usage:

txeo::Tensor<int> t({2, 2}, {1, 2, 3, 4});
auto result = t + 5;
// result contains [6, 7, 8, 9] with shape [2, 2]

◆ operator- [3/3]

template<typename T >
template<typename U >
txeo::Tensor< U > operator- ( const U left,
const txeo::Tensor< U > &  right 
)
friend

Element-wise scalar-tensor subtraction operator.

Template Parameters
UNumeric type of tensor elements
Parameters
leftScalar value
rightInput tensor
Returns
New tensor with elements: left - right[i]

Example Usage:

txeo::Tensor<int> t({4}, {2, 3, 5, 7});
auto result = 10 - t;
// result contains [8, 7, 5, 3]

◆ operator/ [1/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator/ ( const txeo::Tensor< U > &  left,
const U right 
)
friend

Element-wise division operator (tensor / scalar)

Parameters
leftInput tensor
rightDivisor value
Returns
New tensor with element-wise division results

Example Usage:

txeo::Tensor<double> t({2, 2}, {10.0, 20.0, 30.0, 40.0});
auto result = t / 2.0;
// result contains [5.0, 10.0, 15.0, 20.0] with shape [2, 2]

◆ operator/ [2/2]

template<typename T >
template<typename U >
txeo::Tensor< U > operator/ ( const U left,
const txeo::Tensor< U > &  right 
)
friend

Element-wise scalar-tensor division operator.

Template Parameters
UNumeric type of tensor elements
Parameters
leftScalar dividend
rightTensor divisor
Returns
New tensor with elements: left / right[i]

Example Usage:

txeo::Tensor<double> t({3}, {2.0, 4.0, 5.0});
auto result = 100.0 / t;
// result contains [50.0, 25.0, 20.0]

◆ operator<<

template<typename T >
template<typename U >
std::ostream & operator<< ( std::ostream &  os,
const Tensor< U > &  tensor 
)
friend

◆ txeo::detail::TensorHelper

template<typename T >
friend class txeo::detail::TensorHelper
friend

Definition at line 1197 of file Tensor.h.

◆ txeo::Predictor< T >

template<typename T >
friend class txeo::Predictor< T >
friend

Definition at line 1190 of file Tensor.h.

◆ txeo::TensorAgg< T >

template<typename T >
friend class txeo::TensorAgg< T >
friend

Definition at line 1190 of file Tensor.h.

◆ txeo::TensorFunc< T >

template<typename T >
friend class txeo::TensorFunc< T >
friend

Definition at line 1190 of file Tensor.h.

◆ txeo::TensorOp< T >

template<typename T >
friend class txeo::TensorOp< T >
friend

Definition at line 1190 of file Tensor.h.

◆ txeo::TensorPart< T >

template<typename T >
friend class txeo::TensorPart< T >
friend

Definition at line 1190 of file Tensor.h.

Member Data Documentation

◆ _impl

template<typename T >
std::unique_ptr<Impl> txeo::Tensor< T >::_impl {nullptr}
protected

Definition at line 1190 of file Tensor.h.

1190{nullptr};

The documentation for this class was generated from the following files: