SyTen
syten::T3N::Tree::Node< T > Class Template Reference

A Node of a T3N containing values of type T. More...

+ Inheritance diagram for syten::T3N::Tree::Node< T >:
+ Collaboration diagram for syten::T3N::Tree::Node< T >:

Classes

struct  LegArray
 Proxy object for Legs. More...
 

Public Types

using cPtr = const Node< Value > *
 An overload. More...
 
using cPtrc = const Node< Value > *const
 An overload. More...
 
using Ptr = Node< Value > *
 Pointer to a Node. More...
 
using Ptrc = Node< Value > *const
 An overload. More...
 
typedef T Value
 Type of the contained values. More...
 

Public Member Functions

MemoryUsage::MemorySize allocSize () const
 Returns total memory usage. More...
 
template<typename... Args>
void build (LegType which, NodeType t, Args... args)
 Build a leaf from supplied argument. More...
 
void clear (LegType which)
 Clears corresponding leaf. More...
 
void connect (LegType which, Node &&other)
 Takes a Node and all its descendants and makes it the subtree of this Node. More...
 
template<typename OtherType >
bool equality_rec (Node< OtherType > const &other) const
 Recursive helper for checking equality. More...
 
void initialize (Node &&other, LegType which)
 Connect this Node to some other Node by replacing some other Node, i.e. More...
 
void initialize (Node const &other, LegType which)
 Connect this Node to some other Node by copying some other Node. More...
 
Index legNumber () const
 Returns the number of legs. More...
 
template<typename Archive >
void load (Archive &arch, unsigned int const in_version)
 Boost deserialization for loading the object. More...
 
 Node (Node &&other)
 Constructor moving other Node. More...
 
 Node (Node const &other)
 Constructor creating a copy from other Node. More...
 
 Node (NodeType type=NodeType::Physical)
 Default constructor. More...
 
template<typename ... Args>
 Node (NodeType type=NodeType::Physical, Args... args)
 Constructor forwarding to the container. More...
 
Index nodesBelow () const
 Counts all Nodes below this Node. More...
 
Index nodesBelow (NodeType const type) const
 Counts the number of Nodes w/ the given type below this Node. More...
 
Nodeoperator= (Node &&other)
 Moves Node per operator syntax. More...
 
Nodeoperator= (Node const &other)
 Copies Node per operator syntax. More...
 
void print (std::ostream &out, Index level_, std::string location, int const maximum=-1)
 Printing helper. More...
 
template<typename Archive >
void save (Archive &arch, unsigned int const) const
 Boost serialization for saving the object. More...
 
Node const * top () const
 
 ~Node ()
 Destructor. More...
 

Public Attributes

LegArray Legs = {nullptr,nullptr,nullptr}
 All the legs of this Node. More...
 
NodeType ndt = NodeType::Undefined
 Specify the NodeType. More...
 
LegType rt = LegType::Invalid
 Specify the realtion of this Node to its root. More...
 
Index st = 0
 SiteType inside the lattice. More...
 
Value v = Value()
 Creating an object by the default constructor. More...
 

Detailed Description

template<typename T>
class syten::T3N::Tree::Node< T >

A Node of a T3N containing values of type T.


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