diff --git a/lib/node_modules/@stdlib/complex/README.md b/lib/node_modules/@stdlib/complex/README.md index 4ac012ad344..231ec019692 100644 --- a/lib/node_modules/@stdlib/complex/README.md +++ b/lib/node_modules/@stdlib/complex/README.md @@ -39,67 +39,12 @@ var o = ns; // returns {...} ``` -The namespace constains complex number constructors. +The namespace contains the following APIs: - - -
- -- [`base`][@stdlib/complex/base]: base (i.e., lower-level) complex number functions. -- [`complex( real, imag[, dtype] )`][@stdlib/complex/cmplx]: create a complex number. -- [`complexCtors( dtype )`][@stdlib/complex/ctors]: complex number constructors. -- [`complexDataType( value )`][@stdlib/complex/dtype]: return the data type of a complex number. -- [`complexDataTypes()`][@stdlib/complex/dtypes]: list of complex number data types. -- [`complexPromotionRules( [dtype1, dtype2] )`][@stdlib/complex/promotion-rules]: return the complex number data type with the smallest size and closest "kind" to which data types can be **safely** cast. - -
+ -```javascript -var z = ns.complex( 5.0, 3.0 ); -// returns - -var str = z.toString(); -// returns '5 + 3i' - -z = ns.complex( 5.0, 3.0, 'float32' ); -// returns - -z = new ns.Complex64( 5.0, 3.0 ); -// returns -``` - -In addition, the namespace contains the following functions: - - - -
- -- [`conj( z )`][@stdlib/complex/float64/conj]: return the complex conjugate of a double-precision complex floating-point number. -- [`conjf( z )`][@stdlib/complex/float32/conj]: return the complex conjugate of a single-precision complex floating-point number. -- [`imag( z )`][@stdlib/complex/float64/imag]: return the imaginary component of a double-precision complex floating-point number. -- [`imagf( z )`][@stdlib/complex/float32/imag]: return the imaginary component of a single-precision complex floating-point number. -- [`real( z )`][@stdlib/complex/float64/real]: return the real component of a double-precision complex floating-point number. -- [`realf( z )`][@stdlib/complex/float32/real]: return the real component of a single-precision complex floating-point number. -- [`reim( z )`][@stdlib/complex/float64/reim]: return the real and imaginary components of a double-precision complex floating-point number. -- [`reimf( z )`][@stdlib/complex/float32/reim]: return the real and imaginary components of a single-precision complex floating-point number. -- [`reviveComplex( key, value )`][@stdlib/complex/reviver]: revive a JSON-serialized complex number. - -
- - - -```javascript -var z = ns.complex( 5.0, 3.0 ); -var str = z.toString(); -// returns '5 + 3i' - -var v = ns.conj( z ); -str = v.toString(); -// returns '5 - 3i' -``` - @@ -135,40 +80,6 @@ console.log( objectKeys( ns ) ); diff --git a/lib/node_modules/@stdlib/complex/lib/index.js b/lib/node_modules/@stdlib/complex/lib/index.js index ac6a95cedd4..83543f00a71 100644 --- a/lib/node_modules/@stdlib/complex/lib/index.js +++ b/lib/node_modules/@stdlib/complex/lib/index.js @@ -55,148 +55,58 @@ setReadOnly( ns, 'base', require( '@stdlib/complex/base' ) ); setReadOnly( ns, 'complex', require( '@stdlib/complex/cmplx' ) ); /** -* @name complexCtors +* @name ctors * @memberof ns * @readonly * @type {Function} * @see {@link module:@stdlib/complex/ctors} */ -setReadOnly( ns, 'complexCtors', require( '@stdlib/complex/ctors' ) ); +setReadOnly( ns, 'ctors', require( '@stdlib/complex/ctors' ) ); /** -* @name complexDataType +* @name dtype * @memberof ns * @readonly * @type {Function} * @see {@link module:@stdlib/complex/dtype} */ -setReadOnly( ns, 'complexDataType', require( '@stdlib/complex/dtype' ) ); +setReadOnly( ns, 'dtype', require( '@stdlib/complex/dtype' ) ); /** -* @name complexDataTypes +* @name dtypes * @memberof ns * @readonly * @type {Function} * @see {@link module:@stdlib/complex/dtypes} */ -setReadOnly( ns, 'complexDataTypes', require( '@stdlib/complex/dtypes' ) ); +setReadOnly( ns, 'dtypes', require( '@stdlib/complex/dtypes' ) ); /** -* @name conjf +* @name float32 * @memberof ns * @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float32/conj} -*/ -setReadOnly( ns, 'conjf', require( '@stdlib/complex/float32/conj' ) ); - -/** -* @name Complex64 -* @memberof ns -* @readonly -* @constructor -* @see {@link module:@stdlib/complex/float32/ctor} -*/ -setReadOnly( ns, 'Complex64', require( '@stdlib/complex/float32/ctor' ) ); - -/** -* @name imagf -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float32/imag} -*/ -setReadOnly( ns, 'imagf', require( '@stdlib/complex/float32/imag' ) ); - -/** -* @name realf -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float32/real} -*/ -setReadOnly( ns, 'realf', require( '@stdlib/complex/float32/real' ) ); - -/** -* @name reimf -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float32/reim} -*/ -setReadOnly( ns, 'reimf', require( '@stdlib/complex/float32/reim' ) ); - -/** -* @name reviveComplex64 -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float32/reviver} -*/ -setReadOnly( ns, 'reviveComplex64', require( '@stdlib/complex/float32/reviver' ) ); - -/** -* @name conj -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float64/conj} -*/ -setReadOnly( ns, 'conj', require( '@stdlib/complex/float64/conj' ) ); - -/** -* @name Complex128 -* @memberof ns -* @readonly -* @constructor -* @see {@link module:@stdlib/complex/float64/ctor} -*/ -setReadOnly( ns, 'Complex128', require( '@stdlib/complex/float64/ctor' ) ); - -/** -* @name imag -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float64/imag} -*/ -setReadOnly( ns, 'imag', require( '@stdlib/complex/float64/imag' ) ); - -/** -* @name real -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float64/real} -*/ -setReadOnly( ns, 'real', require( '@stdlib/complex/float64/real' ) ); - -/** -* @name reim -* @memberof ns -* @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float64/reim} +* @type {Namespace} +* @see {@link module:@stdlib/complex/float32} */ -setReadOnly( ns, 'reim', require( '@stdlib/complex/float64/reim' ) ); +setReadOnly( ns, 'float32', require( '@stdlib/complex/float32' ) ); /** -* @name reviveComplex128 +* @name float64 * @memberof ns * @readonly -* @type {Function} -* @see {@link module:@stdlib/complex/float64/reviver} +* @type {Namespace} +* @see {@link module:@stdlib/complex/float64} */ -setReadOnly( ns, 'reviveComplex128', require( '@stdlib/complex/float64/reviver' ) ); +setReadOnly( ns, 'float64', require( '@stdlib/complex/float64' ) ); /** -* @name complexPromotionRules +* @name promotionRules * @memberof ns * @readonly * @type {Function} * @see {@link module:@stdlib/complex/promotion-rules} */ -setReadOnly( ns, 'complexPromotionRules', require( '@stdlib/complex/promotion-rules' ) ); +setReadOnly( ns, 'promotionRules', require( '@stdlib/complex/promotion-rules' ) ); /** * @name reviveComplex