Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers.
- Date: Fri, 24 Mar 2017 10:28:34 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:O4fA9xJV3mX6rHAACdmcpTZWNBhigK39O0sv0rFitYgeL/nxwZ3uMQTl6Ol3ixeRBMOAuq4C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwpFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhjoZOT438G/Xjc9+gqxVrx2upRNw34HabZqJNPd8ZK7RYc8WSGRBU8tXSidPApm8b4wKD+cZM+pWspfyqEAUohulGQmsBf3gyjlVjXHw2q06yeUhEQba3Ac9G94AsWrbrNLwNKgMTeC11qnJwzXZYPxKxTf975LIcxAkrf2CQLl9dtHRyU0oFwPfj1WQrpDlMymQ1uQJqGWb4O9gWviui24jsQ1+vj+vxsI1h4TPm4kbxFfE9SBjz4Y0I921UEh7bsS/H5RLsyGVKZF6Td8lQ2Ftvisx174IuYajcSQU1JgqwwTTZv+HfoSS/x7vSuWcLS1liH9mZb6znxS//Eu6xuHiWcS50UxGojdBn9TCrHwA1Rze586aQfVn5EihwyyA1wXL5+FEP080ka3bJoYkwrEql5oTtV3PHyHsmEnqlaOWeFgo9+u15+j9bbXmoZicN4Bwig7gKKghhsu/AeEgPggPWWiU5/i82aX98UHlRLhGlP47n6nDvJzHO8gWpbS1DxJW34o+8xq/Ci2p0NUcnXkJNlJFfxeHgpDyO1HKJ/D4F/a/g1OwkDtxwvDGOqbsAprILnfZkbfheaxx5FJbyAo21dxf/Y5bCqkdIPLvXU/8rMDXDhAjPAyw2uroFdR91pgCVmKSGa+ZK7jfsUSI5+IqO+mDfpUZuDf7K/g/5v7hl2U1mVEHffrh4ZxCY3+xGrFqIl6SfGH3qtYHC2YD+AQkH8Lwj1jXGwVebX+pQ6Mx4HkfD5inCpuLBq+gh7mMwD2qMJRdemdcGxHGWSPzc4KeWvAQLieWCsBkmz0AE7OmTtlyhlmVqAbmxu8/faLv8SoCuMe72Q==
- Organization: GeometryFactory
On 03/23/2017 03:59 PM, mauriciojz wrote:
Occasionally I have to calculate the sum of a large set of rational numbers.
The problem is that I use /Lazy_exact_nt<CGAL::Gmpq>/, which sometimes
results in a /segfault/ due to the number of stored operations. Is there a
nicer way to force the lazy number type to dump these stored operations
besides calling a ".exact()" every now and then? Is it more interesting to
just use /CGAL::Gmpq/ while performing the sum and then construct its lazy
version in the end?
It depends what you want to do. What do you want to do with your some of rational. If at the end you need the exact value, then you should
definitely directly use Gmpq. Each operation with Lazy_exact_nt is
constructing a node in the dag. Calling exact() is the only way to
reduce the size of the dag. We can think of a more elaborate strategy
but again it depends on what your needs.
Sebastien.
Thank you.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Summing-a-large-set-of-Lazy-exact-nt-CGAL-Gmpq-numbers-tp4662600.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., mauriciojz, 03/23/2017
- Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., Sebastien Loriot (GeometryFactory), 03/24/2017
- Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., mauriciojz, 03/25/2017
- Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., Marc Glisse, 03/26/2017
- Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., mauriciojz, 03/25/2017
- Re: [cgal-discuss] Summing a large set of Lazy_exact_nt<CGAL::Gmpq> numbers., Sebastien Loriot (GeometryFactory), 03/24/2017
Archive powered by MHonArc 2.6.18.