Skip to content

Commit

Permalink
feat: add blas/tools namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Sep 20, 2024
1 parent dc22190 commit 339ba1b
Show file tree
Hide file tree
Showing 7 changed files with 340 additions and 0 deletions.
85 changes: 85 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!--
@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.
-->

# Tools

> Tools for basic linear algebra subprograms (BLAS).
<section class="usage">

## Usage

```javascript
var ns = require( '@stdlib/blas/tools' );
```

#### ns

Namespace for basic linear algebra subprograms (BLAS) tools.

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

The namespace contains the following:

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

<!-- </toc> -->

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

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

```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/blas/tools' );

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">

</section>

<!-- /.links -->
43 changes: 43 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/docs/types/index.d.ts
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 swapFactory = require( '@stdlib/blas/tools/swap-factory' );

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

/**
* BLAS tools.
*/
declare var ns: Namespace;


// EXPORTS //

export = ns;
29 changes: 29 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/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/blas/tools/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 ) );
51 changes: 51 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* @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 swapFactory
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/blas/tools/swap-factory}
*/
setReadOnly( ns, 'swapFactory', require( '@stdlib/blas/tools/swap-factory' ) );


// EXPORTS //

module.exports = ns;
68 changes: 68 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "@stdlib/blas/tools",
"version": "0.0.0",
"description": "BLAS tools.",
"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": {
"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",
"stdmath",
"stdblas",
"standard",
"library",
"std",
"lib",
"mathematics",
"math",
"blas",
"linear",
"algebra",
"linalg",
"tools",
"utils",
"utilities"
]
}
40 changes: 40 additions & 0 deletions lib/node_modules/@stdlib/blas/tools/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();
});

1 comment on commit 339ba1b

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
blas/dswap $\color{green}116/116$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}116/116$
$\color{green}+100.00\%$
blas/sswap $\color{green}116/116$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}116/116$
$\color{green}+100.00\%$
blas/tools $\color{green}51/51$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}51/51$
$\color{green}+100.00\%$
blas/tools/swap-factory $\color{green}244/244$
$\color{green}+100.00\%$
$\color{red}33/34$
$\color{green}+97.06\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}244/244$
$\color{green}+100.00\%$
blas/tools $\color{green}51/51$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}0/0$
$\color{green}+100.00\%$
$\color{green}51/51$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.