Skip to main content

Home > @jsplumbtoolkit/core > Vertex

Vertex class

Signature:

export declare abstract class Vertex extends Base implements AbstractEdgeTerminus 

Extends: Base

Implements: AbstractEdgeTerminus

Constructors

ConstructorModifiersDescription
(constructor)(graph, data, idFunction)Constructs a new instance of the Vertex class

Properties

PropertyModifiersTypeDescription
edgesArray<Edge>
graphGraph
graphsArray<Graph>
idstringThe vertex's id. A string.
indegreeCentralitynumber
nestedGraphsArray<Graph>
outdegreeCentralitynumber

Methods

MethodModifiersDescription
addEdge(edge)Adds an Edge to the vertex.
addGraph(g)Adds a sub-graph to this vertex. If you provide an existing Graph instance that does not have an id, one will be assigned.
deleteEdge(edge)Deletes an Edge from the Vertex.
getAllEdges(params)Gets all edges where this vertex - or any of its ports - are the source of target of the edge.
getEdges(params)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,
getFullId()Gets the Vertex's id, which, for Nodes and Groups, is just the id property. This method is overridden by Ports.
getGraph(id)Retrieves a sub-graph by id.
getIndegreeCentrality()
getOutdegreeCentrality()
getSourceEdges()Gets all Edges where this Vertex is the source.
getTargetEdges()Gets all Edges where this Vertex is the target.
inspect()Returns a string representation of the Vertex.
isChildOf(v)