Skip to content

Commit

Permalink
feat: add complex/float32/base namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jul 18, 2024
1 parent d9edc48 commit 21604d0
Show file tree
Hide file tree
Showing 7 changed files with 355 additions and 0 deletions.
97 changes: 97 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!--
@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.
-->

# Complex64

> Base (i.e., lower-level) single-precision complex floating-point number functions.
<section class="usage">

## Usage

```javascript
var complex = require( '@stdlib/complex/float32/base' );
```

#### complex

Namespace containing base (i.e., lower-level) single-precision complex floating-point number functions.

```javascript
var ns = complex;
// returns {...}
```

The namespace contains the following functions:

<!-- <toc pattern="*"> -->

<!-- </toc> -->

</section>

<!-- /.usage -->

<!-- Package notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

<!-- eslint no-undef: "error" -->

```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/complex/float32/base' );

console.log( objectKeys( ns ) );
```

</section>

<!-- /.examples -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

<!-- <toc-links> -->

<!-- </toc-links> -->

</section>

<!-- /.links -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* @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

/* eslint-disable max-lines */

import add = require( '@stdlib/complex/float32/base/add' );

/**
* Interface describing the namespace.
*/
interface Namespace {
/**
* TODO
*/
add: typeof add;
}

/**
* Base (i.e., lower-level) single-precision complex floating-point number functions.
*/
declare var ns: Namespace;


// EXPORTS //

export = ns;
29 changes: 29 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/docs/types/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* @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.
*/

/* eslint-disable @typescript-eslint/no-unused-expressions */

import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
ns; // $ExpectType Namespace
}
24 changes: 24 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/examples/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @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 objectKeys = require( '@stdlib/utils/keys' );
var ns = require( './../lib' );

console.log( objectKeys( ns ) );
60 changes: 60 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* @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';

/*
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );


// MAIN //

/**
* Top-level namespace.
*
* @namespace ns
*/
var ns = {};

/**
* @name add
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/add}
*/
setReadOnly( ns, 'add', require( '@stdlib/complex/float32/base/add' ) );

/**
* @name mul
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/complex/float32/base/mul}
*/
setReadOnly( ns, 'mul', require( '@stdlib/complex/float32/base/mul' ) );


// EXPORTS //

module.exports = ns;
62 changes: 62 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@stdlib/complex/float32/base",
"version": "0.0.0",
"description": "Base (i.e., lower-level) single-precision complex number functions.",
"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/index.js",
"directories": {
"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",
"types",
"complex",
"cmplx",
"number",
"namespace",
"ns",
"float32",
"base"
]
}
40 changes: 40 additions & 0 deletions lib/node_modules/@stdlib/complex/float32/base/test/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @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 objectKeys = require( '@stdlib/utils/keys' );
var ns = require( './../lib' );


// TESTS //

tape( 'main export is an object', function test( t ) {
t.ok( true, __filename );
t.strictEqual( typeof ns, 'object', 'main export is an object' );
t.end();
});

tape( 'the exported object contains key-value pairs', function test( t ) {
var keys = objectKeys( ns );
t.equal( keys.length > 0, true, 'has keys' );
t.end();
});

0 comments on commit 21604d0

Please sign in to comment.