JAVA MathSET API

K

Kai

Hello all,

I want to implement a mathematical set of strings using the JAVA API MathSET.
Is there anything you can suggest for this implementation.

Thanks
 
J

Jeff Higgins

Hello all,

I want to implement a mathematical set of strings using the JAVA API MathSET.
Is there anything you can suggest for this implementation.

Thanks
public class MathSetImpl {
public static void main(String[] args) {
MathSet<String> mathematicalSetOfStrings = new MathSet<String>();
}
}
 
J

Jeff Higgins

What do you mean by 'a mathematical set of strings' - a set of strings
containing mathematical expressions that can be evaluated once values
have been supplied for all variables?

If so, I think something like Coco/R or Yacc/M may come in quite useful...
I think he means a Set implementation with union, intersection,
complement, product, etc. It's somewhat surprising how many
x.x.x.MathSet implementations turn up on Google.
 
S

Stefan Ram

Kai said:
I want to implement a mathematical set

What is the difference between a mathematical set and a set?

What would be »an implementation of the Cantor set«?

Can you write test that such an implementation has to pass?
of strings using the JAVA API MathSET.

The usual meaning of »set of strings« in Java would be

(( java.util.Set< java.lang.String >)
new java.util.HashSet< java.lang.String >() )
 
E

Eric Sosman

What is the difference between a mathematical set and a set?

What would be »an implementation of the Cantor set«?

I've written a class that implements it, but the constructor
seems to be taking quite a long time.

;-)
 
L

Lew

Jeff said:

Set<Foo> universal = new HashSet<>();
....
Set<Foo> example = ...
Set said:
product, etc. It's somewhat surprising how many

Produce a Set said:
x.x.x.MathSet implementations turn up on Goo'gle.

So, basically, there's nothing to do except implement a "universal" set and a
'product(Set<Foo> x,y -> Set<Foo,Foo>)' (loose syntax here).
 
Q

Qu0ll

"Lew" wrote in message
Produce a Set<Foo, Foo> from two sets via an algorithm of your own devise.

What is this Set<Foo, Foo> you speak of?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]
 
K

Kai

Hello all,



I want to implement a mathematical set of strings using the JAVA API MathSET.

Is there anything you can suggest for this implementation.



Thanks

I meant the type of set where we have union, intersection, etc.. I need to implement it using "mathSET API". Hashing also will be involved. Anyone can help for the implementation please?
 
E

Eric Sosman

I meant the type of set where we have union, intersection, etc.. I need to implement it using "mathSET API". Hashing also will be involved. Anyone can help for the implementation please?

What's your difficulty?

If by "JAVA API MathSET" you mean the class documented at
<http://math-it.org/java/docs/org/mathIT/algebra/MathSet.html>,
it looks like everything you ask is already done: Just grab the
class and start using it.

If by "JAVA API MathSET" you mean some other class, tell us
what other class you mean and where we can find out about it.

... besides which, the included-with-Java classes that
implement the java.util.Set interface already provide union and
intersection via the addAll() and retainAll() methods, respectively.

So, again: What problems are you having?
 
K

Kai

What's your difficulty?



If by "JAVA API MathSET" you mean the class documented at

<http://math-it.org/java/docs/org/mathIT/algebra/MathSet.html>,

it looks like everything you ask is already done: Just grab the

class and start using it.



If by "JAVA API MathSET" you mean some other class, tell us

what other class you mean and where we can find out about it.



... besides which, the included-with-Java classes that

implement the java.util.Set interface already provide union and

intersection via the addAll() and retainAll() methods, respectively.



So, again: What problems are you having?



--

Eric Sosman

(e-mail address removed)

You really helped, thanks. I'm starting having ideas on it now. But, frankly, I am kind of new to these types of data structures and don't know how touse the documentation(still learning stage), like the link you sent. I need a small example on how to implement using the documentation, e.g for the superset or subset. Then I'll be able to complete the remaining methods. :/

Thanks again
 
E

Eric Sosman

You really helped, thanks. I'm starting having ideas on it now. But, frankly, I am kind of new to these types of data structures and don't know how to use the documentation(still learning stage), like the link you sent. I need a small example on how to implement using the documentation, e.g for the superset or subset. Then I'll be able to complete the remaining methods. :/

You *still* haven't described what you're trying to do! What
do you mean by "the superset," for example? You probably don't
want to enumerate all supersets of a given set, which would require
infinite time. If you're trying to test whether set S1 is a superset
of set S2, just find their intersection and compare its size to S2's.

Also, you *still* haven't explained what kind of difficulty you
are having! The documentation for the Set interface and for the
MathSet class seem clear enough; what can I add to what they've
already told you?

(Surmise: Kai, do you know how to write Java? If you're just
starting to learn the language, a "small example" isn't going to
be a whole lot of help ...)
 
K

Kai

You *still* haven't described what you're trying to do! What

do you mean by "the superset," for example? You probably don't

want to enumerate all supersets of a given set, which would require

infinite time. If you're trying to test whether set S1 is a superset

of set S2, just find their intersection and compare its size to S2's.



Also, you *still* haven't explained what kind of difficulty you

are having! The documentation for the Set interface and for the

MathSet class seem clear enough; what can I add to what they've

already told you?



(Surmise: Kai, do you know how to write Java? If you're just

starting to learn the language, a "small example" isn't going to

be a whole lot of help ...)



--

Eric Sosman

(e-mail address removed)

Yes, sorry for not able to express myself well. I meant to do this type of subset implementation, as you mentioned above. My issue is that I need to know how to represent an implementation of the given set interface.
I've studied OOP in java, I'm new to structures. I think you're right Eric,I should start from some basics of data structures. Is there any ref. you can suggest please?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top