1- Steps to compile the extensions
2- ===============================
1+ ## SymEngine Ruby Wrappers
2+
3+ Ruby wrappers gem for SymEngine, a fast symbolic manipulation library, written in C++. https://github.com/sympy/symengine
4+
5+ ### Installation
6+
7+ #### Prerequisites
8+
9+ - C++ compiler - See supported [ compilers] ( https://github.com/sympy/symengine/wiki/Compiler-Support )
10+
11+ - CMake - with executable folder in the ` PATH ` variable
12+
13+ - libsymengine - See build [ instructions] ( https://github.com/sympy/symengine/wiki/Building-SymEngine )
14+
15+ #### Installing
16+
17+ - Simply do,
18+
19+ gem install symengine
20+
21+ - If ` libsymengine ` is not found, you can give the installation directory or build directory by doing,
22+
23+ gem install symengine -- -DSymEngine_DIR=/path/to/symengine/root
24+
25+ ### Development
326* Install bundler by ` gem install bundler `
4- * Change directory to src/ruby, ` cd symengine/ruby `
527* Execute ` bundle install ` this will install the gems required
6- * Change to root directory, ` cd ../.. `
7- * Build symengine with Ruby by adding the flag, ` cmake -DWITH_RUBY=yes . `
8- * Then cd to symengine/ruby again, ` cd symengine/ruby `
928* Build the gem, ` gem build symengine.gemspec `
10- * Install the gem, ` gem install symengine-0.0.0.pre. gem `
29+ * Install the gem, ` gem install symengine-0.0.0.gem `
1130
12- Using the extensions
13- ====================
31+ ### Using the extensions
1432SymEngine is a module in the extensions, and the classes are a part of it. So
1533first you fire up the interpreter and load the file
1634``` ruby
@@ -32,6 +50,6 @@ Go ahead and try a function
3250```
3351or create a variable
3452``` ruby
35- 2.2 .0 :003 > basic = SymEngine ::Basic .new
36- => # <SymEngine::Basic:0x000000027075b8 >
53+ 2.2 .0 :003 > basic = SymEngine ::Symbol .new ( " x " )
54+ => # <SymEngine::Symbol:0x0000000274d608 >
3755```
0 commit comments