QEtaWeightedDomain FΒΆ
qetamultisamba.spad line 189 [edit on github]
F: with
QEtaWeightDomain(F
) package that helps with managing elements that have a weight attached.
- addWeight: (F, List Integer) -> %
addWeight(f,grdst)
assumes that #qetaGrades(f
)=#grdst and thatgrdst
is a list of positive numbers.
- forgetWeight: % -> F
forgetWeight(x)
forgets the weight attached to an elementf
and simply returnsf
. We have forgetWeight(addWeight(f
,grdst))=f
.
- lessWeight?: (%, %) -> Boolean
less(
x
,y
) returns lessLex?(weight(x
),weight(y
)) from QEtaMultiWeightSorting(F
)
- weight: % -> List Record(fquot: Fraction Integer, fcomponent: NonNegativeInteger)
weight(x)
returns the weight that is added during addWeight(f
,grsdt).