
Hello,
I am writing a program that requires a huge set of C_Polyhedrons. I have tried making a set<C_Polyhedron> which g++ does not object to, but when I try to insert a C_Polyhedron into it, g++ throws an error about not being able to compare C_Polyhedrons. Is there a way to make a set of C_Polyhedrons?
If it is not possible, is it practical to make a set of strings, where the strings are the C_Polyhedron's corresponding Generator_Systems, and use that set?
Thank you so much for your help,
Jeff

On 07/28/2016 03:02 AM, Jeff Summars wrote:
I am writing a program that requires a huge set of C_Polyhedrons. I have tried making a set<C_Polyhedron> which g++ does not object to, but when I try to insert a C_Polyhedron into it, g++ throws an error about not being able to compare C_Polyhedrons. Is there a way to make a set of C_Polyhedrons?
Hi Jeff.
What are you trying to achieve? On page 26 of the manual (*) you can read about the pointset powerset domain which may or may not be what you need: we need more information about your objectives. Kind regards,
Roberto
(*) http://bugseng.com/products/ppl/documentation//ppl-user-1.2.pdf

Hi Roberto,
I am sorry I was not clear. I want to achieve fast lookup of C_Polyhedron. Searching a vector in C++ is O(N), while searching a set is O(log(N)). As far as I can tell, it doesn't seem possible to put C_Polyhedrons into a set, so I'm wondering what the recommended solution would be.
Best,
Jeff
On Thu, Jul 28, 2016 at 10:00 AM, Roberto Bagnara bagnara@cs.unipr.it wrote:
On 07/28/2016 03:02 AM, Jeff Summars wrote:
I am writing a program that requires a huge set of C_Polyhedrons. I have tried making a set<C_Polyhedron> which g++ does not object to, but when I try to insert a C_Polyhedron into it, g++ throws an error about not being able to compare C_Polyhedrons. Is there a way to make a set of C_Polyhedrons?
Hi Jeff.
What are you trying to achieve? On page 26 of the manual (*) you can read about the pointset powerset domain which may or may not be what you need: we need more information about your objectives. Kind regards,
Roberto
(*) http://bugseng.com/products/ppl/documentation//ppl-user-1.2.pdf
-- Prof. Roberto Bagnara
Applied Formal Methods Laboratory - University of Parma, Italy mailto:bagnara@cs.unipr.it BUGSENG srl - http://bugseng.com mailto:roberto.bagnara@bugseng.com _______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel

On 07/29/2016 03:47 PM, Jeff Summars wrote:
I am sorry I was not clear. I want to achieve fast lookup of C_Polyhedron. Searching a vector in C++ is O(N), while searching a set is O(log(N)). As far as I can tell, it doesn't seem possible to put C_Polyhedrons into a set, so I'm wondering what the recommended solution would be.
Hi Jeff.
std::set is an associative container and requires a comparison function. Which comparison function are you using? Can you please post your code here, say what you obtain and what you would expect to obtain? Kind regards,
Roberto
On Thu, Jul 28, 2016 at 10:00 AM, Roberto Bagnara <bagnara@cs.unipr.it mailto:bagnara@cs.unipr.it> wrote:
On 07/28/2016 03:02 AM, Jeff Summars wrote: > I am writing a program that requires a huge set of C_Polyhedrons. I > have tried making a set<C_Polyhedron> which g++ does not object to, > but when I try to insert a C_Polyhedron into it, g++ throws an error > about not being able to compare C_Polyhedrons. Is there a way to > make a set of C_Polyhedrons? Hi Jeff. What are you trying to achieve? On page 26 of the manual (*) you can read about the pointset powerset domain which may or may not be what you need: we need more information about your objectives. Kind regards, Roberto (*) http://bugseng.com/products/ppl/documentation//ppl-user-1.2.pdf -- Prof. Roberto Bagnara Applied Formal Methods Laboratory - University of Parma, Italy mailto:bagnara@cs.unipr.it <mailto:bagnara@cs.unipr.it> BUGSENG srl - http://bugseng.com mailto:roberto.bagnara@bugseng.com <mailto:roberto.bagnara@bugseng.com> _______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it <mailto:PPL-devel@cs.unipr.it> http://www.cs.unipr.it/mailman/listinfo/ppl-devel
PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel
participants (2)
-
Jeff Summars
-
Roberto Bagnara