1 | import { bitOrBigNumber } from '../../utils/bignumber/bitwise.js';
|
2 | import { factory } from '../../utils/factory.js';
|
3 | import { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';
|
4 | import { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';
|
5 | import { createAlgorithm10 } from '../../type/matrix/utils/algorithm10.js';
|
6 | import { createAlgorithm04 } from '../../type/matrix/utils/algorithm04.js';
|
7 | import { createAlgorithm01 } from '../../type/matrix/utils/algorithm01.js';
|
8 | import { bitOrNumber } from '../../plain/number/index.js';
|
9 | var name = 'bitOr';
|
10 | var dependencies = ['typed', 'matrix', 'equalScalar', 'DenseMatrix'];
|
11 | export var createBitOr = factory(name, dependencies, (_ref) => {
|
12 | var {
|
13 | typed,
|
14 | matrix,
|
15 | equalScalar,
|
16 | DenseMatrix
|
17 | } = _ref;
|
18 | var algorithm01 = createAlgorithm01({
|
19 | typed
|
20 | });
|
21 | var algorithm04 = createAlgorithm04({
|
22 | typed,
|
23 | equalScalar
|
24 | });
|
25 | var algorithm10 = createAlgorithm10({
|
26 | typed,
|
27 | DenseMatrix
|
28 | });
|
29 | var algorithm13 = createAlgorithm13({
|
30 | typed
|
31 | });
|
32 | var algorithm14 = createAlgorithm14({
|
33 | typed
|
34 | });
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | return typed(name, {
|
60 | 'number, number': bitOrNumber,
|
61 | 'BigNumber, BigNumber': bitOrBigNumber,
|
62 | 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {
|
63 | return algorithm04(x, y, this);
|
64 | },
|
65 | 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {
|
66 | return algorithm01(y, x, this, true);
|
67 | },
|
68 | 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {
|
69 | return algorithm01(x, y, this, false);
|
70 | },
|
71 | 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
|
72 | return algorithm13(x, y, this);
|
73 | },
|
74 | 'Array, Array': function ArrayArray(x, y) {
|
75 |
|
76 | return this(matrix(x), matrix(y)).valueOf();
|
77 | },
|
78 | 'Array, Matrix': function ArrayMatrix(x, y) {
|
79 |
|
80 | return this(matrix(x), y);
|
81 | },
|
82 | 'Matrix, Array': function MatrixArray(x, y) {
|
83 |
|
84 | return this(x, matrix(y));
|
85 | },
|
86 | 'SparseMatrix, any': function SparseMatrixAny(x, y) {
|
87 | return algorithm10(x, y, this, false);
|
88 | },
|
89 | 'DenseMatrix, any': function DenseMatrixAny(x, y) {
|
90 | return algorithm14(x, y, this, false);
|
91 | },
|
92 | 'any, SparseMatrix': function anySparseMatrix(x, y) {
|
93 | return algorithm10(y, x, this, true);
|
94 | },
|
95 | 'any, DenseMatrix': function anyDenseMatrix(x, y) {
|
96 | return algorithm14(y, x, this, true);
|
97 | },
|
98 | 'Array, any': function ArrayAny(x, y) {
|
99 |
|
100 | return algorithm14(matrix(x), y, this, false).valueOf();
|
101 | },
|
102 | 'any, Array': function anyArray(x, y) {
|
103 |
|
104 | return algorithm14(matrix(y), x, this, true).valueOf();
|
105 | }
|
106 | });
|
107 | }); |
\ | No newline at end of file |