documentationfor yFiles for HTML 2.6

BfsAlgorithm

This class provides services that center around breadth first search (BFS).

Inheritance Hierarchy
BfsAlgorithm

Remarks

Note: Methods of this class work with instances of Graph. To run a breadth-first search on IGraph instances use Bfs instead.

Breadth first search starts at a given set of nodes and explores the neighboring nodes first, before visiting the next level neighbors.

A breadth first search run can be either directed or undirected. All methods require a list of nodes that are considered as the core nodes from which the breadth first search starts. These nodes can be identified either with a YNodeList or with a IDataProvider that returns true for core nodes and false for all other nodes. The output is given as an array of YNodeLists each of which contains the nodes of a particular layer.

Example for a BFS run. The marked node is the core node from which BFS starts while node labels indicate the resulting layers.

Type Details

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

Static Methods