import TraversalAlgorithm from 'canvas-graph-creator/src/js/algorithm/traversal-algorithm.js'TraversalAlgorithm
Extends:
AbstractAlgorithm → TraversalAlgorithm
Class that contains code for running a traversal algorithm.
Constructor Summary
| Public Constructor | ||
| public |
constructor(graph: Graph) Constructor for TraversalAlgorithm. |
|
Member Summary
| Public Members | ||
| public |
graphState: * |
|
| public |
|
|
| public |
|
|
| public |
result: * |
|
| public |
stepBuilder: * |
|
Method Summary
| Public Methods | ||
| public |
hasVisited(object: Node | Edge): boolean Check if a node or edge has been visited by the algorithm. |
|
| public |
reset() Reset the algorithm so that it can be run again. |
|
| public |
|
|
| public |
Visit the specified edge. |
|
| public |
Visit the specified node. |
|
Inherited Summary
| From class AbstractAlgorithm | ||
| public |
graph: * |
|
| public |
Run the next step of the algorithm. |
|
Public Constructors
public constructor(graph: Graph) source
Constructor for TraversalAlgorithm.
Override:
AbstractAlgorithm#constructorParams:
| Name | Type | Attribute | Description |
| graph | Graph | The graph that the algorithm will be run on. |