Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LEDA is unavailable #1

Open
kannoneer opened this issue Nov 26, 2022 · 6 comments
Open

LEDA is unavailable #1

kannoneer opened this issue Nov 26, 2022 · 6 comments

Comments

@kannoneer
Copy link
Contributor

kannoneer commented Nov 26, 2022

First of all, thanks for sharing this amazing piece of software. But I'm having problems compiling with exact arithmetic support because LEDA library is not available anymore.

The website at http://www.algorithmic-solutions.info/free/d5.php says

LEDA FREE EDITION IS NO LONGER DISTRIBUTED!

Is there any workaround for this? I can build and run the demo without exact arithmetic support though.

@JensRestemeier
Copy link

Just wondering, did you find a solution to this? The only thing used from LEDA is the leda_real type, and I'm looking at an alternative exact math library - so far without much success, though. (The problem could be my integration code, though, not the library.)

@dhaumont
Copy link
Owner

@JensRestemeier @kannoneer I did not try to replace using an exact library, a good starting point could be to check what they use for CGAL (https://www.cgal.org/)
Another option would be to use Boost, in which some support for exact aritmetic has been added recently, but again I have no experience with it

@JensRestemeier
Copy link

I experimented with RealExpr https://cs.nyu.edu/exact/realexpr/Expr.html - this version crashes with a stack overflow, and with a rewrite of RealExpr in "Core 2" https://cs.nyu.edu/exact/, which is far too slow.
A quick integration of GMP's (https://gmplib.org/) Float and Rational types didn't provide much improvement.

I was wondering, how efficient/effective were calculations with the leda_real type? I was going to experiment with a few more exact or arbitrary precision libraries, though it would be useful to know what the most promising direction is.

Also, would it make sense to select a separate datatype for the initial polytope, and for the for CSG operation?

@JensRestemeier
Copy link

I added support for GNU mpfr (https://www.mpfr.org/) which seems to improve things a bit, though I still need to verify the case where no CSG operation seems to take place.
I submitted my WIP to https://github.com/JensRestemeier/visilib . It is not in a shape for a pull request, but you can look at what I'm doing. I definitely need to fix up the CMake file, so far I'm just updating the visual studio solution.

New dependencies are MPFR, GMP (https://gmplib.org/) and DearIMGUI ( https://github.com/ocornut/imgui )

@dhaumont
Copy link
Owner

dhaumont commented Jun 2, 2024

@JensRestemeier Thanks for your interest in visilib. I was wondering if it would be possible to integrate your support for mpfr and GMP into the main branch of visilib. Do you plan to create a pull request for it?
Otherwise, would you mind if I merge your implementation myself into the develop branch?

About you non recursive solve function implementation, does it help? I made the assumption in the past that at a level of recursion > 200, the algorithm was loosing himself in an infinite recursive loop, and that a stack less approach would lead to the same result...

@JensRestemeier
Copy link

You're welcome to integrate the mpfr and gmp changes.

The non-recursive function does seem to help, though it still doesn't seem to scale as well as I hoped. I was going to investigate the silhouette code, but I'm busy with other things for the moment.

I was going to create a pull request once I've got everything working. You're welcome to take any code you find useful, though I would avoid the non-recursive function for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants