Cortenn
Public Member Functions | Public Attributes | List of all members
pbm::PathedTens Struct Referencefinal

Tree node for labeling Tensptrs. More...

#include <load.hpp>

Public Member Functions

 ~PathedTens (void)
 
void join (PathedTens *other)
 
ade::TensptrT get_labelled (StringsT path) const
 Return tensor associated with input path if found otherwise nullptr. More...
 
void set_labelled (StringsT path, ade::TensptrT tens)
 Set input path to reference tensor. More...
 
ade::TensptrT get_labelled (StringsT::iterator path_begin, StringsT::iterator path_end) const
 
void set_labelled (StringsT::iterator path_begin, StringsT::iterator path_end, ade::TensptrT tens)
 Set path between iterators begin and end to reference tensor. More...
 

Public Attributes

std::unordered_map< std::string, PathedTens * > children_
 Map of labels to branching nodes. More...
 
std::unordered_map< std::string, ade::TensptrT > tens_
 Map of labels to tensor leaves. More...
 

Detailed Description

Tree node for labeling Tensptrs.

Constructor & Destructor Documentation

◆ ~PathedTens()

pbm::PathedTens::~PathedTens ( void  )
inline

Member Function Documentation

◆ get_labelled() [1/2]

ade::TensptrT pbm::PathedTens::get_labelled ( StringsT  path) const
inline

Return tensor associated with input path if found otherwise nullptr.

◆ get_labelled() [2/2]

ade::TensptrT pbm::PathedTens::get_labelled ( StringsT::iterator  path_begin,
StringsT::iterator  path_end 
) const
inline

Return tensor associated with path between iterators begin and end if found otherwise nullptr

◆ join()

void pbm::PathedTens::join ( PathedTens other)
inline

Grab all leaf and branch nodes from subtree root other Accounting for duplicate labels but not Tensptrs

◆ set_labelled() [1/2]

void pbm::PathedTens::set_labelled ( StringsT  path,
ade::TensptrT  tens 
)
inline

Set input path to reference tensor.

◆ set_labelled() [2/2]

void pbm::PathedTens::set_labelled ( StringsT::iterator  path_begin,
StringsT::iterator  path_end,
ade::TensptrT  tens 
)
inline

Set path between iterators begin and end to reference tensor.

Member Data Documentation

◆ children_

std::unordered_map<std::string,PathedTens*> pbm::PathedTens::children_

Map of labels to branching nodes.

◆ tens_

std::unordered_map<std::string,ade::TensptrT> pbm::PathedTens::tens_

Map of labels to tensor leaves.


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