マップに「譲る」ことはできますか?
私はもう試した
val rndTrans = for (s1 <- 0 to nStates;
s2 <- 0 to nStates
if rnd.nextDouble() < trans_probability)
yield (s1 -> s2);
(およびの,
代わりに->
)が、エラーが発生します
TestCaseGenerator.scala:42: error: type mismatch;
found : Seq.Projection[(Int, Int)]
required: Map[State,State]
new LTS(rndTrans, rndLabeling)
理由はわかりますが、これを解決する方法がわかりません:-/