From a5396a491b1b308b622db3e12da734e6fb1fdb53 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Wed, 12 Oct 2011 16:22:50 +0000 Subject: * algebra/boolean.spad.pamphlet (Reference) [elt]: Remove. [setelt]: Likewise. * algebra/lodof.spad.pamphlet: Adjust use. * algebra/float.spad.pamphlet: Likewise. * algebra/divisor.spad.pamphlet: Likewise. * algebra/curve.spad.pamphlet: Likewise. * algebra/card.spad.pamphlet: Likewise. * algebra/algext.spad.pamphlet: Likewise. * algebra/op.spad.pamphlet: Likewise. * algebra/suls.spad.pamphlet: Likewise. * algebra/sups.spad.pamphlet: Likewise. * algebra/supxs.spad.pamphlet: Likewise. * algebra/suts.spad.pamphlet: Likewise. * algebra/symbol.spad.pamphlet: Likewise. * algebra/view3D.spad.pamphlet: Likewise. * algebra/viewDef.spad.pamphlet: Likewise. --- src/algebra/lodof.spad.pamphlet | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/algebra/lodof.spad.pamphlet') diff --git a/src/algebra/lodof.spad.pamphlet b/src/algebra/lodof.spad.pamphlet index 8d3b8b38..d4247b25 100644 --- a/src/algebra/lodof.spad.pamphlet +++ b/src/algebra/lodof.spad.pamphlet @@ -63,8 +63,8 @@ SetOfMIntegersInOneToN(m, n): Exports == Implementation where member?(p, s) == s.bits.p enumerate() == - if empty? all() then all() := reallyEnumerate() - all() + if empty? deref all then setref(all,reallyEnumerate()) + deref all -- enumerates the sets of p integers in 1..q, returns them as sets in 1..n -- must have p <= q @@ -81,19 +81,19 @@ SetOfMIntegersInOneToN(m, n): Exports == Implementation where concat!(enum(p, q1, n), l) size() == - if zero? sz() then - sz() := binomial(n, m)$IntegerCombinatoricFunctions(Integer) :: N - sz() + if zero? deref sz then + setref(sz,binomial(n, m)$IntegerCombinatoricFunctions(Integer) :: N) + deref sz lookup s == - if empty? all() then all() := reallyEnumerate() - if zero?(s.pos) then s.pos := position(s, all()) :: N + if empty? deref all then setref(all,reallyEnumerate()) + if zero?(s.pos) then s.pos := position(s, deref all) :: N s.pos :: PI index p == p > size() => error "index: argument too large" - if empty? all() then all() := reallyEnumerate() - all().p + if empty? deref all then setref(all,reallyEnumerate()) + deref(all).p setOfMinN l == s := new(n, false)$Bits -- cgit v1.2.3