Type parameters:
| T | The data type that this structure maintains. Must implement IGH_Goo or derive from a class that implements IGH_Goo. where IGH_Goo |
Constructors
Properties
Branch
#Gets a limited access pointer to the data list associated with a certain path.
Branch
#Gets a limited access pointer to the data list at the specified index
Branches
#Gets a list of all the data-arrays in this structure
DataItem
#Gets a direct pointer to a data item under a specific path and index.
Exceptions:
| NullReferenceException | Thrown if the path doesn't exist. |
| IndexOutOfRangeException | Thrown if the index does not exist within the path list. |
DataItem
#Gets the item at a given offset. The structure is treated as a linear list in this case. If index is out of range, null is returned. For repeated indexed retrieval, consider using a For Each loop since the enumerator is more efficient.
Parameters:
| index (int) | Offset of item to retrieve |
Exceptions:
| IndexOutOfRangeException | Thrown if index is smaller than zero or larger than the size of the collection |
FirstItem
#Gets the first item in the structure. If no such item exists, null is returned.
Parameters:
| filter_nulls (bool) | If True, nulls will be skipped. |
IsEmpty
#Gets the Empty state of the structure. If the structure is Empty it contains no paths and no branches.
Implements: IsEmpty
LastItem
#Gets the last item in the structure. If no such item exists, null is returned.
Parameters:
| filter_nulls (bool) | If True, nulls will be skipped. |
NonNulls
#Get an enumerator for this structure that allow linear iteration over the data hierarchy while skipping all Null entries. This Enumerator has been optimized, do not cache instances of it.
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. |
Implements: Path
StructureProxy
#Gets a proxy list of all the data-arrays in this structure.
Implements: StructureProxy
TopologyDescription
#Gets a description of the topology of the structure. Useful for debugging purposes.
Implements: TopologyDescription
Indexers
DataList
#Gets a direct pointer to the list of data under a specific path.
DataList
#Gets a direct pointer to the list of data under the specified index.
Exceptions:
| IndexOutOfRangeException | Thrown if the index does not represent a valid branch. |
Methods
Append
#Append a data item to the specified branch in the structure. If the branch doesn't exist yet, it will be created.
Append
#Append a data item to the last branch in the structure. If no branch exist yet, a new one will be created with [path = {0}]
public void Append()
T
data
Data to append.
AppendRange
#Append a list of data items to the specified branch in the structure. If the branch doesn't exist yet, it will be created.
ClearData
#Removes all data from all paths without affecting the structure topology.
public void ClearData()
Implements: ClearData
DataDescription
#Gets a description of the data contained in this structure.
Returns: A string describing the data.
Implements: DataDescription
DuplicateCast<Q>
#Create a duplicate of this structure in a different type.
Returns: A duplicate of this structure with all valid casts.
EnsurePath
#Create a new branch with the specified path if it doesn't already exists.
Returns: The list that belongs to the specified path.
EnsurePath
#Create a new branch with the specified path if it doesn't already exists.
Returns: The list that belongs to the specified path.
ExpandPath
#Expand a path in this structure by appending an element.
public void ExpandPath()
path,
Path to expand, if the path doesn't exist, nothing will happen.
element,
Element to append to the path.
mode
Expansion mode.
Implements: ExpandPath
FlattenData
#Collects all data in the structure under a single list. Does not alter the state of this structure.
Returns: A linear list containing all data items in all branches.
GetEnumerator
#GetEnumerator_Generic
#Graft
#Grafts all paths by reallocating all data into child paths.
obsoletethis method has been replaced by Graft(GH_GraftMode)
Implements: Graft
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.
Implements: Graft
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.
obsoletethis method has been replaced by Graft(GH_GraftMode, GH_Path)
Implements: Graft
Insert
#Insert a data item into the specified branch in the structure. If the branch doesn't exist yet, it will be created.
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.
Implements: LongestPathIndex
MergeStructure
#Merges two structures together. Data inside similar paths will be merged into single lists and unique paths will be appended. The other structure will not be altered, so beware that data is now shared among both structures.
PathExists
#Returns True if the specified path is already defined inside the structure.
Implements: PathExists
PathIndex
#Find the indices that surround the given path domain. Indices may be out of bounds.
Implements: PathIndex
Read
#Read the entire GH_Structure from an archive. This method relies on the the serialization of the IGH_Goo items it contains. Also, the IGH_Goo T generic must have a public constructor that takes no arguments.
Returns: True on success, false on failure.
Implements: Read
RemoveData
#Removes the first occurence of a data instance in the tree.
public void RemoveData()
T
data
Data to remove.
RemovePath
#Removes a path and all associated data from the structure. If the path doesn't exist, nothing will happen.
Implements: RemovePath
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.
Implements: ReplacePath
ShallowDuplicate
#Create a structure with a similar topology to this one with pointers to the same data items.
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.
Implements: ShortestPathIndex
Simplify
#Simplify the data structure by collapsing path indices shared by all branches.
Implements: Simplify
TrimExcess
#Trims the excess allocated memory in all branches.
public void TrimExcess()
Implements: TrimExcess