SplittingNode(V, C)ΒΆ
newdata.spad line 147 [edit on github]
V: Join(SetCategory, Aggregate)
C: Join(SetCategory, Aggregate)
This domain exports a modest implementation for the vertices of splitting trees. These vertices are called here splitting nodes. Every of these nodes store 3 informations. The first one is its value, that is the current expression to evaluate. The second one is its condition, that is the hypothesis under which the value has to be evaluated. The last one is its status, that is a boolean flag which is true
iff the value is the result of its evaluation under its condition. Two splitting vertices are equal iff they have the sane values and the same conditions (so their status do not matter).
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- condition: % -> C
condition(n)
returns the condition of the noden
.
- construct: (V, C) -> %
construct(v, t)
returns the same asconstruct(v, t, false)
- construct: (V, C, Boolean) -> %
construct(v, t, b)
returns the non-empty node with valuev
, conditiont
and flagb
- construct: List Record(val: V, tower: C) -> List %
construct(lvt)
returns the same as[construct(vt.val, vt.tower) for vt in lvt]
- construct: Record(val: V, tower: C) -> %
construct(vt)
returns the same asconstruct(vt.val, vt.tower)
- copy: % -> %
copy(n)
returns a copy ofn
.
- empty?: % -> Boolean
empty?(n)
returnstrue
iff the noden
isempty()\$\%
.
- empty: () -> %
empty()
returns the same as[empty()\$V, empty()\$C, false]\$\%
- infLex?: (%, %, (V, V) -> Boolean, (C, C) -> Boolean) -> Boolean
infLex?(n1, n2, o1, o2)
returnstrue
iffo1(value(n1), value(n2))
orvalue(n1) = value(n2)
ando2(condition(n1), condition(n2))
.
- latex: % -> String
from SetCategory
- setCondition!: (%, C) -> %
setCondition!(n, t)
returnsn
whose condition has been replaced byt
if it is not empty, else an error is produced.
- setEmpty!: % -> %
setEmpty!(n)
replacesn
byempty()\$\%
.
- setStatus!: (%, Boolean) -> %
setStatus!(n, b)
returnsn
whose status has been replaced byb
if it is not empty, else an error is produced.
- setValue!: (%, V) -> %
setValue!(n, v)
returnsn
whose value has been replaced byv
if it is not empty, else an error is produced.
- status: % -> Boolean
status(n)
returns the status of the noden
.
- subNode?: (%, %, (C, C) -> Boolean) -> Boolean
subNode?(n1, n2, o2)
returnstrue
iffvalue(n1) = value(n2)
ando2(condition(n1), condition(n2))
- value: % -> V
value(n)
returns the value of the noden
.