IGH_Structure

References
public interface IGH_Structure
Base interface for all GH_Structure types.

Properties

Branch

#
Gets a limited access pointer to the data list associated with a certain path.
IList Branch[GH_Path path] { get; }
path (GH_Path)Path of data to retrieve.

Branch

#
Gets a limited access pointer to the data list at the specified index.
IList Branch[int index] { get; }
index (int)Index of data to retrieve.

DataCount

#
Gets the total number of data items stored in all paths.
int DataCount { get; }

IsEmpty

#
Gets the Empty state of the structure. If the structure is Empty when it contains no paths and no branches.
bool IsEmpty { get; }

Path

#
Gets the data path at the specified index.
GH_Path Path[int index] { get; }
index (int)Index of path to retrieve.
IndexOutOfRangeExceptionThrown if the index does not represent a valid path.

PathCount

#
Gets the number of paths defined in this structure.
int PathCount { get; }

Paths

#
Gets a list of all the paths in this structure.
IList<GH_Path> Paths { get; }

StructureProxy

#
Gets a proxy list of all the data-arrays in this structure
IList<IList> StructureProxy { get; }

TopologyDescription

#
Gets a description of the topology of the structure. Useful for debugging purposes.
string TopologyDescription { get; }

Methods

AllData

#
Gets an enumerator for all the data items in this structure.
IGH_StructureEnumerator AllData(
skipNulls
If True, null items will be skipped.
)

Clear

#
Clears the entire structure.
void Clear()

ClearData

#
Removes all data from all paths without affecting the structure topology.
void ClearData()

DataDescription

#
Gets a description of the data contained in this structure.
string DataDescription(
includeIndices,
If true, every data item will be prefixed by its index.
includePaths
If true, every branch of data will be preceded by the path.
)
A string describing the data.

EnsureCapacity

#
Ensures that all branches have a certain capacity
void EnsureCapacity(
capacity
Capacity per branch.
)

ExpandPath

#
Expand a path in this structure by appending an element.
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.
)

Flatten

#
Flattens the entire structure into a single path.
void Flatten(
path = null
The path of the flattened data. If null, the path will be {0}
)

Graft

#
Grafts all paths by reallocating all data into child paths.
[EditorBrowsable(EditorBrowsableState.Never)] void Graft(
clearSingleNulls
If true, nulls will not be grafted.
)
obsoletethis method has been replaced by Graft(GH_GraftMode)

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.
void Graft(
mode,
Graft mode.
path
Path to graft
)

Graft

#
Grafts all paths by reallocating all data into child paths.
void Graft(
mode
Graft mode.
)

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.
[EditorBrowsable(EditorBrowsableState.Never)] void Graft(
path,
Path of data to graft.
clearSingleNulls
If true, nulls will not be grafted.
)
obsoletethis method has been replaced by Graft(GH_GraftMode, GH_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.
int LongestPathIndex()
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.
bool PathExists(
path
The data path to search for
)

PathIndex

#
Find the indices that delineate the given path domain.
void PathIndex(
path,
Path to search for (it need not exist in the structure).
ref int
idx0,
The index of the path itself or the first smaller path if the path is not defined.
ref int
idx1
The index of the path itself of the first larger path if the path is not defined.
)

RemovePath

#
Removes a path and all associated data from the structure. If the path doesn't exist, nothing will happen.
void RemovePath(
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.
void ReplacePath(
find,
The path to search for.
replace
The new 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.
int ShortestPathIndex()
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.
void Simplify(
mode
Simplification algorithm to use.
)

TrimExcess

#
Trims the excess allocated memory in all branches
void TrimExcess()