QEtaWeightedDomain FΒΆ

qetamultisamba.spad line 189 [edit on github]

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 that grdst is a list of positive numbers.

forgetWeight: % -> F

forgetWeight(x) forgets the weight attached to an element f and simply returns f. 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).