xerus
a general purpose tensor library
xerus::TensorNetwork::Link Class Referencefinal

Class representing a link from a TensorNode to another node or an external index. More...

#include <tensorNetwork.h>

Public Member Functions

 Link () noexcept=default
 
 Link (const Link &) noexcept=default
 
 Link (Link &&) noexcept=default
 
 Link (const size_t _other, const size_t _indexPos, const size_t _dim, const bool _external) noexcept
 
bool links (const size_t _other) const noexcept
 Checks whether this link links to a particular node. More...
 
Linkoperator= (const Link &) noexcept=default
 
Linkoperator= (Link &&) noexcept=default
 

Public Attributes

size_t dimension
 Dimension of the link, always equals to other->tensorObject->dimensions[indexPosition]. More...
 
bool external
 Flag indicating whether this link correspond to an external index. More...
 
size_t indexPosition
 IndexPosition on the other node or index of external index. More...
 
size_t other
 The index of the otherNode this Link links to. More...
 

Detailed Description

Class representing a link from a TensorNode to another node or an external index.

Definition at line 50 of file tensorNetwork.h.

Constructor & Destructor Documentation

◆ Link() [1/4]

xerus::TensorNetwork::Link::Link ( )
defaultnoexcept

◆ Link() [2/4]

xerus::TensorNetwork::Link::Link ( const Link )
defaultnoexcept

◆ Link() [3/4]

xerus::TensorNetwork::Link::Link ( Link &&  )
defaultnoexcept

◆ Link() [4/4]

xerus::TensorNetwork::Link::Link ( const size_t  _other,
const size_t  _indexPos,
const size_t  _dim,
const bool  _external 
)
noexcept

Definition at line 28 of file link.cpp.

Member Function Documentation

◆ links()

bool xerus::TensorNetwork::Link::links ( const size_t  _other) const
noexcept

Checks whether this link links to a particular node.

Parameters
_otherthe other node for which the linkage shall be checked
Returns
TRUE if _other is the target of this Link, FALSE otherwise.

Definition at line 31 of file link.cpp.

◆ operator=() [1/2]

Link& xerus::TensorNetwork::Link::operator= ( const Link )
defaultnoexcept

◆ operator=() [2/2]

Link& xerus::TensorNetwork::Link::operator= ( Link &&  )
defaultnoexcept

Member Data Documentation

◆ dimension

size_t xerus::TensorNetwork::Link::dimension

Dimension of the link, always equals to other->tensorObject->dimensions[indexPosition].

Definition at line 59 of file tensorNetwork.h.

◆ external

bool xerus::TensorNetwork::Link::external

Flag indicating whether this link correspond to an external index.

Definition at line 62 of file tensorNetwork.h.

◆ indexPosition

size_t xerus::TensorNetwork::Link::indexPosition

IndexPosition on the other node or index of external index.

Definition at line 56 of file tensorNetwork.h.

◆ other

size_t xerus::TensorNetwork::Link::other

The index of the otherNode this Link links to.

Definition at line 53 of file tensorNetwork.h.


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