SetOfMIntegersInOneToN(m, n)

lodof.spad line 1 [edit on github]

SetOfMIntegersInOneToN implements the subsets of M integers in the interval [1..n]

= : (%, %) -> Boolean
from BasicType
coerce : % -> OutputForm
from CoercibleTo(OutputForm)
convert : % -> InputForm
from ConvertibleTo(InputForm)
delta : (%, PositiveInteger, PositiveInteger) -> NonNegativeInteger

delta(S, k, p) returns the number of elements of S which are strictly between p and the k^th element of S.

elements : % -> List(PositiveInteger)

elements(S) returns the list of the elements of S in increasing order.

enumerate : () -> List(%)
from Finite
enumerate : () -> Vector(%)

enumerate() returns a vector of all the sets of M integers in 1..n.

hash : % -> SingleInteger
from Hashable
hashUpdate! : (HashState, %) -> HashState
from Hashable
incrementKthElement : (%, PositiveInteger) -> Union(%, "failed")

incrementKthElement(S, k) increments the k^th element of S, and returns "failed" if the result is not a set of M integers in 1..n any more.

index : PositiveInteger -> %
from Finite
latex : % -> String
from SetCategory
lookup : % -> PositiveInteger
from Finite
member? : (PositiveInteger, %) -> Boolean

member?(p, s) returns true is p is in s, false otherwise.

random : () -> %
from Finite
replaceKthElement : (%, PositiveInteger, PositiveInteger) -> Union(%, "failed")

replaceKthElement(S, k, p) replaces the k^th element of S by p, and returns "failed" if the result is not a set of M integers in 1..n any more.

setOfMinN : List(PositiveInteger) -> %

setOfMinN([a_1, ..., a_m]) returns the set a_1, ..., a_m. Error if a_1, ..., a_m is not a set of M integers in 1..n.

size : () -> NonNegativeInteger
from Finite
smaller? : (%, %) -> Boolean
from Comparable
~= : (%, %) -> Boolean
from BasicType

Finite

Hashable

CoercibleTo(OutputForm)

Comparable

ConvertibleTo(InputForm)

SetCategory

BasicType