ExaTN
Public Member Functions | List of all members
exatn::numerics::TensorShape Class Reference

Public Member Functions

template<typename T >
 TensorShape (std::initializer_list< T > extents)
 
template<typename T >
 TensorShape (const std::vector< T > &extents)
 
 TensorShape ()
 
 TensorShape (const TensorShape &tens_shape)=default
 
TensorShapeoperator= (const TensorShape &tens_shape)=default
 
 TensorShape (TensorShape &&tens_shape) noexcept=default
 
TensorShapeoperator= (TensorShape &&tens_shape) noexcept=default
 
void printIt () const
 
void printItFile (std::ofstream &output_file) const
 
unsigned int getRank () const
 
DimExtent getDimExtent (unsigned int dim_id) const
 
const std::vector< DimExtent > & getDimExtents () const
 
bool isCongruentTo (const TensorShape &another) const
 
void resetDimension (unsigned int dim_id, DimExtent extent)
 
void deleteDimension (unsigned int dim_id)
 
void appendDimension (DimExtent dim_extent)
 

Constructor & Destructor Documentation

◆ TensorShape() [1/2]

template<typename T >
exatn::numerics::TensorShape::TensorShape ( std::initializer_list< T >  extents)

Create a tensor shape by specifying extents for all tensor dimensions.

◆ TensorShape() [2/2]

exatn::numerics::TensorShape::TensorShape ( )

Create an empty tensor shape.

Member Function Documentation

◆ appendDimension()

void exatn::numerics::TensorShape::appendDimension ( DimExtent  dim_extent)

Appends a new dimension at the end, increasing the shape rank by one.

◆ deleteDimension()

void exatn::numerics::TensorShape::deleteDimension ( unsigned int  dim_id)

Deletes a specific dimension, reducing the shape rank by one.

◆ getDimExtent()

DimExtent exatn::numerics::TensorShape::getDimExtent ( unsigned int  dim_id) const

Get the extent of a specific tensor dimension.

◆ getDimExtents()

const std::vector< DimExtent > & exatn::numerics::TensorShape::getDimExtents ( ) const

Get the extents of all tensor dimensions.

◆ getRank()

unsigned int exatn::numerics::TensorShape::getRank ( ) const

Get tensor rank (number of tensor dimensions).

◆ isCongruentTo()

bool exatn::numerics::TensorShape::isCongruentTo ( const TensorShape another) const

Returns TRUE if the tensor shape coincides with another tensor shape.

◆ printIt()

void exatn::numerics::TensorShape::printIt ( ) const

Print.

◆ resetDimension()

void exatn::numerics::TensorShape::resetDimension ( unsigned int  dim_id,
DimExtent  extent 
)

Resets a specific dimension.


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