Order path list

Good afternoon.

I have a list with several lists inside. My problem is that this list is extracted from another one and the paths of the lists are not sorted.

I would need to rewrite the index paths starting at {0} and increasing by 1 until I get to the last list.

For example my list has 25 lists inside I want the first path to be {0} and increasing to {25}. I would like this to be modified automatically in case the number of lists changes.

Thank you!

3. Attach minimal versions of all the relevant files

I think this is what you’re trying to accomplish.

You can fill in the Path Mapper component automatically by connecting it then right-clicking it and selecting Create Renumber Mapping.

-Kevin

I never use Path Mapper. Prefer Tree Statistics and Tree Branch instead. Right-click Tree Branch and de-select ‘Maintain Paths’ to get renumbered paths.

1 Like

@Joseph_Oster method is more robust.

Path Mapper would need to be adjusted if depth of input DataTree changes.

-Kevin

1 Like

The Tree Statistics method is super flexible. Branch paths can be manipulated in any way you please. This example re-creates the data tree in reverse order by their branch sums (MA).


P.S. This example jitters the branches:
TStat_2024_Jul15b