documentationfor yFiles for HTML 2.6

This class implements a directed graph structure.

Remarks

Basically, a directed graph consists of a set of objects called "nodes" (represented by instances of class YNode) and a set of node pairs which are called "edges" (represented by instances of class Edge).

The directed stems from the fact that all edges in the graph have direction, i.e., they have a distinct source node and a distinct target node. Using the aforementioned pair notation, an edge would be written as (<source node>, <target node>).

Class Graph presents a proper data type that provides support for all essential operations like element creation, removal, access, and iteration.

Important: Class Graph is the single authority for any structural changes to the graph data type. Specifically, this means that there is no way to create or delete a node or an edge without using an actual Graph instance.

Furthermore, this class is also responsible for providing access to its elements. This is done by means of bidirectional cursors that present a read-only view on the node set (interface INodeCursor) and edge set (interface IEdgeCursor).

This class provides direct support for the notion of data accessors. It allows to register so-called data providers (implementations of interface IDataProvider) that hold arbitrary data which is associated to its nodes and/or edges.

Also, it serves as a factory to create so-called maps (INodeMap, IEdgeMap) that can be utilized to bind arbitrary data to nodes and edges.

Type Details

yfiles module
algorithms
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.algorithms.Graph

See Also

Constructors

Properties

Methods

Static Methods