Skip to content
Closed
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
10 changes: 9 additions & 1 deletion lib/node_modules/@stdlib/ml/incr/kmeans/lib/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ var sqrt = require( '@stdlib/math/base/special/sqrt' );
/**
* Normalizes a vector.
*
* ## Notes
*
* - This is a temporary implementation. This function should eventually be
* replaced once the project has implemented comparable functionality as a
* standalone package (e.g., BLAS), which may avoid the naive approach
* susceptible to overflow/underflow due to summing squares and computing
* the square root.
*
* @private
* @param {NonNegativeInteger} N - number of elements
* @param {NumericArray} X - strided array
* @param {integer} strideX - stride
* @param {NonNegativeInteger} offsetX - index offset
* @returns {NumericArray} input array
*/
function normalize( N, X, strideX, offsetX ) { // TODO: eventually remove this function once project has implemented comparable functionality as a standalone package (e.g., BLAS, which may avoid the naive approach susceptible to overflow/overflow due to summing squares and computing the square root)
function normalize( N, X, strideX, offsetX ) {
var xi;
var m;
var v;
Expand Down
Loading