Home > @jsplumbtoolkit/core > Vertex
Vertex class
Signature:
export declare abstract class Vertex extends Base implements AbstractEdgeTerminus
Extends: Base
Implements: AbstractEdgeTerminus
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(graph, data, idFunction) | Constructs a new instance of the Vertex class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
edges | Array<Edge> | ||
graph | Graph | ||
graphs | Array<Graph> | ||
id | string | The vertex's id. A string. | |
indegreeCentrality | number | ||
nestedGraphs | Array<Graph> | ||
outdegreeCentrality | number |
Methods
Method | Modifiers | Description |
---|---|---|
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) |