Skip to content

Commit 93da973

Browse files
committed
Update namespace
1 parent 07d1081 commit 93da973

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

  • lib/node_modules/@stdlib

lib/node_modules/@stdlib/namespace/lib/namespace/i.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3851,6 +3851,18 @@ ns.push({
38513851
]
38523852
});
38533853

3854+
ns.push({
3855+
'alias': 'iterAdvance',
3856+
'path': '@stdlib/iter/advance',
3857+
'value': require( '@stdlib/iter/advance' ),
3858+
'type': 'Function',
3859+
'related': [
3860+
'@stdlib/iter/head',
3861+
'@stdlib/iter/slice',
3862+
'@stdlib/iter/tail'
3863+
]
3864+
});
3865+
38543866
ns.push({
38553867
'alias': 'iterAny',
38563868
'path': '@stdlib/iter/any',

lib/node_modules/@stdlib/repl/code-blocks/lib/db.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,7 @@ var db = {
13721372
"isWriteOnlyProperty": "obj = { 'boop': true };\ndesc = {};\ndesc.configurable = false;\ndesc.enumerable = true;\ndesc.set = function setter( v ) { obj.boop = v; };\ndefineProperty( obj, 'beep', desc );\nbool = isWriteOnlyProperty( obj, 'boop' )\nbool = isWriteOnlyProperty( obj, 'beep' )\n",
13731373
"isWriteOnlyPropertyIn": "obj = { 'boop': true };\ndesc = {};\ndesc.configurable = false;\ndesc.enumerable = true;\ndesc.set = function setter( v ) { obj.boop = v; };\ndefineProperty( obj, 'beep', desc );\nbool = isWriteOnlyPropertyIn( obj, 'boop' )\nbool = isWriteOnlyPropertyIn( obj, 'beep' )\n",
13741374
"iterAdd": "it1 = array2iterator( [ 1.0, 2.0 ] );\nit2 = array2iterator( [ 3.0, 4.0 ] );\nit = iterAdd( it1, it2 );\nv = it.next().value\nv = it.next().value\nbool = it.next().done\n",
1375+
"iterAdvance": "arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\nit = iterAdvance( arr, 4 );\nv = it.next().value\nbool = it.next().done\n",
13751376
"iterAny": "arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\nbool = iterAny( arr )\n",
13761377
"iterAnyBy": "arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\nfunction fcn( v ) { return ( v === 1 ); };\nbool = iterAnyBy( arr, fcn )\n",
13771378
"iterator2array": "opts = { 'iter': 10 };\narr = iterator2array( random.iterators.randu( opts ) )\n",

lib/node_modules/@stdlib/repl/help/lib/db.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ var db = {
267267
"base.dists.degenerate.variance": "\nbase.dists.degenerate.variance( μ )\n Returns the variance of a degenerate distribution with constant value `μ`.\n\n Parameters\n ----------\n μ: number\n Constant value of distribution.\n\n Returns\n -------\n out: number\n Variance.\n\n Examples\n --------\n > var v = base.dists.degenerate.variance( 20.0 )\n 0.0\n > v = base.dists.degenerate.variance( -10.0 )\n 0.0\n\n",
268268
"base.dists.discreteUniform.cdf": "\nbase.dists.discreteUniform.cdf( x, a, b )\n Evaluates the cumulative distribution function (CDF) for a discrete uniform\n distribution with minimum support `a` and maximum support `b` at a value\n `x`.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n x: number\n Input value.\n\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n out: number\n Evaluated CDF.\n\n Examples\n --------\n > var y = base.dists.discreteUniform.cdf( 9.0, 0, 10 )\n ~0.909\n > y = base.dists.discreteUniform.cdf( 0.5, 0, 2 )\n ~0.333\n > y = base.dists.discreteUniform.cdf( PINF, 2, 4 )\n 1.0\n > y = base.dists.discreteUniform.cdf( NINF, 2, 4 )\n 0.0\n > y = base.dists.discreteUniform.cdf( NaN, 0, 1 )\n NaN\n > y = base.dists.discreteUniform.cdf( 0.0, NaN, 1 )\n NaN\n > y = base.dists.discreteUniform.cdf( 0.0, 0, NaN )\n NaN\n > y = base.dists.discreteUniform.cdf( 2.0, 1, 0 )\n NaN\n\n\nbase.dists.discreteUniform.cdf.factory( a, b )\n Returns a function for evaluating the cumulative distribution function (CDF)\n of a discrete uniform distribution with minimum support `a` and maximum\n support `b`.\n\n Parameters\n ----------\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n cdf: Function\n Cumulative distribution function (CDF).\n\n Examples\n --------\n > var mycdf = base.dists.discreteUniform.cdf.factory( 0, 10 );\n > var y = mycdf( 0.5 )\n ~0.091\n > y = mycdf( 8.0 )\n ~0.818\n\n",
269269
"base.dists.discreteUniform.DiscreteUniform": "\nbase.dists.discreteUniform.DiscreteUniform( [a, b] )\n Returns a discrete uniform distribution object.\n\n Parameters\n ----------\n a: integer (optional)\n Minimum support. Must be an integer smaller than `b`. Default: `0`.\n\n b: integer (optional)\n Maximum support. Must be an integer greater than `a`. Default: `1`.\n\n Returns\n -------\n discreteUniform: Object\n Distribution instance.\n\n discreteUniform.a: integer\n Minimum support. If set, the value must be an integer smaller than or\n equal to `b`.\n\n discreteUniform.b: integer\n Maximum support. If set, the value must be an integer greater than or\n equal to `a`.\n\n discreteUniform.entropy: number\n Read-only property which returns the entropy.\n\n discreteUniform.kurtosis: number\n Read-only property which returns the excess kurtosis.\n\n discreteUniform.mean: number\n Read-only property which returns the expected value.\n\n discreteUniform.median: number\n Read-only property which returns the median.\n\n discreteUniform.skewness: number\n Read-only property which returns the skewness.\n\n discreteUniform.stdev: number\n Read-only property which returns the standard deviation.\n\n discreteUniform.variance: number\n Read-only property which returns the variance.\n\n discreteUniform.cdf: Function\n Evaluates the cumulative distribution function (CDF).\n\n discreteUniform.logcdf: Function\n Evaluates the natural logarithm of the cumulative distribution function\n (CDF).\n\n discreteUniform.logpmf: Function\n Evaluates the natural logarithm of the probability mass function (PMF).\n\n discreteUniform.mgf: Function\n Evaluates the moment-generating function (MGF).\n\n discreteUniform.pmf: Function\n Evaluates the probability mass function (PMF).\n\n discreteUniform.quantile: Function\n Evaluates the quantile function at probability `p`.\n\n Examples\n --------\n > var discreteUniform = base.dists.discreteUniform.DiscreteUniform( -2, 2 );\n > discreteUniform.a\n -2\n > discreteUniform.b\n 2\n > discreteUniform.entropy\n ~1.609\n > discreteUniform.kurtosis\n -1.3\n > discreteUniform.mean\n 0.0\n > discreteUniform.median\n 0.0\n > discreteUniform.skewness\n 0.0\n > discreteUniform.stdev\n ~1.414\n > discreteUniform.variance\n 2.0\n > discreteUniform.cdf( 0.8 )\n 0.6\n > discreteUniform.logcdf( 0.5 )\n ~-0.511\n > discreteUniform.logpmf( 1.0 )\n ~-1.609\n > discreteUniform.mgf( 0.8 )\n ~1.766\n > discreteUniform.pmf( 0.0 )\n 0.2\n > discreteUniform.quantile( 0.8 )\n 2.0\n\n",
270-
"base.dists.discreteUniform.kurtosis": "\nbase.dists.discreteUniform.kurtosis( a, b )\n Returns the excess kurtosis of a discrete uniform distribution.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n a: number\n Minimum support.\n\n b: number\n Maximum support.\n\n Returns\n -------\n out: number\n Excess kurtosis.\n\n Examples\n --------\n > var v = base.dists.discreteUniform.kurtosis( 0, 1 )\n -2.0\n > v = base.dists.discreteUniform.kurtosis( 4, 12 )\n ~-1.23\n > v = base.dists.discreteUniform.kurtosis( -4, 8 )\n ~-1.214\n\n",
270+
"base.dists.discreteUniform.kurtosis": "\nbase.dists.discreteUniform.kurtosis( a, b )\n Returns the excess kurtosis of a discrete uniform distribution.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n out: number\n Excess kurtosis.\n\n Examples\n --------\n > var v = base.dists.discreteUniform.kurtosis( 0, 1 )\n -2.0\n > v = base.dists.discreteUniform.kurtosis( 4, 12 )\n ~-1.23\n > v = base.dists.discreteUniform.kurtosis( -4, 8 )\n ~-1.214\n\n",
271271
"base.dists.discreteUniform.logcdf": "\nbase.dists.discreteUniform.logcdf( x, a, b )\n Evaluates the natural logarithm of the cumulative distribution function\n (CDF) for a discrete uniform distribution with minimum support `a` and\n maximum support `b` at a value `x`.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n x: number\n Input value.\n\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n out: number\n Evaluated logCDF.\n\n Examples\n --------\n > var y = base.dists.discreteUniform.logcdf( 9.0, 0, 10 )\n ~-0.095\n > y = base.dists.discreteUniform.logcdf( 0.5, 0, 2 )\n ~-1.099\n > y = base.dists.discreteUniform.logcdf( PINF, 2, 4 )\n 0.0\n > y = base.dists.discreteUniform.logcdf( NINF, 2, 4 )\n -Infinity\n > y = base.dists.discreteUniform.logcdf( NaN, 0, 1 )\n NaN\n > y = base.dists.discreteUniform.logcdf( 0.0, NaN, 1 )\n NaN\n > y = base.dists.discreteUniform.logcdf( 0.0, 0, NaN )\n NaN\n > y = base.dists.discreteUniform.logcdf( 2.0, 1, 0 )\n NaN\n\n\nbase.dists.discreteUniform.logcdf.factory( a, b )\n Returns a function for evaluating the natural logarithm of the cumulative\n distribution function (CDF) of a discrete uniform distribution with minimum\n support `a` and maximum support `b`.\n\n Parameters\n ----------\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n logcdf: Function\n Logarithm of cumulative distribution function (CDF).\n\n Examples\n --------\n > var myLogCDF = base.dists.discreteUniform.logcdf.factory( 0, 10 );\n > var y = myLogCDF( 0.5 )\n ~-2.398\n > y = myLogCDF( 8.0 )\n ~-0.201\n\n",
272272
"base.dists.discreteUniform.logpmf": "\nbase.dists.discreteUniform.logpmf( x, a, b )\n Evaluates the natural logarithm of the probability mass function (PMF) for a\n discrete uniform distribution with minimum support `a` and maximum support\n `b` at a value `x`.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n x: number\n Input value.\n\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n out: number\n Evaluated logPMF.\n\n Examples\n --------\n > var y = base.dists.discreteUniform.logpmf( 2.0, 0, 4 )\n ~-1.609\n > y = base.dists.discreteUniform.logpmf( 5.0, 0, 4 )\n -Infinity\n > y = base.dists.discreteUniform.logpmf( 3.0, -4, 4 )\n ~-2.197\n > y = base.dists.discreteUniform.logpmf( NaN, 0, 1 )\n NaN\n > y = base.dists.discreteUniform.logpmf( 0.0, NaN, 1 )\n NaN\n > y = base.dists.discreteUniform.logpmf( 0.0, 0, NaN )\n NaN\n > y = base.dists.discreteUniform.logpmf( 2.0, 3, 1 )\n NaN\n > y = base.dists.discreteUniform.logpmf( 2.0, 1, 2.4 )\n NaN\n\n\nbase.dists.discreteUniform.logpmf.factory( a, b )\n Returns a function for evaluating the natural logarithm of the probability\n mass function (PMF) of a discrete uniform distribution with minimum support\n `a` and maximum support `b`.\n\n Parameters\n ----------\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n logpmf: Function\n Logarithm of probability mass function (PMF).\n\n Examples\n --------\n > var myLogPMF = base.dists.discreteUniform.logpmf.factory( 6, 7 );\n > var y = myLogPMF( 7.0 )\n ~-0.693\n > y = myLogPMF( 5.0 )\n -Infinity\n\n",
273273
"base.dists.discreteUniform.mean": "\nbase.dists.discreteUniform.mean( a, b )\n Returns the expected value of a discrete uniform distribution.\n\n If `a > b`, the function returns `NaN`.\n\n If `a` or `b` is not an integer value, the function returns `NaN`.\n\n Parameters\n ----------\n a: integer\n Minimum support.\n\n b: integer\n Maximum support.\n\n Returns\n -------\n out: number\n Expected value.\n\n Examples\n --------\n > var v = base.dists.discreteUniform.mean( -2, 2 )\n 0.0\n > v = base.dists.discreteUniform.mean( 4, 12 )\n 8.0\n > v = base.dists.discreteUniform.mean( 2, 8 )\n 5.0\n\n",
@@ -1372,6 +1372,7 @@ var db = {
13721372
"isWriteOnlyProperty": "\nisWriteOnlyProperty( value, property )\n Tests if an object's own property is write-only.\n\n Parameters\n ----------\n value: any\n Value to test.\n\n property: any\n Property to test.\n\n Returns\n -------\n bool: boolean\n Boolean indicating if an object's own property is write-only.\n\n Examples\n --------\n > var obj = { 'boop': true };\n > var desc = {};\n > desc.configurable = false;\n > desc.enumerable = true;\n > desc.set = function setter( v ) { obj.boop = v; };\n > defineProperty( obj, 'beep', desc );\n > var bool = isWriteOnlyProperty( obj, 'boop' )\n false\n > bool = isWriteOnlyProperty( obj, 'beep' )\n true\n\n See Also\n --------\n isReadOnlyProperty, isReadWriteProperty, isWritableProperty, isWriteOnlyPropertyIn\n",
13731373
"isWriteOnlyPropertyIn": "\nisWriteOnlyPropertyIn( value, property )\n Tests if an object's own or inherited property is write-only.\n\n Parameters\n ----------\n value: any\n Value to test.\n\n property: any\n Property to test.\n\n Returns\n -------\n bool: boolean\n Boolean indicating if an object's own or inherited property is write-\n only.\n\n Examples\n --------\n > var obj = { 'boop': true };\n > var desc = {};\n > desc.configurable = false;\n > desc.enumerable = true;\n > desc.set = function setter( v ) { obj.boop = v; };\n > defineProperty( obj, 'beep', desc );\n > var bool = isWriteOnlyPropertyIn( obj, 'boop' )\n false\n > bool = isWriteOnlyPropertyIn( obj, 'beep' )\n true\n\n See Also\n --------\n isReadOnlyPropertyIn, isReadWritePropertyIn, isWritablePropertyIn, isWriteOnlyProperty\n",
13741374
"iterAdd": "\niterAdd( iter0, ...iterator )\n Returns an iterator which performs element-wise addition of two or more\n iterators.\n\n The length of the returned iterator is equal to the length of the shortest\n provided iterator. In other words, the returned iterator ends once *one* of\n the provided iterators ends.\n\n If provided a numeric value as an iterator argument, the value is broadcast\n as an infinite iterator which always returns the provided value.\n\n If an environment supports Symbol.iterator and provided iterators are\n iterable, the returned iterator is iterable.\n\n Parameters\n ----------\n iter0: Object\n Input iterator.\n\n iterator: ...Object\n Iterators to add.\n\n Returns\n -------\n iterator: Object\n Iterator.\n\n iterator.next(): Function\n Returns an iterator protocol-compliant object containing the next\n iterated value (if one exists) and a boolean flag indicating whether the\n iterator is finished.\n\n iterator.return( [value] ): Function\n Finishes an iterator and returns a provided value.\n\n Examples\n --------\n > var it1 = array2iterator( [ 1.0, 2.0 ] );\n > var it2 = array2iterator( [ 3.0, 4.0 ] );\n > var it = iterAdd( it1, it2 );\n > var v = it.next().value\n 4.0\n > v = it.next().value\n 6.0\n > var bool = it.next().done\n true\n\n See Also\n --------\n iterDivide, iterMultiply, iterSubtract\n",
1375+
"iterAdvance": "\niterAdvance( iterator[, n] )\n Advances an entire iterator.\n\n The function *eagerly* advances an input iterator `n` iterations or until\n the input iterator finishes, whichever comes first.\n\n Parameters\n ----------\n iterator: Object\n Input iterator to advance.\n\n n: integer (optional)\n Number of iterations. Default: 1e308.\n\n Returns\n -------\n iterator: Object\n Input iterator.\n\n Examples\n --------\n > var arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\n > var it = iterAdvance( arr, 4 );\n > var v = it.next().value\n 1\n > var bool = it.next().done\n true\n\n See Also\n --------\n iterHead, iterSlice\n",
13751376
"iterAny": "\niterAny( iterator )\n Tests whether at least one iterated value is truthy.\n\n The function immediately returns upon encountering a truthy value.\n\n If provided an iterator which does not return any iterated values, the\n function returns `false`.\n\n Parameters\n ----------\n iterator: Object\n Input iterator over which to iterate.\n\n Returns\n -------\n bool: boolean\n The function returns `true` if a value is truthy; otherwise, the\n function returns `false`.\n\n Examples\n --------\n > var arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\n > var bool = iterAny( arr )\n true\n\n See Also\n --------\n iterAnyBy, iterEvery, iterForEach, iterNone, iterSome\n",
13761377
"iterAnyBy": "\niterAnyBy( iterator, predicate[, thisArg ] )\n Tests whether at least one iterated value passes a test implemented by a\n predicate function.\n\n The predicate function is provided two arguments:\n\n - value: iterated value\n - index: iteration index\n\n The function immediately returns upon encountering a truthy return value.\n\n If provided an iterator which does not return any iterated values, the\n function returns `false`.\n\n Parameters\n ----------\n iterator: Object\n Input iterator over which to iterate.\n\n predicate: Function\n The test function.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n bool: boolean\n The function returns `true` if a predicate function returns a truthy\n value for any iterated value. Otherwise, the function returns `false`.\n\n Examples\n --------\n > var arr = array2iterator( [ 0, 0, 0, 0, 1 ] );\n > function fcn( v ) { return ( v === 1 ); };\n > var bool = iterAnyBy( arr, fcn )\n true\n\n See Also\n --------\n iterAny, iterEveryBy, iterForEach, iterNoneBy, iterSomeBy\n",
13771378
"iterator2array": "\niterator2array( iterator[, out][, mapFcn[, thisArg]] )\n Creates (or fills) an array from an iterator.\n\n When invoked, an input function is provided two arguments:\n\n - value: iterated value\n - index: iterated value index (zero-based)\n\n If provided an output array, the function fills the output array with\n iterated values.\n\n Iteration stops when an output array is full or an iterator finishes;\n whichever comes first.\n\n Parameters\n ----------\n iterator: Object\n Source iterator.\n\n out: ArrayLikeObject (optional)\n Output array-like object.\n\n mapFcn: Function (optional)\n Function to invoke for each iterated value.\n\n thisArg: any (optional)\n Execution context.\n\n Returns\n -------\n out: ArrayLikeObject\n Output array.\n\n Examples\n --------\n > var opts = { 'iter': 10 };\n > var arr = iterator2array( random.iterators.randu( opts ) )\n\n See Also\n --------\n array2iterator, iterator2arrayview\n",

0 commit comments

Comments
 (0)