@graphty/graphty-element / managers / AlgorithmManager
Class: AlgorithmManager ​
Defined in: graphty-element/src/managers/AlgorithmManager.ts:11
Manages algorithm execution and coordination Handles running algorithms from templates and individual algorithm execution
Implements ​
Constructors ​
Constructor ​
new AlgorithmManager(
eventManager,graph):AlgorithmManager
Defined in: graphty-element/src/managers/AlgorithmManager.ts:17
Creates an instance of AlgorithmManager
Parameters ​
eventManager ​
Event manager for emitting algorithm events
graph ​
Graph instance to run algorithms on
Returns ​
AlgorithmManager
Methods ​
dispose() ​
dispose():
void
Defined in: graphty-element/src/managers/AlgorithmManager.ts:34
Disposes of the algorithm manager and cleans up resources
Returns ​
void
Implementation of ​
getAvailableAlgorithms() ​
getAvailableAlgorithms():
string[]
Defined in: graphty-element/src/managers/AlgorithmManager.ts:138
Get list of available algorithms TODO: This depends on the Algorithm registry implementation
Returns ​
string[]
Array of available algorithm names
hasAlgorithm() ​
hasAlgorithm(
namespace,type):boolean
Defined in: graphty-element/src/managers/AlgorithmManager.ts:124
Check if an algorithm exists
Parameters ​
namespace ​
string
Algorithm namespace
type ​
string
Algorithm type
Returns ​
boolean
True if the algorithm exists, false otherwise
init() ​
init():
Promise<void>
Defined in: graphty-element/src/managers/AlgorithmManager.ts:26
Initializes the algorithm manager
Returns ​
Promise<void>
Promise that resolves when initialization is complete
Implementation of ​
runAlgorithm() ​
runAlgorithm(
namespace,type,algorithmOptions?):Promise<void>
Defined in: graphty-element/src/managers/AlgorithmManager.ts:85
Run a specific algorithm by namespace and type
Parameters ​
namespace ​
string
Algorithm namespace (e.g., "graphty")
type ​
string
Algorithm type (e.g., "dijkstra")
algorithmOptions? ​
AlgorithmSpecificOptions
Optional algorithm-specific options (source, target, etc.)
Returns ​
Promise<void>
runAlgorithmsFromTemplate() ​
runAlgorithmsFromTemplate(
algorithms):Promise<void>
Defined in: graphty-element/src/managers/AlgorithmManager.ts:43
Run algorithms specified in the template configuration Called during initialization if runAlgorithmsOnLoad is true
Parameters ​
algorithms ​
string[]
Array of algorithm names in "namespace:type" format
Returns ​
Promise<void>