Skip to content

Commit

Permalink
clearScheduledPropagators
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Sep 5, 2024
1 parent 22d64a0 commit 034b7be
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
`MergeConflict` 移至 `merge-conflict/` -- 正与 `nothing/` 相同

`barometer-belief.test` -- 在测试中增加书中的叙述 -- 与对 belief-system 的测试相同

# 4.3 Dependencies Explain Contradictions

> https://github.com/cicada-lang/propagator/issues/9
# 4.4 Dependencies Improve Search

> - https://github.com/cicada-lang/propagator/issues/4
> https://github.com/cicada-lang/propagator/issues/4
# 修复 lattice 笔记

Expand Down
6 changes: 6 additions & 0 deletions src/examples/barometer-belief-system.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,10 @@ test("examples / barometer-belief-system", async () => {
},
),
)

// log(buildingHeight.content)

// put(buildingHeight, Belief(Interval(46, 50), ["pressure"]))

// await run()
})
2 changes: 1 addition & 1 deletion src/generic/defineGeneric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export function defineGeneric(
who: "GenericDefinition",
constroctor: "defineGeneric",
message,
definition,
args,
definition,
})

throw new Error(`[GenericDefinition] ${message}`)
Expand Down
4 changes: 4 additions & 0 deletions src/scheduler/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ export function schedule(propagators: Array<Propagator>): void {
export function scheduleAllEverScheduledPropagators(): void {
schedule(Array.from(allEverScheduledPropagators))
}

export function clearScheduledPropagators(): void {
globalScheduler.jobs = []
}

0 comments on commit 034b7be

Please sign in to comment.