solvelib::Union
-- union of a
system of setssolvelib::Union
(set, param, paramset)
returns the set of all objects that can be obtained by replacing, in
some element of set
, the free parameter param
by an element of paramset
.
solvelib::Union(set, param, paramset)
set |
- | set of any type |
param |
- | identifier |
paramset |
- | set of any type |
solvelib::Union
returns a set of any type; see solve
for an overview of the
different types of sets. It may also return the unevaluated call if the
union could not be computed.
set
set
may be a set of any type; it need not depend on
the parameter param
, and it may also contain other free
parameters. However, it must not use param
as a bound
parameter, e.g. Dom::ImageSet(sin(param), param, S)
(for
some set S
) .paramset
may be a set of any type and may depend on
some free parameters. See example 1.paramset
is empty, the result is the empty set.
Overloading has no effect in this case.We compute the set of all numbers that are equal to k+1 or k+3 for k=2, k=4, or k=l, where l is a free parameter.
>> solvelib::Union({k+1, k+3}, k, {2,4,l});
{3, 5, 7, l + 1, l + 3}