StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
StackGenVis/frontend/node_modules/rat-vec/test/recip.js

26 lines
564 B

4 years ago
var test = require('tape');
var recip = require('../recip')
var cmp = require('../cmp')
var rv = require('../index');
test('recip of 1/2 is 2', function(t) {
var a = rv([1/2])
var b = rv([2]);
t.deepEqual(cmp(recip(a), b), [0], 'same');
t.end();
});
test('recip of 2 is 1/2', function(t) {
var a = rv([2])
var b = rv([1/2]);
t.deepEqual(cmp(recip(a), b), [0], 'same');
t.end();
});
test('recip of [1/2, 2] is [2, 1/2]', function(t) {
var a = rv([1/2, 2])
var b = rv([2, 1/2]);
t.deepEqual(cmp(recip(a), b), [0, 0], 'same');
t.end();
});