Skip to content

Commit 516a451

Browse files
committed
migrate to CodeMirror editor
1 parent 03a446a commit 516a451

File tree

2 files changed

+4
-2
lines changed
  • src
    • commonMain/kotlin/ai/hypergraph/kaliningraph/automata
    • jvmTest/kotlin/ai/hypergraph/kaliningraph/repair

2 files changed

+4
-2
lines changed

src/commonMain/kotlin/ai/hypergraph/kaliningraph/automata/GRE.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,15 @@ fun repairWithSparseGRE(brokenStr: List<Σᐩ>, cfg: CFG): GRE? {
625625

626626
var maxChildren = 0
627627

628+
val acc: MutableMap<Int, MutableList<GRE>> = hashMapOf()
629+
628630
for (dist in 1 until n) {
629631
var p = 0
630632
while (p < n - dist) {
631633
val q = p + dist
632634
val appq = levFSA.allPairs[p][q]; if (appq == null) { p++; continue }
633635

634-
val acc: MutableMap<Int, MutableList<GRE>> = hashMapOf()
636+
acc.clear()
635637

636638
var i = 0
637639
while (i < appq.size) {

src/jvmTest/kotlin/ai/hypergraph/kaliningraph/repair/ProbabilisticLBH.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ class ProbabilisticLBH {
561561
.readText().trimIndent().lines().map { it.split(" -> ").let { Pair(it[0], it[1].split(" ")) } }.toSet().freeze()
562562
}
563563

564-
/*
564+
/*
565565
./gradlew jvmTest --tests "ai.hypergraph.kaliningraph.repair.ProbabilisticLBH.testMiniKTAPI"
566566
*/
567567
@Test

0 commit comments

Comments
 (0)