Next: , Up: The Integer Set Library   [Index]


13.7.1 Integer Set Functions

m_blend

mint m_blend(mint m, mint n, mint o);

is m, merges the intersection of n and o into m (adds the content in both n and o to m)

m_clear

mint m_clear(mint m);

is m, empties the m integer set

m_copy

mint m_copy(mint m, mint n);

is m, empties the m integer set and copies the content of the n integer set in m

m_delete

mint m_delete(mint m, integer k);

is m, removes k from the m integer set

m_erase

mint m_erase(mint m, integer p, integer q);

is m, removes the p to q range from the m integer set. If q is less than p, the p to end and start to q ranges are removed.

m_fit

mint m_fit(mint m, ...);

is m, inserts data of the values described by the function optional arguments in the m integer set. It faults if one of the values is already present in the set.

m_fix

void m_fix(mint m, integer k);

inserts k in the m integer set, if m has not k already

m_key

integer m_key(mint m, integer k);

is non zero if the m integer set has k

m_merge

mint m_merge(mint m, mint n);

is m, merges n into m (adds the content of n not already in m to m, clears n)

m_new

void m_new(mint &m);

sets the m integer set as a new integer set (same as ‘m_clear’ if m is not linked multiple times, otherwise creates a new integer set and sets m as a reference to the new integer set)

m_put

void m_put(mint m, integer k);

inserts k in the m integer set (faults if k already in m)

m_resign

mint m_resign(mint m, integer k);

is m, deletes k from the m integer set if m has k, does nothing otherwise

m_set

mint m_set(mint &m, mint n);

is n, sets the m integer set as a reference of the n integer set

m_size

integer m_size(mint m);

is the size (i.e. number of values) of the m integer set

m_swap

mint m_swap(mint m, mint n);

is m, exchanges the content of the m and n indexes.


Next: Integer Set Search Functions, Up: The Integer Set Library   [Index]