@stdlib/dstructs-compact-adjacency-matrix 0.1.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/lib/set_bit.js ADDED
@@ -0,0 +1,43 @@
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
+ 'use strict';
20
+
21
+ // MAIN //
22
+
23
+ /**
24
+ * Sets a bit.
25
+ *
26
+ * @private
27
+ * @param {integer32} value - integer value
28
+ * @param {NonNegativeInteger} i - bit to set
29
+ * @returns {integer32} updated integer value
30
+ *
31
+ * @example
32
+ * var v = setBit( 0, 2 );
33
+ * // returns 4
34
+ */
35
+ function setBit( value, i ) {
36
+ value |= 1 << i;
37
+ return value;
38
+ }
39
+
40
+
41
+ // EXPORTS //
42
+
43
+ module.exports = setBit;
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "@stdlib/dstructs-compact-adjacency-matrix",
3
+ "version": "0.1.0",
4
+ "description": "Compact adjacency matrix.",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "The Stdlib Authors",
8
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "The Stdlib Authors",
13
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14
+ }
15
+ ],
16
+ "main": "./lib",
17
+ "directories": {
18
+ "doc": "./docs",
19
+ "lib": "./lib",
20
+ "dist": "./dist"
21
+ },
22
+ "types": "./docs/types",
23
+ "scripts": {},
24
+ "homepage": "https://stdlib.io",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git://github.com/stdlib-js/dstructs-compact-adjacency-matrix.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/stdlib-js/stdlib/issues"
31
+ },
32
+ "dependencies": {
33
+ "@stdlib/array-int32": "^0.2.2",
34
+ "@stdlib/array-int8": "^0.2.2",
35
+ "@stdlib/assert-has-iterator-symbol-support": "^0.2.2",
36
+ "@stdlib/assert-is-array-like-object": "^0.2.2",
37
+ "@stdlib/assert-is-collection": "^0.2.2",
38
+ "@stdlib/assert-is-function": "^0.2.2",
39
+ "@stdlib/assert-is-nonnegative-integer": "^0.2.2",
40
+ "@stdlib/assert-is-object": "^0.2.2",
41
+ "@stdlib/blas-ext-base-grev": "^0.2.1",
42
+ "@stdlib/boolean-ctor": "^0.2.2",
43
+ "@stdlib/math-base-special-ceil": "^0.2.2",
44
+ "@stdlib/math-base-special-floor": "^0.2.3",
45
+ "@stdlib/string-format": "^0.2.2",
46
+ "@stdlib/symbol-iterator": "^0.2.2",
47
+ "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.2.3",
48
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
49
+ "@stdlib/error-tools-fmtprodmsg": "^0.2.2"
50
+ },
51
+ "devDependencies": {},
52
+ "engines": {
53
+ "node": ">=0.10.0",
54
+ "npm": ">2.7.0"
55
+ },
56
+ "os": [
57
+ "aix",
58
+ "darwin",
59
+ "freebsd",
60
+ "linux",
61
+ "macos",
62
+ "openbsd",
63
+ "sunos",
64
+ "win32",
65
+ "windows"
66
+ ],
67
+ "keywords": [
68
+ "stdlib",
69
+ "data structures",
70
+ "data structure",
71
+ "data",
72
+ "structure",
73
+ "adjacency",
74
+ "matrix",
75
+ "graph",
76
+ "topological",
77
+ "toposort",
78
+ "tsort",
79
+ "dag",
80
+ "directed acyclic graph",
81
+ "directed graph",
82
+ "digraph",
83
+ "cycles"
84
+ ],
85
+ "funding": {
86
+ "type": "opencollective",
87
+ "url": "https://opencollective.com/stdlib"
88
+ }
89
+ }