QEtaComputationCategory(F, AB)

qetasamba.spad line 219 [edit on github]

QEtaComputationCategory(F, AB) provides the functions necessary for the internal functioning of basis elements and critical elements. This category is an abstraction of the functionality to implement variants of the samba algorithm from an article of Ralf Hemmecke “Dancing Samba with Ramanujan Partition Congruences” (Journal of Symbolic Computation). doi:10.1016/j.jsc.2017.02.001 http://www.risc.jku.at/publications/download/risc_5338/DancingSambaRamanujan.pdf

algebraBasis: % -> AB

algebraBasis(x) returns the structure from x that holds the algebra basis.

coerce: % -> OutputForm

from CoercibleTo OutputForm

criticalElements?: % -> Boolean

criticalElements?(x) returns true if x represents a structure that still contains critical elements.

extractNext!: % -> F

extractNext!(x) chooses one of the critical elements and returns it. At the same time this critical element is (destructively) removed from the structure of critical elements. extractNext!(x) can only be called if criticalElements?(x) returns true. This function implements a selection strategy.

initialize: List F -> %

initialize(bas) creates a new structure ready to be processed. Assume that the first element of bas has positive qetaGrade.

noTrace: % -> Void

noTrace(x) just returns x without any side effect.

oneStep!: % -> %

oneStep!(x) computes oneStepComputation!(x, extractNext!).

oneStepComputation!: (%, % -> F) -> %

oneStepComputation!(x, next!) computes one step of the computation. It uses the function next! to extract and destructively remove the the next element that is to be considered in the computation. Then it reduces it and updates the basis and the critical elements if the reduction did not end with 0. It should hold criticalElements?(x), otherwise the result is undefined.

oneTracedStep!: (% -> Void, (F, AB) -> Void, F -> Void, F -> Void) -> % -> %

oneTracedStep!(trace, trEnter, trLoop, trReturn)(x) computes oneTracedStepComputation!(trace, trEnter, trLoop, trReturn)(x, extractNext!).

oneTracedStepComputation!: (% -> Void, (F, AB) -> Void, F -> Void, F -> Void) -> (%, % -> F) -> %

oneTracedStepComputation!(x, trace, traceEnter, traceLoop, traceReturn)(x) behaves like oneStepComputation!(x, next!) except that trace(x) is called at the beginning of the function and tracedReduce(traceEnter, traceLoop, traceReturn) is used instead of the ordinary reduce function.

postProcess!: % -> %

postProcess!(x) postprocesses the result. It might interreduce the basis or do other kinds of cleanup.

trace: NonNegativeInteger -> % -> Void

trace(n)(x) returns x and depending on the value of n returns more and more information. Where a higer version of n means more information. trace(0) is equivalent with noTrace.

CoercibleTo OutputForm