lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.graph.Graph< T > Interface Template Reference

Root interface for graph implementations. More...

Inherited by org.lflang.graph.DirectedGraph< T >.

Public Member Functions

void addEdge (T to, T from)
void addEdges (T to, List< T > from)
void addNode (T node)
 Add the given node to the graph.
int edgeCount ()
 Return the number of directed edges in this graph.
boolean hasNode (T node)
int nodeCount ()
 Return the number of nodes in this graph.
Set< T > nodes ()
 Return an unmodifiable set of nodes in this graph.
void removeEdge (T to, T from)
void removeNode (T node)
 Remove the given node from the graph.
String toDOT ()
 Return the DOT (GraphViz) representation of the graph.

Detailed Description

Root interface for graph implementations.

Parameters
<T>Type of vertices of the graph

Member Function Documentation

◆ addEdge()

void org.lflang.graph.Graph< T >.addEdge ( T to,
T from )

◆ addEdges()

void org.lflang.graph.Graph< T >.addEdges ( T to,
List< T > from )

◆ addNode()

void org.lflang.graph.Graph< T >.addNode ( T node)

Add the given node to the graph.

Implemented in org.lflang.graph.DirectedGraph< T >.

◆ edgeCount()

int org.lflang.graph.Graph< T >.edgeCount ( )

Return the number of directed edges in this graph.

Implemented in org.lflang.graph.DirectedGraph< T >.

◆ hasNode()

boolean org.lflang.graph.Graph< T >.hasNode ( T node)

◆ nodeCount()

int org.lflang.graph.Graph< T >.nodeCount ( )

Return the number of nodes in this graph.

Implemented in org.lflang.graph.DirectedGraph< T >.

◆ nodes()

Set< T > org.lflang.graph.Graph< T >.nodes ( )

Return an unmodifiable set of nodes in this graph.

Implemented in org.lflang.graph.DirectedGraph< T >.

◆ removeEdge()

void org.lflang.graph.Graph< T >.removeEdge ( T to,
T from )

◆ removeNode()

void org.lflang.graph.Graph< T >.removeNode ( T node)

Remove the given node from the graph.

This also eliminates any edges from upstream and to downstream neighbors of this node.

Parameters
nodeThe node to remove.

Implemented in org.lflang.graph.DirectedGraph< T >.

◆ toDOT()

String org.lflang.graph.Graph< T >.toDOT ( )

Return the DOT (GraphViz) representation of the graph.

Implemented in org.lflang.generator.ReactionInstanceGraph, and org.lflang.graph.DirectedGraph< T >.


The documentation for this interface was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/graph/Graph.java