 
            Can i use the mpz_class instead of mpf_class for an arbitrary integer precision ?
On Fri, May 4, 2012 at 5:25 PM, Ezio Bartocci ezio.bartocci@gmail.com wrote:
so for integral you mean integers ? So it mean that accept only rational number in the set of Q ?
On Thu, May 3, 2012 at 11:10 PM, Enea Zaffanella zaffanella@cs.unipr.it wrote:
On 05/03/2012 06:13 PM, Ezio Bartocci wrote:
Dear PPL developers,
I forward the message that I sent to Roberto. Since he is traveling, maybe some of you can help us...
Thanks a lot
Best Regards
Ezio
Hello Ezio.
I suspect the main problem is in the right hand side of the line:
lin_exp[j]+=single_point[m]*(*it);
Here single_point[m] has type mpf_class. However, the PPL only supports *integral* coefficients.
When a generator has non-integral coordinates, it can be expressed using integral coefficients and providing a common divisor.
For instance, if you need to specify a point in 3d having coordinates (1.5, 0.5, 2.5) you can express it as (3, 1, 5) / 2
In C++, something like the following:
Variable A(0); Variable B(1); Variable C(2); Linear_Expression le = 3*A + B + 5*C; ph.add_generator(point(le, 2));
where the second argument to `point' is the divisor (that gets applied to all the coefficients of `le').
Hope this helps.
Regards, Enea.
-- Dr. Ezio Bartocci, Assistant Professor Dependable Systems Group Department of Computer Engineering Faculty of informatics TU Wien, Vienna University of Technology, Austria Treitlstraße 3, 1040 Vienna, Austria E-Mail: ezio.bartocci@tuwien.ac.at Phone: +43 (1) 58801 - 18210 Webiste: http://www.eziobartocci.com