@stdlib/array-complex64 0.0.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -304
- package/NOTICE +1 -1
- package/README.md +1391 -146
- package/SECURITY.md +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +920 -29
- package/lib/from_iterator.js +2 -1
- package/lib/from_iterator_map.js +2 -1
- package/lib/main.js +1606 -222
- package/package.json +51 -37
- package/docs/types/test.ts +0 -153
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/array-complex64",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Complex64Array.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -37,45 +37,59 @@
|
|
|
37
37
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@stdlib/array-base-
|
|
41
|
-
"@stdlib/array-
|
|
42
|
-
"@stdlib/
|
|
43
|
-
"@stdlib/
|
|
44
|
-
"@stdlib/
|
|
45
|
-
"@stdlib/assert-
|
|
46
|
-
"@stdlib/assert-is-
|
|
47
|
-
"@stdlib/assert-is-
|
|
48
|
-
"@stdlib/assert-is-
|
|
49
|
-
"@stdlib/assert-is-
|
|
50
|
-
"@stdlib/assert-is-
|
|
51
|
-
"@stdlib/
|
|
52
|
-
"@stdlib/
|
|
53
|
-
"@stdlib/
|
|
54
|
-
"@stdlib/
|
|
55
|
-
"@stdlib/
|
|
56
|
-
"@stdlib/
|
|
57
|
-
"@stdlib/
|
|
58
|
-
"@stdlib/
|
|
59
|
-
"@stdlib/
|
|
60
|
-
"@stdlib/
|
|
61
|
-
"@stdlib/
|
|
40
|
+
"@stdlib/array-base-accessor-getter": "^0.2.0",
|
|
41
|
+
"@stdlib/array-base-assert-is-complex128array": "^0.2.0",
|
|
42
|
+
"@stdlib/array-base-assert-is-complex64array": "^0.2.0",
|
|
43
|
+
"@stdlib/array-base-getter": "^0.2.0",
|
|
44
|
+
"@stdlib/array-float32": "^0.2.0",
|
|
45
|
+
"@stdlib/assert-has-iterator-symbol-support": "^0.2.0",
|
|
46
|
+
"@stdlib/assert-is-array": "^0.2.0",
|
|
47
|
+
"@stdlib/assert-is-array-like-object": "^0.2.0",
|
|
48
|
+
"@stdlib/assert-is-arraybuffer": "^0.2.0",
|
|
49
|
+
"@stdlib/assert-is-collection": "^0.2.0",
|
|
50
|
+
"@stdlib/assert-is-complex-like": "^0.2.0",
|
|
51
|
+
"@stdlib/assert-is-function": "^0.2.0",
|
|
52
|
+
"@stdlib/assert-is-nonnegative-integer": "^0.2.0",
|
|
53
|
+
"@stdlib/assert-is-object": "^0.2.0",
|
|
54
|
+
"@stdlib/assert-is-string": "^0.2.0",
|
|
55
|
+
"@stdlib/complex-float32": "^0.2.0",
|
|
56
|
+
"@stdlib/complex-imagf": "^0.2.0",
|
|
57
|
+
"@stdlib/complex-realf": "^0.2.0",
|
|
58
|
+
"@stdlib/math-base-assert-is-even": "^0.2.0",
|
|
59
|
+
"@stdlib/math-base-assert-is-integer": "^0.2.0",
|
|
60
|
+
"@stdlib/math-base-special-floor": "^0.2.0",
|
|
61
|
+
"@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
|
|
62
|
+
"@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
|
|
63
|
+
"@stdlib/string-format": "^0.2.0",
|
|
64
|
+
"@stdlib/symbol-iterator": "^0.2.0",
|
|
65
|
+
"@stdlib/types": "^0.3.1",
|
|
66
|
+
"@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.2.0",
|
|
67
|
+
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0",
|
|
68
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.2.0"
|
|
62
69
|
},
|
|
63
70
|
"devDependencies": {
|
|
64
|
-
"@stdlib/array-buffer": "^0.0
|
|
65
|
-
"@stdlib/array-complex128": "^0.0
|
|
66
|
-
"@stdlib/assert-has-own-property": "^0.0
|
|
67
|
-
"@stdlib/assert-
|
|
68
|
-
"@stdlib/assert-is-
|
|
69
|
-
"@stdlib/assert-is-
|
|
70
|
-
"@stdlib/
|
|
71
|
-
"@stdlib/
|
|
72
|
-
"@stdlib/
|
|
73
|
-
"@stdlib/
|
|
74
|
-
"@stdlib/
|
|
71
|
+
"@stdlib/array-buffer": "^0.2.0",
|
|
72
|
+
"@stdlib/array-complex128": "^0.1.0",
|
|
73
|
+
"@stdlib/assert-has-own-property": "^0.2.0",
|
|
74
|
+
"@stdlib/assert-instance-of": "^0.2.0",
|
|
75
|
+
"@stdlib/assert-is-boolean": "^0.2.0",
|
|
76
|
+
"@stdlib/assert-is-complex64": "^0.2.0",
|
|
77
|
+
"@stdlib/assert-is-complex64array": "^0.1.0",
|
|
78
|
+
"@stdlib/assert-is-integer": "^0.2.0",
|
|
79
|
+
"@stdlib/assert-is-negative-zero": "^0.2.0",
|
|
80
|
+
"@stdlib/assert-is-positive-zero": "^0.2.0",
|
|
81
|
+
"@stdlib/complex-imag": "^0.2.0",
|
|
82
|
+
"@stdlib/complex-real": "^0.2.0",
|
|
83
|
+
"@stdlib/console-log-each": "^0.1.0",
|
|
84
|
+
"@stdlib/math-base-special-pow": "^0.2.0",
|
|
85
|
+
"@stdlib/random-base-randu": "^0.1.0",
|
|
86
|
+
"@stdlib/utils-identity-function": "^0.2.0",
|
|
75
87
|
"proxyquire": "^2.0.0",
|
|
76
88
|
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
77
89
|
"istanbul": "^0.4.1",
|
|
78
|
-
"tap-
|
|
90
|
+
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
|
|
91
|
+
"@stdlib/bench-harness": "^0.2.0",
|
|
92
|
+
"@stdlib/bench": "^0.3.1"
|
|
79
93
|
},
|
|
80
94
|
"engines": {
|
|
81
95
|
"node": ">=0.10.0",
|
|
@@ -114,7 +128,7 @@
|
|
|
114
128
|
"ieee754"
|
|
115
129
|
],
|
|
116
130
|
"funding": {
|
|
117
|
-
"type": "
|
|
118
|
-
"url": "https://
|
|
131
|
+
"type": "opencollective",
|
|
132
|
+
"url": "https://opencollective.com/stdlib"
|
|
119
133
|
}
|
|
120
134
|
}
|
package/docs/types/test.ts
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @license Apache-2.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 The Stdlib Authors.
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
* you may not use this file except in compliance with the License.
|
|
8
|
-
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
* See the License for the specific language governing permissions and
|
|
16
|
-
* limitations under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
// tslint:disable:no-unused-expression
|
|
20
|
-
|
|
21
|
-
import Complex64Array = require( './index' );
|
|
22
|
-
import Complex64 = require( '@stdlib/complex-float32' );
|
|
23
|
-
import ArrayBuffer = require( '@stdlib/array-buffer' );
|
|
24
|
-
import realf = require( '@stdlib/complex-realf' );
|
|
25
|
-
import imagf = require( '@stdlib/complex-imagf' );
|
|
26
|
-
|
|
27
|
-
const clbk = ( v: Complex64 ) => {
|
|
28
|
-
return new Complex64( realf( v ) * 2.0, imagf( v ) * 2.0 );
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// TESTS //
|
|
33
|
-
|
|
34
|
-
// The function returns a complex number array...
|
|
35
|
-
{
|
|
36
|
-
new Complex64Array(); // $ExpectType Complex64Array
|
|
37
|
-
Complex64Array(); // $ExpectType Complex64Array
|
|
38
|
-
new Complex64Array( 2 ); // $ExpectType Complex64Array
|
|
39
|
-
Complex64Array( 2 ); // $ExpectType Complex64Array
|
|
40
|
-
new Complex64Array( [ 1.0, -1.0 ] ); // $ExpectType Complex64Array
|
|
41
|
-
Complex64Array( [ 1.0, -1.0 ] ); // $ExpectType Complex64Array
|
|
42
|
-
|
|
43
|
-
const buf = new ArrayBuffer( 16 );
|
|
44
|
-
new Complex64Array( buf ); // $ExpectType Complex64Array
|
|
45
|
-
Complex64Array( buf ); // $ExpectType Complex64Array
|
|
46
|
-
new Complex64Array( buf, 8 ); // $ExpectType Complex64Array
|
|
47
|
-
Complex64Array( buf, 8 ); // $ExpectType Complex64Array
|
|
48
|
-
new Complex64Array( buf, 8, 2 ); // $ExpectType Complex64Array
|
|
49
|
-
Complex64Array( buf, 8, 2 ); // $ExpectType Complex64Array
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// The compiler throws an error if the function is provided a first argument that is not a number, typed array, array-like object, or array buffer...
|
|
53
|
-
{
|
|
54
|
-
new Complex64Array( true ); // $ExpectError
|
|
55
|
-
new Complex64Array( false ); // $ExpectError
|
|
56
|
-
new Complex64Array( null ); // $ExpectError
|
|
57
|
-
new Complex64Array( 'abc' ); // $ExpectError
|
|
58
|
-
new Complex64Array( {} ); // $ExpectError
|
|
59
|
-
new Complex64Array( ( x: number ): number => x ); // $ExpectError
|
|
60
|
-
|
|
61
|
-
Complex64Array( true ); // $ExpectError
|
|
62
|
-
Complex64Array( false ); // $ExpectError
|
|
63
|
-
Complex64Array( null ); // $ExpectError
|
|
64
|
-
Complex64Array( 'abc' ); // $ExpectError
|
|
65
|
-
Complex64Array( {} ); // $ExpectError
|
|
66
|
-
Complex64Array( ( x: number ): number => x ); // $ExpectError
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// The compiler throws an error if the function is provided a second argument that is not a number...
|
|
70
|
-
{
|
|
71
|
-
const buf = new ArrayBuffer( 16 );
|
|
72
|
-
new Complex64Array( buf, true ); // $ExpectError
|
|
73
|
-
new Complex64Array( buf, false ); // $ExpectError
|
|
74
|
-
new Complex64Array( buf, null ); // $ExpectError
|
|
75
|
-
new Complex64Array( buf, 'abc' ); // $ExpectError
|
|
76
|
-
new Complex64Array( buf, {} ); // $ExpectError
|
|
77
|
-
new Complex64Array( buf, ( x: number ): number => x ); // $ExpectError
|
|
78
|
-
|
|
79
|
-
Complex64Array( buf, true ); // $ExpectError
|
|
80
|
-
Complex64Array( buf, false ); // $ExpectError
|
|
81
|
-
Complex64Array( buf, null ); // $ExpectError
|
|
82
|
-
Complex64Array( buf, 'abc' ); // $ExpectError
|
|
83
|
-
Complex64Array( buf, {} ); // $ExpectError
|
|
84
|
-
Complex64Array( buf, ( x: number ): number => x ); // $ExpectError
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// The compiler throws an error if the function is provided a third argument that is not a number...
|
|
88
|
-
{
|
|
89
|
-
const buf = new ArrayBuffer( 16 );
|
|
90
|
-
new Complex64Array( buf, 8, true ); // $ExpectError
|
|
91
|
-
new Complex64Array( buf, 8, false ); // $ExpectError
|
|
92
|
-
new Complex64Array( buf, 8, null ); // $ExpectError
|
|
93
|
-
new Complex64Array( buf, 8, 'abc' ); // $ExpectError
|
|
94
|
-
new Complex64Array( buf, 8, {} ); // $ExpectError
|
|
95
|
-
new Complex64Array( buf, 8, ( x: number ): number => x ); // $ExpectError
|
|
96
|
-
|
|
97
|
-
Complex64Array( buf, 8, true ); // $ExpectError
|
|
98
|
-
Complex64Array( buf, 8, false ); // $ExpectError
|
|
99
|
-
Complex64Array( buf, 8, null ); // $ExpectError
|
|
100
|
-
Complex64Array( buf, 8, 'abc' ); // $ExpectError
|
|
101
|
-
Complex64Array( buf, 8, {} ); // $ExpectError
|
|
102
|
-
Complex64Array( buf, 8, ( x: number ): number => x ); // $ExpectError
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// The `from` method returns a complex number array...
|
|
106
|
-
{
|
|
107
|
-
Complex64Array.from( [ 1.0, 1.0 ] ); // $ExpectType Complex64Array
|
|
108
|
-
Complex64Array.from( [ 1.0, 1.0 ], ( x: number ): number => x * x ); // $ExpectType Complex64Array
|
|
109
|
-
Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk, {} ); // $ExpectType Complex64Array
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// The compiler throws an error if the `from` method is provided a first argument which is not array-like or iterable...
|
|
113
|
-
{
|
|
114
|
-
Complex64Array.from( true ); // $ExpectError
|
|
115
|
-
Complex64Array.from( false ); // $ExpectError
|
|
116
|
-
Complex64Array.from( 123 ); // $ExpectError
|
|
117
|
-
Complex64Array.from( null ); // $ExpectError
|
|
118
|
-
Complex64Array.from( {} ); // $ExpectError
|
|
119
|
-
|
|
120
|
-
Complex64Array.from( true, clbk ); // $ExpectError
|
|
121
|
-
Complex64Array.from( false, clbk ); // $ExpectError
|
|
122
|
-
Complex64Array.from( 123, clbk ); // $ExpectError
|
|
123
|
-
Complex64Array.from( null, clbk ); // $ExpectError
|
|
124
|
-
Complex64Array.from( {}, clbk ); // $ExpectError
|
|
125
|
-
|
|
126
|
-
Complex64Array.from( true, clbk, {} ); // $ExpectError
|
|
127
|
-
Complex64Array.from( false, clbk, {} ); // $ExpectError
|
|
128
|
-
Complex64Array.from( 123, clbk, {} ); // $ExpectError
|
|
129
|
-
Complex64Array.from( null, clbk, {} ); // $ExpectError
|
|
130
|
-
Complex64Array.from( {}, clbk, {} ); // $ExpectError
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// The compiler throws an error if the `from` method is provided a second argument which is not a function with a supported signature...
|
|
134
|
-
{
|
|
135
|
-
Complex64Array.from( [ 1, 1 ], true ); // $ExpectError
|
|
136
|
-
Complex64Array.from( [ 1, 1 ], false ); // $ExpectError
|
|
137
|
-
Complex64Array.from( [ 1, 1 ], 123 ); // $ExpectError
|
|
138
|
-
Complex64Array.from( [ 1, 1 ], null ); // $ExpectError
|
|
139
|
-
Complex64Array.from( [ 1, 1 ], {} ); // $ExpectError
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// The `of` method returns a complex number array...
|
|
143
|
-
{
|
|
144
|
-
Complex64Array.of( 1.0, 1.0, 1.0, 1.0 ); // $ExpectType Complex64Array
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// The compiler throws an error if the `of` method is provided arguments that are not numbers...
|
|
148
|
-
{
|
|
149
|
-
Complex64Array.of( 'abc', 'def' ); // $ExpectError
|
|
150
|
-
Complex64Array.of( true, false ); // $ExpectError
|
|
151
|
-
Complex64Array.of( {}, [] ); // $ExpectError
|
|
152
|
-
Complex64Array.of( null, null ); // $ExpectError
|
|
153
|
-
}
|