Verizon / quiver

A reasonable library for modeling multi-graphs in Scala
http://verizon.github.io/quiver/
Apache License 2.0
200 stars 39 forks source link

Fix GDecomp#redecorate #26

Closed adelbertc closed 7 years ago

adelbertc commented 7 years ago

/cc @runarorama

adelbertc commented 7 years ago

Some notes:

joroKr21 commented 7 years ago

GraphGen.genGDecomp is not fixed properly. It can still generate a graph that doesn't contain the vertex (or the adjacent nodes) in the context. Here is a proper solution:

  def genGDecomp[N: Arbitrary, A: Arbitrary, B: Arbitrary]: Gen[GDecomp[N, A, B]] = for {
    g <- graphGen[N, A, B] if !g.isEmpty
    n <- Gen.oneOf(g.nodes)
  } yield g.decomp(n).toGDecomp.get
rossabaker commented 7 years ago

Thanks! Folded into #27 so we can minimize release churn.