Template Function sequant::find_leaf_carrying

Function Documentation

template<typename Node>
std::optional<std::pair<Node, std::size_t>> sequant::find_leaf_carrying(Node const &node, Index const &ix)
Returns:

the first leaf in the subtree rooted at node whose canonical indices contain ix, paired with the position of ix there; or nullopt if no such leaf. Used to learn ix's tile structure from a tensor that carries it.