Group
A group is an extension of node that can contain other nodes and groups.
Extends
Methods
getAllDirectEdges()
getAllDirectEdges(
filter?):Edge[]
Gets all the edges connecting to this group and any ports on the group.
Parameters
filter?
(e) => boolean
Optional edge filter.
Returns
Edge[]
Graph Query
getAllEdges()
getAllEdges(
filter?):Edge[]
Gets all of the edges connected to this node, both on the node itself and on all of its ports.
Parameters
filter?
(e) => boolean
Optional Edge filter.
Returns
Edge[]
Inherited from
getAllSourceEdges()
getAllSourceEdges():
Edge[]
Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the source of edge
Returns
Edge[]
Inherited from
getAllTargetEdges()
getAllTargetEdges():
Edge[]
Gets all of the Edges connected to this Node, both on the Node itself and on all of its Ports, where this node/port is the target of edge
Returns
Edge[]
Inherited from
getDirectEdges()
getDirectEdges(
filter?):Edge[]
Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex. This is an alias for getEdges.
Parameters
filter?
(e) => boolean
Optional Edge filter.
Returns
Edge[]
Inherited from
getDirectSourceEdges()
getDirectSourceEdges():
Edge[]
Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the source.
This is an alias for getSourceEdges.
Returns
Edge[]
Inherited from
getDirectTargetEdges()
getDirectTargetEdges():
Edge[]
Gets all Edges directly connected to this Vertex, ie. not to one of the Ports on the Vertex, where this Vertex is the target.
This is an alias for getTargetEdges.
Returns
Edge[]
Inherited from
getEdges()
getEdges(
params?):Edge[]
Gets all edges where this vertex is either the source or the target of the edge. Note that this does not retrieve edges on any ports associated with this Vertex - for that,
Parameters
params?
filter
(e) => boolean
Optional function to test whether a given edge should be included.
Returns
Edge[]
List of matching edges.
See
#getAllEdges.
Inherited from
getFullId()
getFullId():
string
Gets the Vertex's id, which, for Nodes and Groups, is just the id property. This method is overridden by Ports.
Returns
string
Vertex id
Inherited from
getIndegreeCentrality()
getIndegreeCentrality():
number
Gets this Node's "indegree" centrality; a measure of how many other Nodes are connected to this Node as the target of some Edge.
Returns
number
Inherited from
getInternalEdges()
getInternalEdges(
filter?):Edge[]
Gets all the edges to/from the group, any ports the Group has, and any edges connected to all child vertices of the group.
Parameters
filter?
(e) => boolean
Optional edge filter to apply to all members and the group itself.
Returns
Edge[]
Graph Query
getMemberCount()
getMemberCount():
number
Gets how many members the group has.
Returns
number
Graph Query
getMembers()
getMembers():
Node[]
Gets the group members
Returns
Node[]
Graph Query
getOutdegreeCentrality()
getOutdegreeCentrality():
number
Gets this Node's "outdegree" centrality; a measure of how many other Nodes this Node is connected to as the source of some Edge.
Returns
number
Inherited from
getPort()
getPort(
portId):Port
Gets the Port with the given id, null if nothing found.
Parameters
portId
string
Port id.
Returns
Inherited from
getPortEdges()
getPortEdges(
filter?):Edge[]
Gets all Edges that are connected to Ports on this Node, not directly to the Node itself.
Parameters
filter?
(e) => boolean
Optional edge filter
Returns
Edge[]
Inherited from
getPorts()
getPorts():
Port[]
Gets all Ports associated with this Node.
Returns
Port[]
Inherited from
getPortSourceEdges()
getPortSourceEdges():
Edge[]
Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the source of the edge.
Returns
Edge[]
Inherited from
getPortTargetEdges()
getPortTargetEdges():
Edge[]
Gets all Edges that are connected to Ports on this Node, not directly to the Node itself, where the Port on this Node is the target of the edge.
Returns
Edge[]
Inherited from
getSourceEdges()
getSourceEdges():
Edge[]
Gets all Edges where this Vertex is the source.
Returns
Edge[]
Inherited from
getTargetEdges()
getTargetEdges():
Edge[]
Gets all Edges where this Vertex is the target.
Returns
Edge[]
Inherited from
inspect()
inspect():
string
Returns a string representation of the Vertex. *
Returns
string
Vertex dumped to a string.
Inherited from
Properties
group
group:
Group
Group the node is a member of, if any. This property should never be written by your code.
Inherited from
id
id:
string
The vertex's id. Must be a string.
Inherited from
members
members:
Node[] =[]
Members of the group. Do not write to, or manipulate in any way, this array.
type
type:
string
Object's type.