Skip to content

Commit 28f9780

Browse files
committed
docs: update for assign and stride
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent bd6f38c commit 28f9780

File tree

1 file changed

+80
-8
lines changed
  • lib/node_modules/@stdlib/math/base/special/csignumf/docs/types

1 file changed

+80
-8
lines changed

lib/node_modules/@stdlib/math/base/special/csignumf/docs/types/index.d.ts

Lines changed: 80 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,72 @@
2121
/// <reference types="@stdlib/types"/>
2222

2323
import { Complex64 } from '@stdlib/types/complex';
24+
import { NumericArray, Collection } from '@stdlib/types/array';
25+
26+
/**
27+
* Interface for evaluating the signum function of a single-precision complex number.
28+
*/
29+
interface Csignumf {
30+
/**
31+
* Evaluates the signum function of a single-precision complex floating-point number.
32+
*
33+
* @param z - input value
34+
* @returns result
35+
*
36+
* @example
37+
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
38+
* var v = csignumf( new Complex64( -4.0, 3.0 ) );
39+
* // returns <Complex64>
40+
*/
41+
( z: Complex64 ): Complex64;
42+
43+
/**
44+
* Evaluates the signum function and assigns the result to a provided output array.
45+
*
46+
* @param re - real component of the input number
47+
* @param im - imaginary component of the input number
48+
* @param out - output array
49+
* @param strideOut - output stride length
50+
* @param offsetOut - starting index for the output
51+
* @returns output array
52+
*
53+
* @example
54+
* var Float32Array = require( '@stdlib/array/float32' );
55+
*
56+
* var out = new Float32Array( 2 );
57+
* var v = csignumf.assign( 3.0, 4.0, out, 1, 0 );
58+
* // returns <Float32Array>[ ~0.6, ~0.8 ]
59+
*/
60+
assign<T extends NumericArray | Collection<number>>( re: number, im: number, out: T, strideOut: number, offsetOut: number ): T;
61+
62+
/**
63+
* Evaluates the signum function for single-precision complex numbers in a strided input array and assigns the results to a strided output array.
64+
*
65+
* @param z - input array (interleaved real and imaginary values)
66+
* @param strideZ - stride length for the input array
67+
* @param offsetZ - starting index for the input array
68+
* @param out - output array (interleaved real and imaginary values)
69+
* @param strideOut - stride length for the output array
70+
* @param offsetOut - starting index for the output array
71+
* @returns output array
72+
*
73+
* @example
74+
* var Float32Array = require( '@stdlib/array/float32' );
75+
*
76+
* var z = new Float32Array( [ 3.0, 4.0 ] );
77+
* var out = new Float32Array( 2 );
78+
* csignumf.strided( z, 1, 0, out, 1, 0 );
79+
* // out => <Float32Array>[ ~0.6, ~0.8 ]
80+
*/
81+
strided<T extends NumericArray | Collection<number>, U extends NumericArray | Collection<number>>(
82+
z: T,
83+
strideZ: number,
84+
offsetZ: number,
85+
out: U,
86+
strideOut: number,
87+
offsetOut: number
88+
): U;
89+
}
2490

2591
/**
2692
* Evaluates the signum function of a single-precision complex floating-point number.
@@ -30,19 +96,25 @@ import { Complex64 } from '@stdlib/types/complex';
3096
*
3197
* @example
3298
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
33-
* var real = require( '@stdlib/complex/float32/real' );
34-
* var imag = require( '@stdlib/complex/float32/imag' );
35-
*
3699
* var v = csignumf( new Complex64( -4.2, 5.5 ) );
37100
* // returns <Complex64>
38101
*
39-
* var re = real( v );
40-
* // returns ~-0.607
102+
* @example
103+
* var Float32Array = require( '@stdlib/array/float32' );
104+
*
105+
* var out = new Float32Array( 2 );
106+
* var v = csignumf.assign( 3.0, 4.0, out, 1, 0 );
107+
* // returns <Float32Array>[ ~0.6, ~0.8 ]
108+
*
109+
* @example
110+
* var Float32Array = require( '@stdlib/array/float32' );
41111
*
42-
* var im = imag( v );
43-
* // returns ~0.795
112+
* var z = new Float32Array( [ 3.0, 4.0 ] );
113+
* var out = new Float32Array( 2 );
114+
* csignumf.strided( z, 1, 0, out, 1, 0 );
115+
* // out => <Float32Array>[ ~0.6, ~0.8 ]
44116
*/
45-
declare function csignumf( z: Complex64 ): Complex64;
117+
declare const csignumf: Csignumf;
46118

47119

48120
// EXPORTS //

0 commit comments

Comments
 (0)