Packages

c

firrtl.graph

MutableDiGraph

class MutableDiGraph[T] extends DiGraph[T]

Source
DiGraph.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MutableDiGraph
  2. DiGraph
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MutableDiGraph()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(that: DiGraph[T]): DiGraph[T]

    Graph sum of this and that

    Graph sum of this and that

    that

    a second DiGraph[T]

    returns

    a DiGraph[T] containing all vertices and edges of each graph

    Definition Classes
    DiGraph
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def BFS(root: T, blacklist: Set[T]): Map[T, T]

    Performs breadth-first search on the directed graph, with a blacklist of nodes

    Performs breadth-first search on the directed graph, with a blacklist of nodes

    root

    the start node

    blacklist

    list of nodes to avoid visiting, if encountered

    returns

    a Map[T,T] from each visited node to its predecessor in the traversal

    Definition Classes
    DiGraph
  6. def BFS(root: T): Map[T, T]

    Performs breadth-first search on the directed graph

    Performs breadth-first search on the directed graph

    root

    the start node

    returns

    a Map[T,T] from each visited node to its predecessor in the traversal

    Definition Classes
    DiGraph
  7. def addEdge(u: T, v: T): Unit

    Add edge (u,v) to the graph.

    Add edge (u,v) to the graph.

    Exceptions thrown

    scala.IllegalArgumentException if u and/or v is not in the graph

  8. def addEdgeIfValid(u: T, v: T): Boolean

    Add edge (u,v) to the graph if and only if both u and v are in the graph prior to calling addEdgeIfValid.

  9. def addPairWithEdge(u: T, v: T): Unit

    Add edge (u,v) to the graph, adding u and/or v if they are not already in the graph.

  10. def addVertex(v: T): T

    Add vertex v to the graph

    Add vertex v to the graph

    returns

    v, the added vertex

  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  13. def contains(v: T): Boolean

    Check whether the graph contains vertex v

    Check whether the graph contains vertex v

    Definition Classes
    DiGraph
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def findLoopAtNode(node: T): Seq[T]

    Finds a Seq of Nodes that form a loop

    Finds a Seq of Nodes that form a loop

    node

    Node to start loop path search from.

    returns

    The found Seq, the Seq is empty if there is no loop

    Definition Classes
    DiGraph
  17. def findSCCs: Seq[Seq[T]]

    Finds the strongly connected components in the graph

    Finds the strongly connected components in the graph

    returns

    a Seq of Seq[T], each containing nodes of an SCC in traversable order

    Definition Classes
    DiGraph
  18. def findSinks: Set[T]

    Find all sinks in the graph

    Find all sinks in the graph

    returns

    a Set[T] of sink nodes

    Definition Classes
    DiGraph
  19. def findSources: Set[T]

    Find all sources in the graph

    Find all sources in the graph

    returns

    a Set[T] of source nodes

    Definition Classes
    DiGraph
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def getEdgeMap: Map[T, Set[T]]
    Definition Classes
    DiGraph
  22. def getEdges(v: T): Set[T]

    Get all edges of a node

    Get all edges of a node

    v

    the specified node

    returns

    a Set[T] of all vertices that v has edges to

    Definition Classes
    DiGraph
  23. def getVertices: Set[T]

    Get all vertices in the graph

    Get all vertices in the graph

    returns

    a Set[T] of all vertices in the graph

    Definition Classes
    DiGraph
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def linearize: Seq[T]

    Linearizes (topologically sorts) a DAG

    Linearizes (topologically sorts) a DAG

    returns

    a Seq[T] describing the topological order of the DAG traversal

    Definition Classes
    DiGraph
    Exceptions thrown

    CyclicException if the graph is cyclic

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. def path(start: T, end: T, blacklist: Set[T]): Seq[T]

    Finds a path (if one exists) from one node to another, with a blacklist

    Finds a path (if one exists) from one node to another, with a blacklist

    start

    the start node

    end

    the destination node

    blacklist

    list of nodes which break path, if encountered

    returns

    a Seq[T] of nodes defining an arbitrary valid path

    Definition Classes
    DiGraph
    Exceptions thrown
  31. def path(start: T, end: T): Seq[T]

    Finds a path (if one exists) from one node to another

    Finds a path (if one exists) from one node to another

    start

    the start node

    end

    the destination node

    returns

    a Seq[T] of nodes defining an arbitrary valid path

    Definition Classes
    DiGraph
    Exceptions thrown
  32. def pathsInDAG(start: T): LinkedHashMap[T, Seq[Seq[T]]]

    Finds all paths starting at a particular node in a DAG

    Finds all paths starting at a particular node in a DAG

    WARNING: This is an exponential time algorithm (as any algorithm must be for this problem), but is useful for flattening circuit graph hierarchies. Each path is represented by a Seq[T] of nodes in a traversable order.

    start

    the node to start at

    returns

    a Map[T,Seq[Seq[T]]] where the value associated with v is the Seq of all paths from start to v

    Definition Classes
    DiGraph
  33. def reachableFrom(root: T, blacklist: Set[T]): LinkedHashSet[T]

    Finds the set of nodes reachable from a particular node, with a blacklist.

    Finds the set of nodes reachable from a particular node, with a blacklist. The semantics of adding a node to the blacklist is that any of its inedges will be ignored in the traversal. The root node is *not* included in the returned set unless it is possible to reach root along a non-trivial path beginning at root; i.e., if the graph has a cycle that contains root.

    root

    the start node

    blacklist

    list of nodes to stop searching, if encountered

    returns

    a Set[T] of nodes reachable from root

    Definition Classes
    DiGraph
  34. def reachableFrom(root: T): LinkedHashSet[T]

    Finds the set of nodes reachable from a particular node.

    Finds the set of nodes reachable from a particular node. The root node is *not* included in the returned set unless it is possible to reach root along a non-trivial path beginning at root; i.e., if the graph has a cycle that contains root.

    root

    the start node

    returns

    a Set[T] of nodes reachable from root

    Definition Classes
    DiGraph
  35. def reverse: DiGraph[T]

    Returns a graph with all edges reversed

    Returns a graph with all edges reversed

    Definition Classes
    DiGraph
  36. def simplify(vprime: Set[T]): DiGraph[T]

    Return a simplified connectivity graph with only a subset of the nodes

    Return a simplified connectivity graph with only a subset of the nodes

    Any path between two non-deleted nodes (u,v) in the original graph will be transformed into an edge (u,v).

    vprime

    the Set[T] of desired vertices

    returns

    the simplified graph

    Definition Classes
    DiGraph
    Exceptions thrown

    scala.IllegalArgumentException if vprime is not a subset of V

  37. def subgraph(vprime: Set[T]): DiGraph[T]

    Return a graph with only a subset of the nodes

    Return a graph with only a subset of the nodes

    Any edge including a deleted node will be deleted

    vprime

    the Set[T] of desired vertices

    returns

    the subgraph

    Definition Classes
    DiGraph
    Exceptions thrown

    scala.IllegalArgumentException if vprime is not a subset of V

  38. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. def transformNodes[Q](f: (T) ⇒ Q): DiGraph[Q]

    Return a graph with all the nodes of the current graph transformed by a function.

    Return a graph with all the nodes of the current graph transformed by a function. Edge connectivity will be the same as the current graph.

    f

    A function {(T) => Q} that transforms each node

    returns

    a transformed DiGraph[Q]

    Definition Classes
    DiGraph
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from DiGraph[T]

Inherited from AnyRef

Inherited from Any

Ungrouped