Skip to main content

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

Node.getAllEdges


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

Node.getAllSourceEdges


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

Node.getAllTargetEdges


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

Node.getDirectEdges


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

Node.getDirectSourceEdges


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

Node.getDirectTargetEdges


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

Node.getEdges


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

Node.getFullId


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

Node.getIndegreeCentrality


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

Node.getOutdegreeCentrality


getPort()

getPort(portId): Port

Gets the Port with the given id, null if nothing found.

Parameters

portId

string

Port id.

Returns

Port

Inherited from

Node.getPort


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

Node.getPortEdges


getPorts()

getPorts(): Port[]

Gets all Ports associated with this Node.

Returns

Port[]

Inherited from

Node.getPorts


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

Node.getPortSourceEdges


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

Node.getPortTargetEdges


getSourceEdges()

getSourceEdges(): Edge[]

Gets all Edges where this Vertex is the source.

Returns

Edge[]

Inherited from

Node.getSourceEdges


getTargetEdges()

getTargetEdges(): Edge[]

Gets all Edges where this Vertex is the target.

Returns

Edge[]

Inherited from

Node.getTargetEdges


inspect()

inspect(): string

Returns a string representation of the Vertex. *

Returns

string

Vertex dumped to a string.

Inherited from

Node.inspect

Properties

group

group: Group

Group the node is a member of, if any. This property should never be written by your code.

Inherited from

Node.group


id

id: string

The vertex's id. Must be a string.

Inherited from

Node.id


members

members: Node[] = []

Members of the group. Do not write to, or manipulate in any way, this array.


type

type: string

Object's type.

Inherited from

Node.type