🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

gap-system

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gap-system

Perform computations using the GAP computer algebra system

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

gap-system

Perform computations using the GAP computer algebra system from node.js.

Setup

  • Currently only supports calculating expressions created in OpenMath XML format.
  • Requires OpenMath in your GAP installation.
  • Create a workspace in GAP using:
gap> LoadPackage("openmath");
gap> SaveWorkspace("workspace");
true
gap>

Usage

Initialize:

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

Calculate:

var xml = "<OMOBJ xmlns='http://www.openmath.org/OpenMath' version='2.0' cdbase='http://\www.openmath.org/cd'> <OMA> <OMS cd='arith1' name='plus'/> <OMI>3</OMI> <OMI>4</OMI> </OMA> </OMOBJ>";

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

FAQs

Package last updated on 17 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts