aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/graph
diff options
context:
space:
mode:
authorChick Markley2020-03-26 11:43:24 -0700
committerGitHub2020-03-26 18:43:24 +0000
commit249ed127cf6bf849f9895b8b603bececba1c5d76 (patch)
tree5313d130d40184dedf7c8b8e1608df5db2c74acd /src/main/scala/firrtl/graph
parent5b58936df09163ed3f0690bd66e46b307c2a9654 (diff)
Eliminate warnings on `sbt doc` and `sbt unidoc` (#1470)
* Eliminate warnings on `sbt doc` and `sbt unidoc` - removed toFirrtl reference on MultiTargetAnnotation - lots of places where package path has to be added to comment references - Change to use `/** text starts here` convention when wrong in comment with a doc fix. - Did not exhaustively change these - Wrestled doc example in RenderDiGraph#renderNode, not sure if I won - Cleaned up InferWidths & CatchExceptions imports - Added missing license message to a couple of files. - fixed a couple of stale parameter names in scaladoc - Added @unchecked to stop erasure warning in Emitting where emission annotations are collected - Change types to [_] on match in RenameMap#recordAll to fix erasure warning * Where possible change [[firrtl.ir.X]] to [[firrtl.ir.X X]] for better display in scaladoc Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/scala/firrtl/graph')
-rw-r--r--src/main/scala/firrtl/graph/DiGraph.scala6
-rw-r--r--src/main/scala/firrtl/graph/EdgeData.scala16
-rw-r--r--src/main/scala/firrtl/graph/RenderDiGraph.scala5
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 = {