Skip to main content

Node

A Node is a Vertex that does not contain other nodes/groups.

Extends​

Extended by​

Methods​

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[]

Overrides​

Vertex.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[]

Overrides​

Vertex.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[]

Overrides​

Vertex.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[]


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[]


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[]


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​

Vertex.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​

Vertex.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

Overrides​

Vertex.getIndegreeCentrality


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

Overrides​

Vertex.getOutdegreeCentrality


getPort()​

getPort(portId): Port

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

Parameters​

portId​

string

Port id.

Returns​

Port


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[]


getPorts()​

getPorts(): Port[]

Gets all Ports associated with this Node.

Returns​

Port[]


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[]


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[]


getSourceEdges()​

getSourceEdges(): Edge[]

Gets all Edges where this Vertex is the source.

Returns​

Edge[]

Inherited from​

Vertex.getSourceEdges


getTargetEdges()​

getTargetEdges(): Edge[]

Gets all Edges where this Vertex is the target.

Returns​

Edge[]

Inherited from​

Vertex.getTargetEdges


inspect()​

inspect(): string

Returns a string representation of the Vertex. *

Returns​

string

Vertex dumped to a string.

Inherited from​

Vertex.inspect

Properties​

group​

group: Group

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


id​

id: string

The vertex's id. Must be a string.

Inherited from​

Vertex.id


type​

type: string

Object's type.

Inherited from​

Vertex.type