Skip to content
Snippets Groups Projects
Commit a0d4fad2 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Remove warning

parent 83af620c
No related branches found
No related tags found
No related merge requests found
...@@ -82,12 +82,12 @@ object Graphs { ...@@ -82,12 +82,12 @@ object Graphs {
case class DirectedGraphImp[Vertex <: VertexAbs, Edge <: EdgeAbs[Vertex]]( case class DirectedGraphImp[Vertex <: VertexAbs, Edge <: EdgeAbs[Vertex]](
vertices: Set[Vertex], vertices: Set[Vertex],
edges: Set[Edge], edges: Set[Edge],
ins: Map[Vertex, Set[Edge]], ins: Map[VertexAbs, Set[Edge]],
outs: Map[Vertex, Set[Edge]] outs: Map[VertexAbs, Set[Edge]]
) extends DirectedGraph[Vertex, Edge, DirectedGraphImp[Vertex, Edge]] { ) extends DirectedGraph[Vertex, Edge, DirectedGraphImp[Vertex, Edge]] {
override def equals(o: Any): Boolean = (o: @unchecked) match { override def equals(o: Any): Boolean = o match {
case other: DirectedGraphImp[Vertex, Edge] => case other: DirectedGraphImp[_, _] =>
this.vertices == other.vertices && this.vertices == other.vertices &&
this.edges == other.edges && this.edges == other.edges &&
(this.ins.keySet ++ other.ins.keySet).forall (k => this.ins(k) == other.ins(k)) && (this.ins.keySet ++ other.ins.keySet).forall (k => this.ins(k) == other.ins(k)) &&
...@@ -99,8 +99,8 @@ object Graphs { ...@@ -99,8 +99,8 @@ object Graphs {
def this (vertices: Set[Vertex], edges: Set[Edge]) = def this (vertices: Set[Vertex], edges: Set[Edge]) =
this(vertices, this(vertices,
edges, edges,
edges.groupBy(_.v2).toMap.withDefaultValue(Set()), edges.groupBy(_.v2 : VertexAbs).toMap.withDefaultValue(Set()),
edges.groupBy(_.v1).toMap.withDefaultValue(Set())) edges.groupBy(_.v1 : VertexAbs).toMap.withDefaultValue(Set()))
def this() = this(Set(), Set()) def this() = this(Set(), Set())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment