Stepper
Helper class for stepping through and playing algorithm results.
Method Summary
Public Methods | ||
public |
pause() Pause the stepper if it is currently playing. |
|
public |
Play the algorithm results. |
|
public |
reset() Reset the stepper object. |
|
public |
Reset the state of the graph by undoing all changes made by the algorithm steps. |
|
public |
setResult(result: AlgorithmResult) Set the specified AlgorithmResult object to the "result" field. |
|
public |
|
|
public |
|
|
public |
Go to the previous algorithm step. |
|
public |
Go to the next algorithm step. |
Public Methods
public play(callback: Function) source
Play the algorithm results. Steps forward until paused or finished.
Params:
Name | Type | Attribute | Description |
callback | Function | Callback function that is called whenever a step is completed. |
public resetGraph() source
Reset the state of the graph by undoing all changes made by the algorithm steps.
public setResult(result: AlgorithmResult) source
Set the specified AlgorithmResult object to the "result" field.
Params:
Name | Type | Attribute | Description |
result | AlgorithmResult | AlgorithmResult object. |