Constructors
Connectivity
#Construct a new document connectivity. This is not a threadsafe constructor, if the document is modified during the construction of this connectivity, things may go terribly wrong.
Parameters:
| doc (Document) |
Connectivity
#Create a connectivity set from a collection of objects.
Parameters:
| objects (IEnumerable<IDocumentObject>) |
Properties
Methods
Find
#Low level GUID -> ConnectiveObject resolver. This will search both the object and the group lists.
Parameters:
| id (Guid) | |
| node (out ConnectiveObject) |
FindConnections
#public IEnumerable<ConnectiveObject[]> FindConnections(ConnectiveObject upstream, ConnectiveObject downstream)
Find all connective paths between two objects.
Parameters:
| upstream (ConnectiveObject) | Upstream object. |
| downstream (ConnectiveObject) | Downstream object. |
FindImmediateInputs
#Iterate over all the immediate inputs for an object. This includes inputs of any attached pins.
Parameters:
| obj (ConnectiveObject) |
FindImmediateInputs
#Iterate over all the immediate inputs for an object. This includes inputs of any attached pins.
Parameters:
| id (Guid) |
FindImmediateOutputs
#Iterate over all the immediate outputs for an object. This includes outputs of any attached pins.
Parameters:
| obj (ConnectiveObject) |
FindImmediateOutputs
#Iterate over all the immediate outputs for an object. This includes outputs of any attached pins.
Parameters:
| id (Guid) |
FindNodes
#Enumerate over all nodes that match the given IDs. Ids which cannot be found will be ignored.
Parameters:
| ids (IEnumerable<Guid>) | Ids to find. |
| failures (List<Guid> = null) | If not null, will be populated with IDs which failed to resolve. |
GetConnectiveId
#Find the topological ID of an object.
GetConnectiveId
#Gets the Id under which an object is represented in a Connectivity graph. This will either be the IDocumentObject.InstanceId of the founding object, or, if the object is an attached pin, the IDocumentObject.InstanceId of the cushion.
Parameters:
| obj (IDocumentObject) |
IsLinear
#public bool IsLinear(IEnumerable<ConnectiveObject> objects, out ConnectiveObject leading, out ConnectiveObject trailing)
Determine whether a set of objects acts as a linear sequence. That is there is a first object which is allowed to have inputs not in the set, a last object which is allowed to have outputs not in the set, and zero or more objects in between which only connect to their immediate neighbours on either side. Furthermore groups are allowed to exist, but only if all their contained objects are present within the sequence.
Parameters:
| objects (IEnumerable<ConnectiveObject>) | Objects to test. |
| leading (out ConnectiveObject) | First object in linear sequence, if found. |
| trailing (out ConnectiveObject) | Last object in linear sequence, if found. |
IsLinear
#Determine whether a set of objects acts as a linear sequence. That is there is a first object which is allowed to have inputs not in the set, a last object which is allowed to have outputs not in the set, and zero or more objects in between which only connect to their immediate neighbours on either side. Furthermore groups are allowed to exist, but only if all their contained objects are present within the sequence.
Parameters:
| ids (IEnumerable<Guid>) | Ids to test. |
| first (out ConnectiveObject) | First object in linear sequence, if found. |
| last (out ConnectiveObject) | Last object in linear sequence, if found. |
SortCausally
#Sort a set of objects using their causal connections.
Parameters:
| objects (ConnectiveObject[]) |
SubsetTopology
#Measure the topology class for the subset of objects represented by the ids.
Parameters:
| ids (IEnumerable<Guid>) |
SubsetTopology
#Measure the topology class for the set of objects. This method assumes that all the objects in the provided subset are part of the same document from which this connectivity was created. No input validation takes place.
Parameters:
| objects (IEnumerable<IDocumentObject>) |