SplittingNode(V, C)ΒΆ

newdata.spad line 147 [edit on github]

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).

=: (%, %) -> Boolean

from BasicType

~=: (%, %) -> Boolean

from BasicType

coerce: % -> OutputForm

from CoercibleTo OutputForm

condition: % -> C

condition(n) returns the condition of the node n.

construct: (V, C) -> %

construct(v, t) returns the same as construct(v, t, false)

construct: (V, C, Boolean) -> %

construct(v, t, b) returns the non-empty node with value v, condition t and flag b

construct: (V, List C) -> List %

construct(v, lt) returns the same as [construct(v, t) for t in lt]

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 as construct(vt.val, vt.tower)

copy: % -> %

copy(n) returns a copy of n.

empty?: % -> Boolean

empty?(n) returns true iff the node n is empty()\$\%.

empty: () -> %

empty() returns the same as [empty()\$V, empty()\$C, false]\$\%

infLex?: (%, %, (V, V) -> Boolean, (C, C) -> Boolean) -> Boolean

infLex?(n1, n2, o1, o2) returns true iff o1(value(n1), value(n2)) or value(n1) = value(n2) and o2(condition(n1), condition(n2)).

latex: % -> String

from SetCategory

setCondition!: (%, C) -> %

setCondition!(n, t) returns n whose condition has been replaced by t if it is not empty, else an error is produced.

setEmpty!: % -> %

setEmpty!(n) replaces n by empty()\$\%.

setStatus!: (%, Boolean) -> %

setStatus!(n, b) returns n whose status has been replaced by b if it is not empty, else an error is produced.

setValue!: (%, V) -> %

setValue!(n, v) returns n whose value has been replaced by v if it is not empty, else an error is produced.

status: % -> Boolean

status(n) returns the status of the node n.

subNode?: (%, %, (C, C) -> Boolean) -> Boolean

subNode?(n1, n2, o2) returns true iff value(n1) = value(n2) and o2(condition(n1), condition(n2))

value: % -> V

value(n) returns the value of the node n.

BasicType

CoercibleTo OutputForm

SetCategory