Template Function sequant::fold_left_to_node¶
Defined in File binary_node.hpp
Function Documentation¶
-
template<typename Rng, typename F, typename Node = ranges::range_value_t<Rng>, typename = std::enable_if_t<meta::is_full_binary_node<Node>>>
Node sequant::fold_left_to_node(Rng rng, F op)¶ Accumulates the given range of binary nodes into a single binary node using a given operation to generate the internal node values.
- Template Parameters:
Node – The FullBinaryNode type.
- Parameters:
rng – A range of Node objects.
op – A binary function that returns Node::value_type. The signature could be
op(Node, Node) -> Node::value_type
orop(Node::value_type, Node::value_type) -> Node::value_type
.
- Returns:
A binary node with subtrees built by left-folding given range.