Coder Social home page Coder Social logo

twmr / csympy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from symengine/symengine

0.0 3.0 0.0 976 KB

Fast symbolic manipulation library, written in C++

Home Page: http://sympy.org

License: Other

C++ 87.83% Python 12.02% Shell 0.05% C 0.10%

csympy's Introduction

CSymPy

Build Status

CSymPy is a standalone fast C++ symbolic manipulation library. Optional thin Python wrappers allow easy usage from Python and integration with SymPy.

License

All files are licensed under MIT license, see the LICENSE for more information. The src/teuchos directory is licensed under the Trilinos BSD license (see the LICENSE file).

Mailinglist, Chat

We use the SymPy mailinglist: http://groups.google.com/group/sympy

Chat (Gitter): https://gitter.im/sympy/csympy

Installation

Install prerequisites. For Debian based systems (Ubuntu etc.):

apt-get install cmake libgmp-dev

For RPM based systems (Fedora etc.):

yum install cmake gmp-devel

Install csympy:

cmake .
make

This will configure and build CSymPy in the default Release mode with all code and compiler optimizations on.

Run tests:

ctest

Python Wrappers

The optional Python wrappers can be turned on by

cmake -DWITH_PYTHON=yes .
make

Use CSymPy from Python as follows:

>>> from csympy import var
>>> var("x y z")
(x, y, z)
>>> e = (x+y+z)**2
>>> e.expand()
2x*z + x^2 + 2y*x + 2y*z + z^2 + y^2

You can read Python tests in csympy/tests to see what features are implemented. Supported versions of Python are: 2.6, 2.7, 3.2, 3.3. You need Cython >= 0.19.1 in order to compile the wrappers. CMake will report at configure time if the Cython version is too old.

Development

The Travis-CI checks the code in both Release and Debug mode with all possible checks, so just sending a GitHub pull request is enough and you can use any mode you want to develop it. However, the best way to develop CSymPy is to use the Debug mode, turn assertions on and turn BFD support on (prints very nice stacktraces on exceptions, segfaults or assert errors):

cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_CSYMPY_ASSERT=yes -DWITH_BFD=yes .

To make WITH_BFD=yes work, you need to install binutils-dev first, otherwise you will get a CMake error during configuring. For Debian based systems (Ubuntu etc.)

apt-get install binutils-dev

For RPM based systems (Fedora etc.)

yum install binutils-devel

CMake Options

Here are all the CMake options that you can use to configure the build, with their default values indicated below:

cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" \  # Installation prefix
    -DCMAKE_BUILD_TYPE:STRING="Release" \         # Type of build, one of: Debug or Release
    -DWITH_BFD:BOOL=OFF \                         # Install with BFD library (requires binutils-dev)
    -DWITH_PYTHON:BOOL=OFF \                      # Build Python wrappers
    -DWITH_CSYMPY_ASSERT:BOOL=OFF \               # Test all CSYMPY_ASSERT statements in the code
    -DWITH_CSYMPY_RCP:BOOL=ON \                   # Use our faster special implementation of RCP
    .

CMake prints the value of its options at the end of the run. If you want to use a different compiler, do:

CXX=clang cmake .

and check that CMake picked it up.

Developer Documentation

Please follow the C++ Style Guide when developing.

The design decisions are documented in Design.

csympy's People

Contributors

certik avatar chrisdembia avatar hazelnusse avatar jrioux avatar sushant-hiray avatar thilinarmtb avatar

Watchers

 avatar  avatar  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.