From a7f6ec658d2c8fc0d66791928994186dd3deb800 Mon Sep 17 00:00:00 2001 From: "Rejoan(RJ)" Date: Fri, 1 Mar 2024 10:58:09 +0530 Subject: [PATCH 1/6] feat: add complex/parse-float32 --- .gitignore | 2 +- .../@stdlib/complex/parse-float32/README.md | 132 ++++++++++++ .../parse-float32/benchmark/benchmark.js | 50 +++++ .../complex/parse-float32/docs/repl.txt | 23 +++ .../parse-float32/docs/types/index.d.ts | 46 +++++ .../complex/parse-float32/docs/types/test.ts | 44 ++++ .../complex/parse-float32/examples/index.js | 42 ++++ .../complex/parse-float32/lib/index.js | 42 ++++ .../@stdlib/complex/parse-float32/lib/main.js | 90 ++++++++ .../complex/parse-float32/package.json | 67 ++++++ .../complex/parse-float32/test/test.js | 192 ++++++++++++++++++ 11 files changed, 729 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/README.md create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/examples/index.js create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/lib/index.js create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/lib/main.js create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/package.json create mode 100644 lib/node_modules/@stdlib/complex/parse-float32/test/test.js diff --git a/.gitignore b/.gitignore index 49b206b8bdae..726e0616b52b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +#/mnt/c/github/stdlib/lib/node_modules/@stdlib/complex/dtype # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software diff --git a/lib/node_modules/@stdlib/complex/parse-float32/README.md b/lib/node_modules/@stdlib/complex/parse-float32/README.md new file mode 100644 index 000000000000..b22c7ea5700d --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/README.md @@ -0,0 +1,132 @@ + + +# parseComplex64 + +> Parse a string representation of a 64-bit [complex number][@stdlib/complex/float32]. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var parseComplex64 = require( '@stdlib/complex/parse-float32' ); +``` + +#### parseComplex64( str ) + +Parse a string representation of a 64-bit [complex number][@stdlib/complex/float32]. + +```javascript +var real = require( '@stdlib/complex/real' ); +var imag = require( '@stdlib/complex/imag' ); + +var str = '5 + 3i'; + +var z = parseComplex64( str ); +// returns + +var re = real( z ); +// returns 5.0 + +var im = imag( z ); +// returns 3.0 +``` + +For details on the string format, see [Complex64][@stdlib/complex/float32]. + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var parseComplex64 = require( '@stdlib/complex/parse-float32' ); +var isComplex64 = require( '@stdlib/assert/is-complex64' ); +var real = require( '@stdlib/complex/real' ); +var imag = require( '@stdlib/complex/imag' ); + +var str = '1e3 - 2.75i'; + +var z = parseComplex64( str ); +var bool = isComplex64( z ); +// returns true + +bool = ( real( z ) === 1e3 ); +// returns true + +bool = ( imag( z ) === -2.75 ); +// returns true +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/complex/parse-float32/benchmark/benchmark.js b/lib/node_modules/@stdlib/complex/parse-float32/benchmark/benchmark.js new file mode 100644 index 000000000000..a75453f549ba --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/benchmark/benchmark.js @@ -0,0 +1,50 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isComplex64 = require( '@stdlib/assert/is-complex64' ); +var pkg = require( './../package.json' ).name; +var parse = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var str; + var z; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + str = i + ' + ' + (i+1) + 'i'; + z = parse( str ); + if ( !(isComplex64(z)) ) { + b.fail( 'should return a Complex64' ); + } + } + b.toc(); + if ( !(isComplex64(z)) ) { + b.fail( 'should return a Complex64' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt b/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt new file mode 100644 index 000000000000..b8a41e4e5d05 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt @@ -0,0 +1,23 @@ + +{{alias}}( str ) + Parse a string representation of a 64-bit complex number. + + Parameters + ---------- + str: string + String representation of a complex number. + + Returns + ------- + out: Complex64 + 64-bit complex number. + + Examples + -------- + > var str = '5 + 3i'; + > var z = {{alias}}( str ) + + + + See Also + -------- diff --git a/lib/node_modules/@stdlib/complex/parse-float32/docs/types/index.d.ts b/lib/node_modules/@stdlib/complex/parse-float32/docs/types/index.d.ts new file mode 100644 index 000000000000..0e5c757cab54 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/docs/types/index.d.ts @@ -0,0 +1,46 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +// MODULES // + +/// + +import { Complex64 } from '@stdlib/types/complex'; + + +/** +* Parse a string representation of a 64-bit complex number. +* +* @param str - string representation of a complex number +* @returns Complex64 instance +* @throws must provide a string recognized as a complex number +* +* @example +* var str = '5 + 3i'; +* +* var z = parseComplex64( str ); +* // returns +*/ +declare function parseComplex64( str: string ): Complex64; + + +// EXPORTS // + +export = parseComplex64; diff --git a/lib/node_modules/@stdlib/complex/parse-float32/docs/types/test.ts b/lib/node_modules/@stdlib/complex/parse-float32/docs/types/test.ts new file mode 100644 index 000000000000..5638828d5949 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import parseComplex64 = require( './index' ); + + +// TESTS // + +// The function returns a complex number... +{ + parseComplex64( '5 + 3.5i' ); // $ExpectType Complex64 + parseComplex64( '3' ); // $ExpectType Complex64 + parseComplex64( '-8i' ); // $ExpectType Complex64 + parseComplex64( '1e3 + 1e-3i' ); // $ExpectType Complex64 + parseComplex64( 'NaN + NaNi' ); // $ExpectType Complex64 + parseComplex64( 'Infinity - Infinityi' ); // $ExpectType Complex64 +} + +// The compiler throws an error if the function is provided a first argument that is not a string... +{ + parseComplex64( true ); // $ExpectError + parseComplex64( false ); // $ExpectError + parseComplex64( null ); // $ExpectError + parseComplex64( undefined ); // $ExpectError + parseComplex64( 5 ); // $ExpectError + parseComplex64( [] ); // $ExpectError + parseComplex64( {} ); // $ExpectError + parseComplex64( ( x: number ): number => x ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/complex/parse-float32/examples/index.js b/lib/node_modules/@stdlib/complex/parse-float32/examples/index.js new file mode 100644 index 000000000000..c7d69192abc4 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/examples/index.js @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var isComplex64 = require( '@stdlib/assert/is-complex64' ); +var real = require( '@stdlib/complex/real' ); +var imag = require( '@stdlib/complex/imag' ); +var parseComplex64 = require( './../lib' ); + +var str = '-0.5 + 1.25i'; + +var z = parseComplex64( str ); +console.log( z ); +// => + +var bool = ( isComplex64( z ) ); +console.log( bool ); +// => true + +bool = ( real( z ) === -0.5 ); +console.log( bool ); +// => true + +bool = ( imag( z ) === 1.25 ); +console.log( bool ); +// => true diff --git a/lib/node_modules/@stdlib/complex/parse-float32/lib/index.js b/lib/node_modules/@stdlib/complex/parse-float32/lib/index.js new file mode 100644 index 000000000000..5ff6842ed922 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/lib/index.js @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Parse a string representation of a complex number and returns a Complex64 instance. +* +* @module @stdlib/complex/parse-float32 +* +* @example +* var parseComplex64 = require( '@stdlib/complex/parse-float32' ); +* +* var str = '1 + 2i'; +* +* var z = parseComplex64( str ); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js b/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js new file mode 100644 index 000000000000..0cda92dad66f --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js @@ -0,0 +1,90 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var Complex64 = require( '@stdlib/complex/float32' ); +var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var replace = require( '@stdlib/string/base/replace' ); +var format = require( '@stdlib/string/format' ); + + +// FUNCTIONS // + +/** +* Matches a complex number string. +* +* @private +* @returns {RegExp} regular expression +* +* @example +* var re = regexp(); +* // returns /^([-+]?(\d*\.?\d*(?:[eE][-+]?\d+)?|Infinity|NaN)i?)?([-+])?((\d*\.?\d*(?:[eE][-+]?\d+)?|Infinity|NaN)i)?$/ +*/ +function regexp() { + return /^([-+]?(\d*\.?\d*(?:[eE][-+]?\d+)?|Infinity|NaN)i?)?([-+])?((\d*\.?\d*(?:[eE][-+]?\d+)?|Infinity|NaN)i)?$/; +} + + +// MAIN // + +/** +* Parse a string representation of a complex number and returns a Complex64 instance. +* +* @param {string} str - string representation of a complex number +* @throws {TypeError} must provide a string +* @throws {Error} must provide a valid string representation of a complex number +* @returns {Complex64} 64-bit complex number +* +* @example +* var str = '1 + 2i'; +* var z = parseComplex64( str ); +* // returns +*/ +function parseComplex64( str ) { + var match; + var re; + var im = 0; + + if ( !isString( str ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) ); + } + + match = replace( str, /\s/g, '' ).match( regexp() ); + if ( !match ) { + throw new Error( format( 'invalid argument. Unable to parse input string as a complex number. Value: `%s`.', str ) ); + } + + // Real part: + re = ( match[1] && !match[1].endsWith( 'i' ) ) ? parseFloat( match[1] ) : 0; + + // Imaginary part: + if ( match[4] ) { + im = ( ( match[3] === '-' ) ? -1 : 1 ) * parseFloat( replace( match[4], /i$/, '' ) ); + } else if ( match[1] && match[1].endsWith( 'i' ) ) { + im = parseFloat( replace( match[1], /i$/, '' ) ); + } + return new Complex64( re, im ); +} + + +// EXPORTS // + +module.exports = parseComplex64; diff --git a/lib/node_modules/@stdlib/complex/parse-float32/package.json b/lib/node_modules/@stdlib/complex/parse-float32/package.json new file mode 100644 index 000000000000..6552d018278e --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/package.json @@ -0,0 +1,67 @@ +{ + "name": "@stdlib/complex/parse-float32", + "version": "0.0.0", + "description": "Parse a string representation of a 64-bit complex number.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdtypes", + "utils", + "util", + "utilities", + "utility", + "complex", + "complex64", + "cmplx", + "parse", + "string", + "convert", + "object", + "obj" + ] +} diff --git a/lib/node_modules/@stdlib/complex/parse-float32/test/test.js b/lib/node_modules/@stdlib/complex/parse-float32/test/test.js new file mode 100644 index 000000000000..04d0d62bf619 --- /dev/null +++ b/lib/node_modules/@stdlib/complex/parse-float32/test/test.js @@ -0,0 +1,192 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var PINF = require( '@stdlib/constants/float32/pinf' ); +var NINF = require( '@stdlib/constants/float32/ninf' ); +var Complex64 = require( '@stdlib/complex/float32' ); +var isComplex64 = require( '@stdlib/assert/is-complex64' ); +var isSameComplex64 = require( '@stdlib/assert/is-same-complex64' ); +var isNan = require( '@stdlib/math/base/assert/is-nan' ); +var real = require( '@stdlib/complex/real' ); +var imag = require( '@stdlib/complex/imag' ); +var parseComplex64 = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof parseComplex64, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function throws an error for inputs not recognized as complex numbers', function test( t ) { + t.throws( function invalidInput() { + parseComplex64( 'beep boop' ); + }, Error, 'throws an Error for invalid input' ); + t.throws( function invalidType() { + parseComplex64( true ); + }, TypeError, 'throws TypeError for non string input type' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number', function test( t ) { + var z; + var w; + + z = new Complex64( 5.0, 12.0 ); + w = parseComplex64( '5 + 12i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value'); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number (negative values)', function test( t ) { + var z; + var w; + + z = new Complex64( -2.5, -4.0 ); + w = parseComplex64( '-2.5 - 4i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number (only real part)', function test( t ) { + var z; + var w; + + z = new Complex64( 3.0, 0.0 ); + w = parseComplex64( '3' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number (only imaginary part)', function test( t ) { + var z; + var w; + + z = new Complex64( 0.0, 8.5 ); + w = parseComplex64( '8.5i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number (only real part, negative)', function test( t ) { + var z; + var w; + + z = new Complex64( -3.753, 0.0 ); + w = parseComplex64( '-3.753' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number (only imaginary part, negative)', function test( t ) { + var z; + var w; + + z = new Complex64( 0.0, -0.3 ); + w = parseComplex64( '-0.3i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function correctly parses a string representation of a complex number with no space (a+ib format)', function test( t ) { + var z; + var w; + + z = new Complex64( 5.0, 3.0 ); + w = parseComplex64( '5+3i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function correctly parses a string representation of a complex number with unconventional spacing (a+ ib format)', function test( t ) { + var z; + var w; + + z = new Complex64( 5.0, 3.0 ); + w = parseComplex64( '5+ 3i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number with NaNs', function test( t ) { + var w = parseComplex64( 'NaN + NaNi' ); + + t.ok( isComplex64(w), 'is an instance' ); + t.ok( isNan(real( w )), 'has expected property value' ); + t.ok( isNan(imag( w )), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number with Infinity', function test( t ) { + var z; + var w; + + z = new Complex64( PINF, NINF ); + w = parseComplex64( 'Infinity - Infinityi' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); + +tape( 'the function will parse a string representation of a complex number in scientific notation', function test( t ) { + var z; + var w; + + z = new Complex64( 1e3, 4.1e-3 ); + w = parseComplex64( '1E3 + 4.1e-3i' ); + + t.ok( isComplex64( w ), 'is an instance' ); + t.ok( isSameComplex64( w, z ), 'has expected property value' ); + + t.end(); +}); From 5f0a1852d18e1c2afa637a1d8bb7dea20c24b2b6 Mon Sep 17 00:00:00 2001 From: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:59:07 +0530 Subject: [PATCH 2/6] Delete .gitignore Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> --- .gitignore | 188 ----------------------------------------------------- 1 file changed, 188 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 726e0616b52b..000000000000 --- a/.gitignore +++ /dev/null @@ -1,188 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2017 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#/mnt/c/github/stdlib/lib/node_modules/@stdlib/complex/dtype -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# Files # -######### -package.json.copy -.stdlibrc - -# Directories # -############### -build/ -downloads/ -reports/ -tmp/ - -# Compiled source # -################### -*.com -*.class -*.dll -*.o -*.so -*.slo -*.lo -*.obj -*.dylib -*.lai -*.la -*.a -*.lib -*.ko -*.elf -*.node - -# Precompiled headers # -####################### -*.gch -*.pch - -# Executables # -############### -*.exe -*.out -*.app - -# Packages # -############ -# It is better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -Icon? -ehthumbs.db -Thumbs.db -Desktop.ini - -# Temporary files # -################### -*~ - -# Node.js # -########### -/node_modules/ -lib/node_modules/**/node_modules/ -docs/**/node_modules/ -pids -*.pid -*.seed - -# Typescript # -############## -*.tsbuildinfo -lib/node_modules/**/tsconfig.json -lib/node_modules/**/tslint.json - -# Matlab # -########## -*.asv -*.mex* - -# Fortran # -########### -*.mod - -# R # -##### -.Rhistory -.Rapp.history -.Rproj.user/ - -# Python # -########## -__pycache__/ -*.py[cod] -*$py.class -*.egg-info/ - -# TeX # -####### -*.aux -*.lof -*.log -*.lot -*.fls -*.out -*.toc -*.dvi -*-converted-to.* -*.bbl -*.bcf -*.blg -*-blx.aux -*-blx.bib -*.brf -*.run.xml -*.fdb_latexmk -*.synctex -*.synctex.gz -*.synctex.gz(busy) -*.pdfsync -*.alg -*.loa -acs-*.bib -*.thm -*.nav -*.snm -*.vrb -*.acn -*.acr -*.glg -*.glo -*.gls -*-concordance.tex -*.tikz -*-tikzDictionary -*.idx -*.ilg -*.ind -*.ist - -# Visual Studio # -################# -.vscode/ -jsconfig.json - -# Sublime Text # -################ -*.sublime-workspace -*.sublime-project - -# Other editor files # -###################### -.idea/ From fcb501fb25ca5ab289d66d9ad0646e422b1da078 Mon Sep 17 00:00:00 2001 From: "Rejoan(RJ)" Date: Sat, 2 Mar 2024 13:53:25 +0530 Subject: [PATCH 3/6] Revert "Delete .gitignore" This reverts commit 5f0a1852d18e1c2afa637a1d8bb7dea20c24b2b6. --- .gitignore | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..726e0616b52b --- /dev/null +++ b/.gitignore @@ -0,0 +1,188 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2017 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#/mnt/c/github/stdlib/lib/node_modules/@stdlib/complex/dtype +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#/ + +# Files # +######### +package.json.copy +.stdlibrc + +# Directories # +############### +build/ +downloads/ +reports/ +tmp/ + +# Compiled source # +################### +*.com +*.class +*.dll +*.o +*.so +*.slo +*.lo +*.obj +*.dylib +*.lai +*.la +*.a +*.lib +*.ko +*.elf +*.node + +# Precompiled headers # +####################### +*.gch +*.pch + +# Executables # +############### +*.exe +*.out +*.app + +# Packages # +############ +# It is better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Icon? +ehthumbs.db +Thumbs.db +Desktop.ini + +# Temporary files # +################### +*~ + +# Node.js # +########### +/node_modules/ +lib/node_modules/**/node_modules/ +docs/**/node_modules/ +pids +*.pid +*.seed + +# Typescript # +############## +*.tsbuildinfo +lib/node_modules/**/tsconfig.json +lib/node_modules/**/tslint.json + +# Matlab # +########## +*.asv +*.mex* + +# Fortran # +########### +*.mod + +# R # +##### +.Rhistory +.Rapp.history +.Rproj.user/ + +# Python # +########## +__pycache__/ +*.py[cod] +*$py.class +*.egg-info/ + +# TeX # +####### +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.dvi +*-converted-to.* +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.brf +*.run.xml +*.fdb_latexmk +*.synctex +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync +*.alg +*.loa +acs-*.bib +*.thm +*.nav +*.snm +*.vrb +*.acn +*.acr +*.glg +*.glo +*.gls +*-concordance.tex +*.tikz +*-tikzDictionary +*.idx +*.ilg +*.ind +*.ist + +# Visual Studio # +################# +.vscode/ +jsconfig.json + +# Sublime Text # +################ +*.sublime-workspace +*.sublime-project + +# Other editor files # +###################### +.idea/ From 3b4b499b1fab5067504913167f16897de18676d5 Mon Sep 17 00:00:00 2001 From: "Rejoan(RJ)" Date: Sat, 2 Mar 2024 14:21:16 +0530 Subject: [PATCH 4/6] feat: add complex/parse-float32 --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 726e0616b52b..49b206b8bdae 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -#/mnt/c/github/stdlib/lib/node_modules/@stdlib/complex/dtype +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software From 6c1732e283486a31f9e008122d837baf4082c4b4 Mon Sep 17 00:00:00 2001 From: "Rejoan(RJ)" Date: Sat, 2 Mar 2024 15:15:53 +0530 Subject: [PATCH 5/6] feat: add complex/parse-float32 --- lib/node_modules/@stdlib/complex/parse-float32/README.md | 1 + lib/node_modules/@stdlib/complex/parse-float32/lib/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/complex/parse-float32/README.md b/lib/node_modules/@stdlib/complex/parse-float32/README.md index b22c7ea5700d..8026eb219b15 100644 --- a/lib/node_modules/@stdlib/complex/parse-float32/README.md +++ b/lib/node_modules/@stdlib/complex/parse-float32/README.md @@ -45,6 +45,7 @@ var parseComplex64 = require( '@stdlib/complex/parse-float32' ); Parse a string representation of a 64-bit [complex number][@stdlib/complex/float32]. ```javascript +var parseComplex64 = require( '@stdlib/complex/parse-float32' ); var real = require( '@stdlib/complex/real' ); var imag = require( '@stdlib/complex/imag' ); diff --git a/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js b/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js index 0cda92dad66f..6cf871fba48e 100644 --- a/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js +++ b/lib/node_modules/@stdlib/complex/parse-float32/lib/main.js @@ -20,8 +20,8 @@ // MODULES // -var Complex64 = require( '@stdlib/complex/float32' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var Complex64 = require( '@stdlib/complex/float32' ); var replace = require( '@stdlib/string/base/replace' ); var format = require( '@stdlib/string/format' ); From bb5ba553426542536402d709492cc4b4f40cefae Mon Sep 17 00:00:00 2001 From: Pranav <85227306+Pranavchiku@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:55:41 +0530 Subject: [PATCH 6/6] remove extra line Signed-off-by: Pranav <85227306+Pranavchiku@users.noreply.github.com> --- lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt b/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt index b8a41e4e5d05..a63f2014727f 100644 --- a/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt +++ b/lib/node_modules/@stdlib/complex/parse-float32/docs/repl.txt @@ -18,6 +18,5 @@ > var z = {{alias}}( str ) - See Also --------