[−][src]Function neurarbor::edges_to_tree_with_data
pub fn edges_to_tree_with_data<T: Hash + Eq + Copy, D: Clone>(
edges: &[(T, Option<T>, D)]
) -> Result<(Tree<(T, D)>, HashMap<T, NodeId>), &'static str>
Given tuples of (child_id, optional_parent_id, child_data), make a tree whose node data are (id, data). Returns that tree, and a mapping from the passed-in IDs to the internal IDs.
If the data type D implements Location, the (id, data) tuple will also: this is required by resample_tree_points.