Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

var bench = require( '@stdlib/bench' );
var Number = require( '@stdlib/number/ctor' );
var isBoolean = require( '@stdlib/assert/is-boolean' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var string2buffer = require( '@stdlib/buffer/from-string' );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
var pkg = require( './../package.json' ).name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
/**
* Determines if a buffer length is compatible with a provided shape array.
*/
int8_t stdlib_ndarray_is_buffer_length_compatible_shape( int64_t len, int64_t ndims, int64_t *shape );
int8_t stdlib_ndarray_is_buffer_length_compatible_shape( const int64_t len, const int64_t ndims, const int64_t *shape );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* int8_t b = stdlib_ndarray_is_buffer_length_compatible_shape( 10, ndims, shape );
* // returns 0
*/
int8_t stdlib_ndarray_is_buffer_length_compatible_shape( int64_t len, int64_t ndims, int64_t *shape ) {
int8_t stdlib_ndarray_is_buffer_length_compatible_shape( const int64_t len, const int64_t ndims, const int64_t *shape ) {
if ( len > stdlib_ndarray_numel( ndims, shape ) ) {
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
/**
* Determines if a buffer length is compatible with provided ndarray meta data.
*/
int8_t stdlib_ndarray_is_buffer_length_compatible( enum STDLIB_NDARRAY_DTYPE dtype, int64_t len, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset );
int8_t stdlib_ndarray_is_buffer_length_compatible( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t len, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* int8_t b = stdlib_ndarray_is_buffer_length_compatible( STDLIB_NDARRAY_UINT8, 10, ndims, shape, strides, offset );
* // returns 0
*/
int8_t stdlib_ndarray_is_buffer_length_compatible( enum STDLIB_NDARRAY_DTYPE dtype, int64_t len, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset ) {
int8_t stdlib_ndarray_is_buffer_length_compatible( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t len, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset ) {
int64_t tmp[ 2 ];
int64_t nbytes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
/**
* Determines if an array is column-major contiguous.
*/
int8_t stdlib_ndarray_is_column_major_contiguous( enum STDLIB_NDARRAY_DTYPE dtype, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset );
int8_t stdlib_ndarray_is_column_major_contiguous( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* int8_t b = stdlib_ndarray_is_column_major_contiguous( STDLIB_NDARRAY_UINT8, ndims, shape, strides, offset );
* // returns 1
*/
int8_t stdlib_ndarray_is_column_major_contiguous( enum STDLIB_NDARRAY_DTYPE dtype, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset ) {
int8_t stdlib_ndarray_is_column_major_contiguous( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset ) {
if (
stdlib_ndarray_iteration_order( ndims, strides ) != 0 &&
stdlib_ndarray_is_column_major( ndims, strides ) != 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var bool = ( w === out );

## Notes

- For accurate results, the input value should be an integer in the range \[`0`, `2^53-1`\].
- For accurate results, the input value should be an integer in the range \[`0`, `2^53-1`].

</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var randint32 = require( './rand_int32.js' );
* - Herzog, T.N., and G. Lord. 2002. _Applications of Monte Carlo Methods to Finance and Insurance_. ACTEX Publications. [https://books.google.com/books?id=vC7I\\\_gdX-A0C](https://books.google.com/books?id=vC7I\_gdX-A0C).
* - Press, William H., Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 1992. _Numerical Recipes in C: The Art of Scientific Computing, Second Edition_. Cambridge University Press.
*
* @function minstd
* @name minstd
* @type {PRNG}
* @returns {PositiveInteger} pseudorandom integer
*
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/random/base/minstd/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var randint32 = require( './rand_int32.js' );
* - Park, S. K., and K. W. Miller. 1988. "Random Number Generators: Good Ones Are Hard to Find." _Communications of the ACM_ 31 (10). New York, NY, USA: ACM: 1192–1201. doi:[10.1145/63039.63042](http://dx.doi.org/10.1145/63039.63042).
* - Press, William H., Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 1992. _Numerical Recipes in C: The Art of Scientific Computing, Second Edition_. Cambridge University Press.
*
* @function minstd
* @name minstd
* @type {PRNG}
* @returns {PositiveInteger} pseudorandom integer
*
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/random/base/mt19937/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var randuint32 = require( './rand_uint32.js' );
*
* [@matsumoto:1998a]: https://doi.org/10.1145/272991.272995
*
* @function mt19937
* @name mt19937
* @type {PRNG}
* @returns {PositiveInteger} pseudorandom integer
*
Expand Down