Class GraphAnalysis<Nodes, GraphJSON>
Type Parameters
- Nodes
- GraphJSON = any[]
Constructors
constructor
- new GraphAnalysis<Nodes, GraphJSON = any[]>(
options: {
graph: ElementDefinition[];
nodes: Map<string, DependencyNodes>;
},
): GraphAnalysis<Nodes, GraphJSON>Type Parameters
- Nodes
- GraphJSON = any[]
Parameters
- options: { graph: ElementDefinition[]; nodes: Map<string, DependencyNodes> }
Options.
graph: ElementDefinition[]
The graph data.
nodes: Map<string, DependencyNodes>
The Node map.
Returns GraphAnalysis<Nodes, GraphJSON>
Methods
bfs
- bfs(
visit: SearchVisitFunction,
options?: { directed?: boolean; type?: string | Set<string> },
): voidPerform a breadth first search of the graph.
Parameters
- visit: SearchVisitFunction
A cytoscape search visit function.
Optionaloptions: { directed?: boolean; type?: string | Set<string> }Options.
Optionaldirected?: booleanA boolean indicating whether the algorithm should only go along edges from source to target.
Optionaltype?: string | Set<string>Specific type to retrieve.
Returns void
- visit: SearchVisitFunction
dfs
- dfs(
visit: SearchVisitFunction,
options?: { directed?: boolean; type?: string | Set<string> },
): voidPerform a depth first search of the graph.
Parameters
- visit: SearchVisitFunction
A cytoscape search visit function.
Optionaloptions: { directed?: boolean; type?: string | Set<string> }Options.
Optionaldirected?: booleanA boolean indicating whether the algorithm should only go along edges from source to target.
Optionaltype?: string | Set<string>Specific type to retrieve.
Returns void
- visit: SearchVisitFunction
toJSON
Returns GraphJSON
Returns a JSON array of the graph.
Provides a wrapper around a headless
cytoscapeinstance loaded with the given graph data and node Map.A GraphAnalysis instance for the dependencies graph is passed into the postprocessor ProcessorFunction functions managed by PostProcess.