Coder Social home page Coder Social logo

tuanfeng / pymongeampere Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrgt/pymongeampere

0.0 1.0 0.0 87 KB

Python interface for a 2D optimal transport / Monge Ampère solver using Laguerre diagrams

License: GNU General Public License v3.0

C++ 48.15% CMake 9.96% Python 41.89%

pymongeampere's Introduction

PyMongeAmpere

Python interface for a 2D optimal transport / Monge Ampère solver using Laguerre diagrams

Getting started

First of all, you have to download MongeAmpere. Note that it's not necessary to compile it. Then go into the same directory as MongeAmpere and type in a terminal:

git clone https://github.com/mrgt/MongeAmpere.git
git clone https://github.com/mrgt/PyMongeAmpere.git
cd PyMongeAmpere && git submodule update --init --recursive

Dependencies

  • Eigen3
  • CImg
  • CGAL 4.11
  • Python 2.7
  • Boost-python
  • NumPy
  • Scipy
  • Matplotlib
  • Pillow (not in Homebrew, install via pip) Some help on installing them can be found here

Compiling

Once you have installed all the dependencies, building is rather straightforward. Create a out-of-source build folder and then configure (using cmake) and build :

cd /path/to/PyMongeAmpere/..
mkdir PyMongeAmpere-build && cd PyMongeAmpere-build
cmake ../PyMongeAmpere
make

NB: If you encounter problem during the building step, you can use the ccmake tool, enabling you to modify easily the paths to the dependencies and the compilation options. On OSX, linking the X11 librairies may be a problem during the compilation step, you must then check (with the toggle command in ccmake) that all the X11 related paths to include and libs are the same (something like /usr/local/... or /opt/X11/).

Examples

The directory examples/ contains several examples on how to use the PyMongeAmpere API. To check that everything works properly you can try the following command, which by default produces and displays an optimized sampling of the scipy.misc.ascent() picture:

cd examples
python /path/to/PyMongeAmpere-build/bluenoise.py

pymongeampere's People

Contributors

lesteve avatar mrgt avatar simonlegrand avatar srlegrand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.