feat: Allow reconfiguration of an existing picomath instance
Keeps track of which operations depend on the configuration and invalidates them for lazy reconfiguration when the config changes.
This commit is contained in:
parent
4213ade4ba
commit
d95e5ad930
3 changed files with 44 additions and 17 deletions
|
@ -46,4 +46,10 @@ describe('Custom instances', () => {
|
|||
assert.deepStrictEqual(math.add(math.complex(2,3), math.complex(2,-3)),
|
||||
math.complex(4,0))
|
||||
})
|
||||
|
||||
it("can be reconfigured", () => {
|
||||
res.reconfigure({resolveComplex: false})
|
||||
assert.deepStrictEqual(math.add(math.complex(2,3), math.complex(2,-3)),
|
||||
math.complex(4,0))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue