Click or drag to resize

DataTreeT Methods

The DataTreeT generic type exposes the following members.

Methods
  NameDescription
Public methodAdd(T)
Add (append) a data item to the last branch in the tree. If no branches exist yet, a new one will be created with [path = {0}]
Public methodAdd(T, GH_Path)
Add (append) a data item to the specified branch in the tree. If the branch doesn't exist yet, it will be created.
Public methodAddRange(IEnumerableT)
Add (append) a list of data items to the last branch in the tree. If no branch exists yet, a new one will be created.
Public methodAddRange(IEnumerableT, GH_Path)
Add (append) a list of data items to the specified branch in the tree. If the branch doesn't exist yet, it will be created.
Public methodAllData
Collects all data in the tree in a single list. Does not alter the topology of this tree.
Public methodBranch(GH_Path)
Gets the list of data which belongs to a given Branch path.
Public methodBranch(Int32)
Gets the list of data which belongs to the branch path at the given index.
Public methodBranch(Int32)
Gets the list of data which belongs to a given Branch path.
Public methodClear
Clears the entire tree.
Public methodClearData
Removes all data from all branches without affecting the tree topology.
Public methodEnsurePath(GH_Path)
Create a new branch with the specified path if it doesn't already exists.
Public methodEnsurePath(Int32)
Create a new branch with the specified path if it doesn't already exists.
Public methodFlatten
Flattens the entire tree into a single path.
Public methodGraft(Boolean)
Graft all paths in this tree. "Grafting" means appending a new branch for every item in an existing branch.
Public methodGraft(GH_Path, Boolean)
Graft a single path in the tree. "Grafting" means appending a new branch for every item in an existing branch.
Public methodInsert
Insert a data item to the specified branch in the tree. If the branch doesn't exist yet, it will be created.
Public methodItemExists
Test if the specified path + item index are defined inside the tree.
Public methodMergeTree
Merges two trees together. Data inside similar branches will be merged into single lists and unique paths will be appended. The other tree will not be altered, so beware that data is now shared among both trees.
Public methodPath
Gets the data path at the specified index.
Public methodPathExists(GH_Path)
Test if the specified path is already defined inside the tree.
Public methodPathExists(Int32)
Test if the specified path is already defined inside the tree.
Public methodRemovePath(GH_Path)
Removes a path and all associated data from the structure. If the path doesn't exist, nothing will happen.
Public methodRemovePath(Int32)
Removes a path and all associated data from the structure. If the path doesn't exist, nothing will happen.
Public methodRenumberPaths
Renumber all paths in this data tree, using a single incrementing path index.
Public methodRenumberPaths(String)
Renumber all paths in this data tree, using a single incrementing path index.
Public methodSimplifyPaths
Simplify the branches in this tree by removing all identical path entries. The length of the shortest path will be indicative of the similarity search depth. If this tree only contains a single branch, the branch wil be simplified to its last index.
Public methodToString
Creates a brief description of the tree.
(Overrides ObjectToString.)
Public methodTrimExcess
Trims the excess allocated memory in all branches
Top
See Also