Lets implicitly convert a labeled inner edge to its label:
Lets implicitly convert a labeled inner edge to its label:
import scalax.collection.mutable.{Graph => MGraph} case class MyLabel(val i: Int) val g = MGraph(LUnDiEdge(1,3)(MyLabel(4))) val eInner = g.edges.head object MyLabelConversion extends TypedLEdgeImplicits[MGraph, MyLabel] import MyLabelConversion._ val four_2 = eInner.i
As this conversion is not type safe, the user has to ensure that innerEdge
is of appropriate type.
Lets implicitly convert a labeled outer edge to its label:
Lets implicitly convert a labeled outer edge to its label:
import scalax.collection.mutable.{Graph => MGraph} case class MyLabel(val i: Int) val eOuter = LUnDiEdge(1,3)(MyLabel(4)) object MyLabelConversion extends TypedLEdgeImplicits[MGraph, MyLabel] import MyLabelConversion._ val four = eOuter.i
Convenience trait to quickly achieve implicit conversion from a labeled edge to its label for any graph type. This trait is the typed variant of scalax.collection.edge.LBase.LEdgeImplicits which works for immutable
Graph
s only.kind of type of graph.
type of the user label.