diff --git a/lib/node_modules/@stdlib/boolean/ctor/test/test.js b/lib/node_modules/@stdlib/boolean/ctor/test/test.js index eec84f409112..5a2260dce9e0 100644 --- a/lib/node_modules/@stdlib/boolean/ctor/test/test.js +++ b/lib/node_modules/@stdlib/boolean/ctor/test/test.js @@ -114,7 +114,7 @@ tape( 'the function returns `true` when provided any object which is not null', values = [ new Bool( false ), new Bool( true ), - new Number( 0 ), // eslint-disable-line no-new-wrappers + new Number( 0 ), [], {}, function noop() {} @@ -157,7 +157,7 @@ tape( 'when used as a constructor, the function returns a Boolean object (truthy values = [ new Bool( false ), new Bool( true ), - new Number( 0 ), // eslint-disable-line no-new-wrappers + new Number( 0 ), '5', 5, -5, diff --git a/lib/node_modules/@stdlib/nlp/lda/lib/matrix.js b/lib/node_modules/@stdlib/nlp/lda/lib/matrix.js index e21eaa9fc35d..6419521ced03 100644 --- a/lib/node_modules/@stdlib/nlp/lda/lib/matrix.js +++ b/lib/node_modules/@stdlib/nlp/lda/lib/matrix.js @@ -25,6 +25,41 @@ var Float64Array = require( '@stdlib/array/float64' ); var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +// FUNCTIONS // + +/** +* Returns a matrix element based on the provided row and column indices. +* +* @private +* @param {integer} i - row index +* @param {integer} j - column index +* @returns {(number|undefined)} matrix element +*/ +function get( i, j ) { + /* eslint-disable no-invalid-this */ + var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] ); + return this.data[ idx ]; +} + +/** +* Sets a matrix element based on the provided row and column indices. +* +* @private +* @param {integer} i - row index +* @param {integer} j - column index +* @param {number} v - value to set +* @returns {Matrix} Matrix instance +*/ +function set( i, j, v ) { + /* eslint-disable no-invalid-this */ + i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] ); + if ( i >= 0 ) { + this.data[ i ] = v; + } + return this; +} + + // MAIN // /** @@ -79,38 +114,6 @@ function matrix() { setReadOnly( mat, 'get', get ); setReadOnly( mat, 'set', set ); return mat; - - /** - * Returns a matrix element based on the provided row and column indices. - * - * @private - * @param {integer} i - row index - * @param {integer} j - column index - * @returns {(number|undefined)} matrix element - */ - function get( i, j ) { - /* eslint-disable no-invalid-this */ - var idx = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] ); - return this.data[ idx ]; - } - - /** - * Sets a matrix element based on the provided row and column indices. - * - * @private - * @param {integer} i - row index - * @param {integer} j - column index - * @param {number} v - value to set - * @returns {Matrix} Matrix instance - */ - function set( i, j, v ) { - /* eslint-disable no-invalid-this */ - i = this.offset + ( i*this.strides[0] ) + ( j*this.strides[1] ); - if ( i >= 0 ) { - this.data[ i ] = v; - } - return this; - } }