Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vladikoff/node-gap-system

Perform computations using the GAP computer algebra system
https://github.com/vladikoff/node-gap-system

Last synced: 14 days ago
JSON representation

Perform computations using the GAP computer algebra system

Awesome Lists containing this project

README

        

# gap-system

Perform computations using the [GAP](http://www.gap-system.org/) computer algebra system from node.js.

## Setup

* Currently only supports calculating expressions created in [OpenMath](http://www.openmath.org/) XML format.
* Requires [OpenMath](http://www.gap-system.org/Packages/openmath.html) in your GAP installation.
* Create a workspace in GAP using:

```
gap> LoadPackage("openmath");
gap> SaveWorkspace("workspace");
true
```

## Usage

Initialize:

```
var gap = require('gap-system')({
path: GAP_PATH,
workspace: 'workspace'
});
```

Calculate:

```
var xml = " 3 4 ";

gap.calculate(xml, function(err, resp) {
var result = resp;
});
```

### Options

#### path
Type: `String` - [Optional]
Default: 'gap'

Path to your GAP installation.
You can also use `GAP_PATH`.

#### workspace
Type: `String` - [Required]

Path to your GAP workspace.

## Development

Running tests:

```
npm test
```

or custom path:

```
GAP_PATH=[path]/gap/gap npm test
```