diff options
Diffstat (limited to 'src/main/scala/firrtl/graph')
| -rw-r--r-- | src/main/scala/firrtl/graph/DiGraph.scala | 6 | ||||
| -rw-r--r-- | src/main/scala/firrtl/graph/EdgeData.scala | 16 | ||||
| -rw-r--r-- | src/main/scala/firrtl/graph/RenderDiGraph.scala | 5 |
3 files changed, 12 insertions, 15 deletions
diff --git a/src/main/scala/firrtl/graph/DiGraph.scala b/src/main/scala/firrtl/graph/DiGraph.scala index e3b5fbe9..f30beec1 100644 --- a/src/main/scala/firrtl/graph/DiGraph.scala +++ b/src/main/scala/firrtl/graph/DiGraph.scala @@ -336,7 +336,7 @@ class DiGraph[T] private[graph] (private[graph] val edges: LinkedHashMap[T, Link * Any edge including a deleted node will be deleted * * @param vprime the Set[T] of desired vertices - * @throws IllegalArgumentException if vprime is not a subset of V + * @throws scala.IllegalArgumentException if vprime is not a subset of V * @return the subgraph */ def subgraph(vprime: Set[T]): DiGraph[T] = { @@ -350,7 +350,7 @@ class DiGraph[T] private[graph] (private[graph] val edges: LinkedHashMap[T, Link * transformed into an edge (u,v). * * @param vprime the Set[T] of desired vertices - * @throws IllegalArgumentException if vprime is not a subset of V + * @throws scala.IllegalArgumentException if vprime is not a subset of V * @return the simplified graph */ def simplify(vprime: Set[T]): DiGraph[T] = { @@ -394,7 +394,7 @@ class MutableDiGraph[T] extends DiGraph[T](new LinkedHashMap[T, LinkedHashSet[T] } /** Add edge (u,v) to the graph. - * @throws IllegalArgumentException if u and/or v is not in the graph + * @throws scala.IllegalArgumentException if u and/or v is not in the graph */ def addEdge(u: T, v: T): Unit = { require(contains(u)) diff --git a/src/main/scala/firrtl/graph/EdgeData.scala b/src/main/scala/firrtl/graph/EdgeData.scala index 4c1109ed..16990de0 100644 --- a/src/main/scala/firrtl/graph/EdgeData.scala +++ b/src/main/scala/firrtl/graph/EdgeData.scala @@ -34,7 +34,7 @@ trait EdgeData[V, E] { * @param u the source of the edge * @param v the destination of the edge * @throws EdgeNotFoundException if the edge does not exist - * @throws NoSuchElementException if the edge has no data + * @throws scala.NoSuchElementException if the edge has no data */ def edgeData(u: V, v: V): E = { assertEdgeExists(u, v) @@ -76,25 +76,23 @@ trait MutableEdgeData[V, E] extends EdgeData[V, E] { edgeDataMap((u, v)) = data } - /** - * Add an edge (u,v) to the graph with associated edge data. + /** Add an edge (u,v) to the graph with associated edge data. * - * @see [[DiGraph.addEdge]] + * @see [[MutableDiGraph.addEdge]] * @param u the source of the edge * @param v the destination of the edge * @param data the edge data to associate with the edge - * @throws IllegalArgumentException if u or v is not part of the graph + * @throws scala.IllegalArgumentException if u or v is not part of the graph */ def addEdge(u: V, v: V, data: E): Unit = { addEdge(u, v) setEdgeData(u, v, data) } - /** - * Safely add an edge (u,v) to the graph with associated edge data. If on or more of the two + /** Safely add an edge (u,v) to the graph with associated edge data. If on or more of the two * vertices is not present in the graph, add them before creating the edge. * - * @see [[DiGraph.addPairWithEdge]] + * @see [[MutableDiGraph.addPairWithEdge]] * @param u the source of the edge * @param v the destination of the edge * @param data the edge data to associate with the edge @@ -109,7 +107,7 @@ trait MutableEdgeData[V, E] extends EdgeData[V, E] { * are present in the graph. This is useful for preventing spurious edge creating when examining * a subset of possible nodes. * - * @see [[DiGraph.addEdgeIfValid]] + * @see [[MutableDiGraph.addEdgeIfValid]] * @return a Boolean indicating whether the edge was added * @param u the source of the edge * @param v the destination of the edge diff --git a/src/main/scala/firrtl/graph/RenderDiGraph.scala b/src/main/scala/firrtl/graph/RenderDiGraph.scala index 812a86ef..b3c1373c 100644 --- a/src/main/scala/firrtl/graph/RenderDiGraph.scala +++ b/src/main/scala/firrtl/graph/RenderDiGraph.scala @@ -19,10 +19,9 @@ class RenderDiGraph[T <: Any](diGraph: DiGraph[T], graphName: String = "", rankD /** * override this to change the default way a node is displayed. Default is toString surrounded by double quotes + * This example changes the double quotes to brackets * {{{ - * val rend = new RenderDiGraph(graph, "alice") { - * override def renderNode(node: Symbol): String = s"\"${symbol.name}\"" - * } + * override def renderNode(node: String): String = { "[" + node + "]" } * }}} */ def renderNode(node: T): String = { |
