Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
// MODULES //

var tape = require( 'tape' );
var abs = require( '@stdlib/math/base/special/abs' );
var EPS = require( '@stdlib/constants/float64/eps' );
var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' );
var incrnanmmse = require( './../lib' );


Expand Down Expand Up @@ -72,10 +71,8 @@
tape( 'the accumulator function computes a moving mean squared error incrementally', function test( t ) {
var expected;
var actual;
var delta;
var data;
var acc;
var tol;
var N;
var i;

Expand All @@ -93,16 +90,10 @@

acc = incrnanmmse( 3 );

expected = [ 1.0, 17.0/2.0, 26.0/3.0, 26.0/3.0, 89.0/3.0, 82.0/3.0, 82.0/3.0, 154.0/3.0 ];

Check warning on line 93 in lib/node_modules/@stdlib/stats/incr/nanmmse/test/test.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

This line has a length of 94. Maximum allowed is 80
for ( i = 0; i < N; i++ ) {
actual = acc( data[i][0], data[i][1] );
if ( actual === expected[i] ) {
t.equal( actual, expected[i], 'returns expected value' );
} else {
delta = abs( expected[i] - actual );
tol = 1.0 * EPS * abs( expected[i] );
t.equal( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected[i]+'. Delta: '+delta+'. Tol: '+tol+'.' );
}
t.strictEqual( isAlmostSameValue( actual, expected[ i ], 1 ), true, 'returns expected value' );
}
t.end();
});
Expand Down
Loading