documentationfor yFiles for HTML 3.0.0.1

Analysis Algorithms on the LayoutGraph

The changes described in this chapter only affect users who work directly with the LayoutGraph API, such as when writing custom layout algorithms. To run analysis algorithms on IGraph, please see chapter Graph Analysis.

To execute analysis algorithms (e.g. shortest path, centrality measures) directly on a LayoutGraph, static methods are provided. In yFiles for HTML 2.6, the methods were thematically distributed among different types, for example, ShortestPathAlgorithm, CentralityAlgorithm, TreeAlgorithm etc. Now, all algorithms are collected in the new class:

LayoutGraphAlgorithms
Provides all analysis algorithms offered for the LayoutGraph. For example, shortestPath, isTree, graphCentrality and many more.

Methods to check for specific graph features that were previously on class GraphCecker have also been moved to LayoutGraphAlgorithms.

Furthermore, the signatures of the algorithm methods have been streamlined and simplified in many cases. When using an overload/signature that is not available anymore in yFiles for HTML 3.0, it will usually be possible to achieve the same again, but there is no generic recipe on how to migrate.

In yFiles for HTML 3.0, a structure graph can be used for most analysis algorithms to improve the algorithm’s performance.