Reference
Contents
Index
DecayAngles.DecayNodeDecayAngles.flatten_nested_tupleDecayAngles.flatten_sort_nested_tupleDecayAngles.map_treeDecayAngles.map_with_parent_nodeDecayAngles.to_table
DecayAngles.DecayNode — MethodDecayNode(node::Tuple, f0=identity)Wrap a bracket topology notation into a DecayNode structure
Example
julia> topology = DecayNode( (1,(2,3)) )
julia> map_tree(topology) do value, node
tuple_representation = value
(; name=string(value), tuple_representation)
endDecayAngles.flatten_nested_tuple — Methodflatten_nested_tuple(n)Flatten a nested tuple into a single tuple
Example
julia julia> flatten_nested_tuple(((4,1),(2,3))) (4,1,2,3)`
DecayAngles.flatten_sort_nested_tuple — Methodflatten_sort_nested_tuple(n)Flatten a nested tuple into a single tuple which is also sorted.
Example
julia julia> flatten_sort_nested_tuple(((4,1),(2,3))) (1,2,3,4)`
DecayAngles.map_tree — Methodmap_tree(f, node::DecayNode)Iterate over the three and apply a function f(value, node) to every nodes, storing the result in the value field.
Example
julia> map_tree(build_tree((1,(2,3)))) do value, node
tuple_representation = value
(; name=string(value), tuple_representation)
endDecayAngles.map_with_parent_node — Functionmap_with_parent_node(f, node::DecayNode, parent_node = DecayNode(nothing, [node]))Propagates the values from parent to all children and apply operation on it. The signature of the function is f(value, parent_node)
Example
julia> map_with_parent(DecayNode((1,(2,3))), "0") do value, parent_value
string(parent_value) * " => " * string(value)
endDecayAngles.to_table — Methodtotable(tree::DecayNode)Iterate over the tree and table-like collection of named tuples from the node values.
Example
julia> topology = DecayNode( (1,(2,3)); apply=x->(; tuple=x))
julia> totable(topology) |> DataFrame