>thanks. i'm not quite sure, but is it possible to define for
>example all natural numbers easily with enumset/set?!
>> thanks. i'm not quite sure, but is it possible to define for
>> example all natural numbers easily with enumset/set?!
[quoted text clipped - 26 lines]
> of our whole universe. This also holds for storages of sets of
> mathematical integers.
While the statement is true, the representation of infinite sets can be
accomplished in finite space. You only need to abstract the behavior of
such a set.
For instance, setOfPrimes.intersect(setOfEvenNumbers) would be equal to
the set that contains "2".
While, I wouldn't want to write the implementation of those objects, it
is a feasible undertaking if you add appropriate restrictions on the
number of different types of sets you could do.
Also, if you can create a formula to iterate or calculate certain
properties of the set, then you needn't represent all the values in the set.
in setOfEvenNumbers:
public boolean contains(Integer o) {
return o.intValue() % 2 == 0;
}
You might build an abstract interface to mathematical sets that is
different than the Java "Set" interface, as generally in Mathematics,
you specify rules, conditions, relationships, etc. for inclusion in a
set, rather than adding individual elements. Java Collections are very
specifically designed to "hold" collections of Java Objects, not
mathematical abstractions.
There may or may not be such a library already created. I would google
for it before discounting the possibility.
Good luck,
Daniel.

Signature
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
Stefan Ram - 10 Nov 2007 18:52 GMT
>you specify rules, conditions, relationships, etc. for inclusion in a
This is also known as »symbolic mathematics«
in contrast to »numerical mathematics«.
>There may or may not be such a library already created.
>I would google for it before discounting the possibility.
Or even use an old-fashioned catalogue, such as:
http://www.google.com/Top/Science/Math/Software/
(Including some Java software or libraries.)