Builds a list of ordered but unconnected nodes from a list of objects.
Builds a list of ordered but unconnected nodes from a list of objects.
The nodes that are created from the provided list of numbers are sorted in order of increasing value; the index property of each Node instance is set to its position in the ordered list.
list of objects to build Tree from
ordering of objects
Builds a Tree given an ordered list of Node instances; see buildOrderedNodeList
Determines if a list has odd length.
Given a list, finds the index of the middle value.
Given a list, finds the index of the middle value.
For even-length lists with two "middle" values, the left of these (with the lower index value) is returned. In addition to the index, also returns the left and right sublists, (neither of which includes the middle value).
Companion object to the infcalcs.Tree trait.