Properties
Branch
#Gets a limited access pointer to the data list associated with a certain path.
Parameters:
| path (GH_Path) | Path of data to retrieve. |
Branch
#Gets a limited access pointer to the data list at the specified index.
Parameters:
| index (int) | Index of data to retrieve. |
IsEmpty
#Gets the Empty state of the structure. If the structure is Empty when it contains no paths and no branches.
Path
#Gets the data path at the specified index.
Parameters:
| index (int) | Index of path to retrieve. |
Exceptions:
| IndexOutOfRangeException | Thrown if the index does not represent a valid path. |
StructureProxy
#Gets a proxy list of all the data-arrays in this structure
Methods
AllData
#Gets an enumerator for all the data items in this structure.
Parameters:
| skipNulls (bool) | If True, null items will be skipped. |
DataDescription
#Gets a description of the data contained in this structure.
EnsureCapacity
#Ensures that all branches have a certain capacity
Parameters:
| capacity (int) | Capacity per branch. |
ExpandPath
#Expand a path in this structure by appending an element.
Parameters:
| path (GH_Path) | Path to expand, if the path doesn't exist, nothing will happen. |
| element (int) | Element to append to the path. |
| mode (GH_ExpandMode) | Expansion mode. |
Flatten
#Flattens the entire structure into a single path.
Parameters:
| path (GH_Path = null) | The path of the flattened data. If null, the path will be {0} |
Graft
#obsoletethis method has been replaced by Graft(GH_GraftMode)
Grafts all paths by reallocating all data into child paths.
Parameters:
| clearSingleNulls (bool) | If true, nulls will not be grafted. |
Graft
#Grafts a specific path by reallocating all data into child paths. If a grafted path coincides with an existing path, the data item in question will be appended to the existing path.
Parameters:
| mode (GH_GraftMode) | Graft mode. |
| path (GH_Path) | Path to graft |
Graft
#Grafts all paths by reallocating all data into child paths.
Parameters:
| mode (GH_GraftMode) | Graft mode. |
Graft
#obsoletethis method has been replaced by Graft(GH_GraftMode, GH_Path)
Grafts a specific path by reallocating all data into child paths. If a grafted path coincides with an existing path, the data item in question will be appended to the existing path.
LongestPathIndex
#Finds the path in this structure with the most dimensions. In case of multiple equally long longest paths, the last one will be returned.
Returns: The index of the longest path or -1 if there are no paths.
PathExists
#Returns True if the specified path is already defined inside the structure.
Parameters:
| path (GH_Path) | The data path to search for |
PathIndex
#Find the indices that delineate the given path domain.
RemovePath
#Removes a path and all associated data from the structure. If the path doesn't exist, nothing will happen.
Parameters:
| path (GH_Path) | Path the remove. |
ReplacePath
#Replace an existing path with a different one. If the operation is successfull, then the 'find' path will be deleted. If the 'replace' path is already defined, the items in 'find' will be appended to the existing path.
ShortestPathIndex
#Finds the path in this structure with the least dimensions. In case of multiple equally long longest paths, the first one will be returned.
Returns: The index of the shortest path or -1 if there are no paths.
Simplify
#Simplify the data structure by removing path indices shared by all branches.
Parameters:
| mode (GH_SimplificationMode) | Simplification algorithm to use. |