import AlgorithmResult from 'canvas-graph-creator/src/js/algorithm/algorithm-result.js'
AlgorithmResult
Stores the results generated by running an Algorithm. An instance will be stored in each Algorithm object.
Test:
Constructor Summary
Public Constructor | ||
public |
constructor(nodeFields: Array<string>, edgeFields: Array<string>) Constructs an instance of AlgorithmResult. |
Method Summary
Public Methods | ||
public |
Add a Step to the AlgorithmResult. |
|
public |
Move to the previous step in the timeline. |
|
public |
Move to the next step in the timeline. |
Public Constructors
Public Methods
public addStep(step: Step) source
Add a Step to the AlgorithmResult.
Params:
Name | Type | Attribute | Description |
step | Step | The step to add. |
public stepBackward() source
Move to the previous step in the timeline. Does nothing if already at the beginning.
public stepForward() source
Move to the next step in the timeline. Does nothing if already at the end.