我可以“屈服”成地图吗?
我试过了
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)
我知道为什么,但我不知道如何解决这个问题:-/