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

Public Member Functions

 TensorConn (std::shared_ptr< Tensor > tensor, unsigned int id, const std::vector< TensorLeg > &legs, bool conjugated=false)
 
 TensorConn (const TensorConn &)=default
 
TensorConnoperator= (const TensorConn &)=default
 
 TensorConn (TensorConn &&) noexcept=default
 
TensorConnoperator= (TensorConn &&) noexcept=default
 
void printIt () const
 
unsigned int getNumLegs () const
 
bool isComplexConjugated () const
 
std::shared_ptr< TensorgetTensor ()
 
unsigned int getTensorId () const
 
const TensorLeggetTensorLeg (unsigned int leg_id) const
 
const std::vector< TensorLeg > & getTensorLegs () const
 
DimExtent getDimExtent (unsigned int dim_id) const
 
std::pair< SpaceId, SubspaceId > getDimSpaceAttr (unsigned int dim_id) const
 
void resetLeg (unsigned int leg_id, TensorLeg tensor_leg)
 
void deleteLeg (unsigned int leg_id)
 
void deleteLegs (std::vector< unsigned int > &leg_ids)
 
void appendLeg (std::pair< SpaceId, SubspaceId > subspace, DimExtent dim_extent, TensorLeg tensor_leg)
 
void appendLeg (DimExtent dim_extent, TensorLeg tensor_leg)
 
void conjugate ()
 

Constructor & Destructor Documentation

◆ TensorConn()

exatn::numerics::TensorConn::TensorConn ( std::shared_ptr< Tensor tensor,
unsigned int  id,
const std::vector< TensorLeg > &  legs,
bool  conjugated = false 
)

Constructs a connected tensor inside a tensor network.

Member Function Documentation

◆ appendLeg()

void exatn::numerics::TensorConn::appendLeg ( std::pair< SpaceId, SubspaceId >  subspace,
DimExtent  dim_extent,
TensorLeg  tensor_leg 
)

Appends a new tensor leg as the last leg, increasing the tensor rank by one.

◆ conjugate()

void exatn::numerics::TensorConn::conjugate ( )

Conjugates the connected tensor, which includes complex conjugation of the tensor itself as well as tensor leg direction reversal.

◆ deleteLeg()

void exatn::numerics::TensorConn::deleteLeg ( unsigned int  leg_id)

Deletes an existing tensor leg, reducing the tensor rank by one.

◆ deleteLegs()

void exatn::numerics::TensorConn::deleteLegs ( std::vector< unsigned int > &  leg_ids)

Deletes a set of existing tensor legs, reducing the tensor rank.

◆ getDimExtent()

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

Returns the dimension extent of a specific tensor leg.

◆ getDimSpaceAttr()

std::pair< SpaceId, SubspaceId > exatn::numerics::TensorConn::getDimSpaceAttr ( unsigned int  dim_id) const

Get the space/subspace id for a specific tensor leg.

◆ getNumLegs()

unsigned int exatn::numerics::TensorConn::getNumLegs ( ) const

Returns the total number of legs (tensor rank/order).

◆ getTensor()

std::shared_ptr< Tensor > exatn::numerics::TensorConn::getTensor ( )

Returns a co-owned pointer to the tensor.

◆ getTensorId()

unsigned int exatn::numerics::TensorConn::getTensorId ( ) const

Returns the tensor id.

◆ getTensorLeg()

const TensorLeg & exatn::numerics::TensorConn::getTensorLeg ( unsigned int  leg_id) const

Returns a specific tensor leg.

◆ getTensorLegs()

const std::vector< TensorLeg > & exatn::numerics::TensorConn::getTensorLegs ( ) const

Returns all tensor legs.

◆ isComplexConjugated()

bool exatn::numerics::TensorConn::isComplexConjugated ( ) const

Returns the complex conjugation status of the tensor.

◆ printIt()

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

Prints.

◆ resetLeg()

void exatn::numerics::TensorConn::resetLeg ( unsigned int  leg_id,
TensorLeg  tensor_leg 
)

Resets an existing tensor leg (specific connection to another tensor).


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