UNPKG

@compute.ts/math

Version:

Provide math operators for the computeTS package

1 lines 1.18 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var array_1=require("@compute.ts/array"),number_1=require("@compute.ts/number"),chai_1=require("chai");require("mocha");var ComputeMathLibrary_1=require("../ComputeMathLibrary");describe("The the argMin operator",function(){it("Should be able to perform an evaluation of the argMin operator",function(){var r=ComputeMathLibrary_1.argMin([1,2,3]);chai_1.expect(r.eval()).to.equal(0)}),it("Should be able to perform an evaluation of the argMin operator (expression array)",function(){var r=number_1.number(1),e=number_1.number(2),a=number_1.number(3),a=ComputeMathLibrary_1.argMin([r,e,a]);chai_1.expect(a.eval()).to.equal(0)}),it("Should be able to perform an evaluation of the argMin operator (array of values)",function(){var r=array_1.array.ofNumber([1,2,3]),r=ComputeMathLibrary_1.argMin(r);chai_1.expect(r.eval()).to.equal(0)}),it("Should be able to perform an evaluation of the argMin operator (array of expressions)",function(){var r=number_1.number(1),e=number_1.number(2),a=number_1.number(3),a=array_1.array.ofNumber([r,e,a]),a=ComputeMathLibrary_1.argMin(a);chai_1.expect(a.eval()).to.equal(0)})});