Class VertexAbstract

Base vertex class, extended by Port and Node (which is itself extended by Group). A vertex models some entity in your app, and may have one or more edges to other vertices.

Hierarchy (view full)

Implements

Methods

  • Adds a sub-graph to this vertex. If you provide an existing Graph instance that does not have an id, one will be assigned.

    Parameters

    • g: string | Graph

      Either a Graph instance, or the id you wish to assign to a new Graph.

    Returns Graph

    The Graph that was added.

  • Gets all edges where this vertex - or any of its ports - are the source of target of the edge.

    Parameters

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)
          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

  • Sets some attribute on the object.

    Parameters

    • key: string

    Returns string

  • 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

    • Optionalparams: {
          filter: ((e: Edge) => boolean);
      }
      • filter: ((e: Edge) => boolean)

        Optional function to test whether a given edge should be included.

          • (e): boolean
          • Parameters

            Returns boolean

    Returns Edge[]

    List of matching edges.

    #getAllEdges.

  • 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

  • Retrieves a sub-graph by id. *

    Parameters

    • id: string

    Returns Graph

    Sub-graph with the given id, null if not found.

  • Returns the indegree centrality of this vertex.

    Returns number

  • Returns the outdegree centrality of this vertex.

    Returns number

  • Returns a string representation of the Vertex. *

    Returns string

    Vertex dumped to a string.

  • Gets some attribute from the object.

    Parameters

    • key: string
    • value: string

    Returns void

Properties

Underlying data for the object.

id: string

The vertex's id. A string.

transient?: boolean

Transient vertices are created at various points in the lifecycle of a renderer, such as dragging new edges, and are not exported in the dataset

type: string

Type of the object

Version :