UNPKG

susyweb

Version:

Sophon JavaScript API, middleware to talk to a sophon node over RPC

33 lines (28 loc) 727 B
var f = require('./formatters'); var PolynomialType = require('./type'); /** * PolynomialTypeReal is a prootype that represents real type * It matches: * real * real[] * real[4] * real[][] * real[3][] * real[][6][], ... * real32 * real64[] * real8[4] * real256[][] * real[3][] * real64[][6][], ... */ var PolynomialTypeReal = function () { this._inputFormatter = f.formatInputReal; this._outputFormatter = f.formatOutputReal; }; PolynomialTypeReal.prototype = new PolynomialType({}); PolynomialTypeReal.prototype.constructor = PolynomialTypeReal; PolynomialTypeReal.prototype.isType = function (name) { return !!name.match(/real([0-9]*)?(\[([0-9]*)\])?/); }; module.exports = PolynomialTypeReal;