Tenncor
|
Classes | |
struct | GroupRegistry |
struct | GroupTag |
struct | iTag |
struct | PropertyRegistry |
TagRegistry wrapper to tag and check properties on tensors. More... | |
struct | PropTag |
PropTag (properties tag) define node properties. More... | |
struct | Query |
struct | Subgraph |
Subgraph group encapsulation. More... | |
struct | TagCollective |
Collective of generic iTag instances. More... | |
struct | TagRegistry |
Registry for associating tensors to tag collectives. More... | |
struct | TensKey |
Tensor ref key wrapper. More... | |
struct | TensKeyHash |
TensKey hasher. More... | |
Typedefs | |
using | TensSetT = std::unordered_set< TensKey, TensKeyHash > |
Tensor ref set. More... | |
using | AGroupsT = std::map< std::string, std::unordered_set< std::string > > |
using | AdjMapT = std::unordered_map< teq::iTensor *, AGroupsT > |
Map tensors to groups. More... | |
using | SgraphptrT = std::shared_ptr< Subgraph > |
Smart pointer of the subgraph. More... | |
using | SubgraphsT = std::unordered_set< SgraphptrT > |
Set of subgraphs. More... | |
using | SubgraphAssocsT = std::unordered_map< teq::iTensor *, SubgraphsT > |
Root of the subgraph associated with the subgraph representations. More... | |
using | TagRepsT = std::map< std::string, std::vector< std::string > > |
Map tag key to a series of labels. More... | |
using | TagptrT = std::unique_ptr< iTag > |
Unique pointer of tag. More... | |
using | TagrF = std::function< void(teq::TensrefT, std::string)> |
Function that associate tag key to tensor ref. More... | |
using | LTensT = std::unordered_map< std::string, std::vector< teq::iTensor * > > |
Map tag label to any tensor with label. More... | |
using | TTensT = std::unordered_map< std::string, LTensT > |
Map tag key to label-tensor association. More... | |
Functions | |
GroupRegistry & | get_group_reg (void) |
Return reference to global group registry. More... | |
void | recursive_group_tag (teq::TensptrT tens, std::string group, teq::TensSetT stops, GroupRegistry ®istry=get_group_reg()) |
void | adjacencies (AdjMapT &out, teq::TensptrsT roots, GroupRegistry ®istry=get_group_reg()) |
void | beautify_groups (SubgraphAssocsT &out, const AdjMapT &adjs) |
void | filter_head (SubgraphAssocsT &out, const SubgraphAssocsT &assocs) |
PropertyRegistry & | get_property_reg (void) |
Return reference to global property registry. More... | |
bool | operator== (const TensKey &lhs, const TensKey &rhs) |
TensKey equality overload. More... | |
TagRegistry & | get_reg (void) |
Return reference to global tag registry. More... | |
void | recursive_tag (teq::TensptrT root, teq::TensSetT stops, std::function< void(teq::TensrefT)> tag_op) |
Variables | |
const std::string | groups_key |
Identifier of groups tag. More... | |
const std::string | commutative_tag = "commutative" |
Identifier for commutative property. More... | |
const std::string | immutable_tag = "immutable" |
Identifier for immutable property. More... | |
const std::string | props_key |
Identifier of property tag. More... | |
group.hpp tag
Purpose: Implement group tag
prop.hpp tag
Purpose: Implement property tag
tag.hpp tag
Purpose: Define tag interface and tag registry
using tag::AdjMapT = typedef std::unordered_map<teq::iTensor*,AGroupsT> |
Map tensors to groups.
using tag::AGroupsT = typedef std::map<std::string,std::unordered_set<std::string> > |
Map group label to unique ids specifying different adjacent groups of the same label
using tag::LTensT = typedef std::unordered_map<std::string,std::vector<teq::iTensor*> > |
Map tag label to any tensor with label.
using tag::SgraphptrT = typedef std::shared_ptr<Subgraph> |
Smart pointer of the subgraph.
using tag::SubgraphAssocsT = typedef std::unordered_map<teq::iTensor*,SubgraphsT> |
Root of the subgraph associated with the subgraph representations.
using tag::SubgraphsT = typedef std::unordered_set<SgraphptrT> |
Set of subgraphs.
using tag::TagptrT = typedef std::unique_ptr<iTag> |
Unique pointer of tag.
using tag::TagRepsT = typedef std::map<std::string,std::vector<std::string> > |
Map tag key to a series of labels.
using tag::TagrF = typedef std::function<void(teq::TensrefT,std::string)> |
Function that associate tag key to tensor ref.
using tag::TensSetT = typedef std::unordered_set<TensKey,TensKeyHash> |
Tensor ref set.
using tag::TTensT = typedef std::unordered_map<std::string,LTensT> |
Map tag key to label-tensor association.
void tag::adjacencies | ( | AdjMapT & | out, |
teq::TensptrsT | roots, | ||
GroupRegistry & | registry = get_group_reg() |
||
) |
Populate out with every grouped-node under roots subgraphs and associate to unique adjacent groups
void tag::beautify_groups | ( | SubgraphAssocsT & | out, |
const AdjMapT & | adjs | ||
) |
Populate subgraph associations using adjacency output out associates every tensor under an adjacent group to its subgraph representations
void tag::filter_head | ( | SubgraphAssocsT & | out, |
const SubgraphAssocsT & | assocs | ||
) |
Transform subgraph content tensor-subgraph representation associations to subgraph root-subgraph representation associations
GroupRegistry& tag::get_group_reg | ( | void | ) |
Return reference to global group registry.
PropertyRegistry& tag::get_property_reg | ( | void | ) |
Return reference to global property registry.
TagRegistry& tag::get_reg | ( | void | ) |
Return reference to global tag registry.
void tag::recursive_group_tag | ( | teq::TensptrT | tens, |
std::string | group, | ||
teq::TensSetT | stops, | ||
GroupRegistry & | registry = get_group_reg() |
||
) |
Recursive add every nodes under root's graph to specified group ignoring subgraphs of roots in stops set
void tag::recursive_tag | ( | teq::TensptrT | root, |
teq::TensSetT | stops, | ||
std::function< void(teq::TensrefT)> | tag_op | ||
) |
Recursive apply tag_op to nodes under root's graph ignoring subgraphs of roots in stops set
const std::string tag::commutative_tag = "commutative" |
Identifier for commutative property.
const std::string tag::groups_key |
Identifier of groups tag.
const std::string tag::immutable_tag = "immutable" |
Identifier for immutable property.
const std::string tag::props_key |
Identifier of property tag.