SimplexTree
This is an internal module used for representing simplicial complexes.
The methods in here allow for low level manipulation of the simplicial structure and may break the representation assumptions made throughout the remainder of the code. Only use these if you know what you are doing (and really need to do that).
Hodge.SimplexTrees.SimplexTree — Type
Store a simplicial complex using the Simplex Tree data structure.
Based on the paper:
- Jean-Daniel Boissonnat, Clément Maria. The Simplex Tree: An Efficient Data Structure for General Simplicial Complexes. [Research Report] RR-7993, 2012, pp.20. hal-00707901v1
Hodge.SimplexTrees.child_from_label — Method
child_from_label(node, j)Return the child of node whose label is j. If no child has label j, return nothing.
Hodge.SimplexTrees.children_label — Method
children_label(node)Return an array containing the labels of node's children.
Hodge.SimplexTrees.foldST — Method
foldST(st::SimplexTree; basecase, joiner)Fold st applying the function basecase to the leafs and joining siblings using the function joiner.
Hodge.SimplexTrees.foldST_depth — Method
foldST_depth(st::SimplexTree, depth; basecase, joiner)Fold st until a given depth applying the function basecase to the leafs and joining siblings vi a the function joiner.
See also foldST.
Hodge.SimplexTrees.getnode — Method
getnode(root, s)Return the node of the SimplexTree rooted at root representing the simplex s. If s is not in the complex, return nothing.
Hodge.SimplexTrees.getsimplices — Method
getsimplices(st, k)Return all the k-simplices of complex.
Hodge.SimplexTrees.haschild — Method
haschild(node, j)Test whether node has a child with label j.
Hodge.SimplexTrees.hassimplex — Method
hassimplex(node, s)Test whether the SimplexTree rooted at node contains the simplex s.
Hodge.SimplexTrees.insert! — Method
insert!(complex, simplex)Insert a simplex and all its faces on an existing simplicial complex.
Hodge.SimplexTrees.isemptyface — Method
isemptyface(node)Test whether node represents an empty simplex.
Hodge.SimplexTrees.isleaf — Method
isleaf(node)Test whether node is a leaf of a SimplexTree.
Hodge.SimplexTrees.numsimplices — Method
numsimplices(st, k)Return the number of k-simplices of st.
This is a more efficient implementation of length ∘ getsimplices.