1 | import { bitAndBigNumber } from '../../utils/bignumber/bitwise.js';
|
2 | import { createAlgorithm02 } from '../../type/matrix/utils/algorithm02.js';
|
3 | import { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';
|
4 | import { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';
|
5 | import { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';
|
6 | import { createAlgorithm06 } from '../../type/matrix/utils/algorithm06.js';
|
7 | import { factory } from '../../utils/factory.js';
|
8 | import { bitAndNumber } from '../../plain/number/index.js';
|
9 | var name = 'bitAnd';
|
10 | var dependencies = ['typed', 'matrix', 'equalScalar'];
|
11 | export var createBitAnd = factory(name, dependencies, (_ref) => {
|
12 | var {
|
13 | typed,
|
14 | matrix,
|
15 | equalScalar
|
16 | } = _ref;
|
17 | var algorithm02 = createAlgorithm02({
|
18 | typed,
|
19 | equalScalar
|
20 | });
|
21 | var algorithm06 = createAlgorithm06({
|
22 | typed,
|
23 | equalScalar
|
24 | });
|
25 | var algorithm11 = createAlgorithm11({
|
26 | typed,
|
27 | equalScalar
|
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 | return typed(name, {
|
59 | 'number, number': bitAndNumber,
|
60 | 'BigNumber, BigNumber': bitAndBigNumber,
|
61 | 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {
|
62 | return algorithm06(x, y, this, false);
|
63 | },
|
64 | 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {
|
65 | return algorithm02(y, x, this, true);
|
66 | },
|
67 | 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {
|
68 | return algorithm02(x, y, this, false);
|
69 | },
|
70 | 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
|
71 | return algorithm13(x, y, this);
|
72 | },
|
73 | 'Array, Array': function ArrayArray(x, y) {
|
74 |
|
75 | return this(matrix(x), matrix(y)).valueOf();
|
76 | },
|
77 | 'Array, Matrix': function ArrayMatrix(x, y) {
|
78 |
|
79 | return this(matrix(x), y);
|
80 | },
|
81 | 'Matrix, Array': function MatrixArray(x, y) {
|
82 |
|
83 | return this(x, matrix(y));
|
84 | },
|
85 | 'SparseMatrix, any': function SparseMatrixAny(x, y) {
|
86 | return algorithm11(x, y, this, false);
|
87 | },
|
88 | 'DenseMatrix, any': function DenseMatrixAny(x, y) {
|
89 | return algorithm14(x, y, this, false);
|
90 | },
|
91 | 'any, SparseMatrix': function anySparseMatrix(x, y) {
|
92 | return algorithm11(y, x, this, true);
|
93 | },
|
94 | 'any, DenseMatrix': function anyDenseMatrix(x, y) {
|
95 | return algorithm14(y, x, this, true);
|
96 | },
|
97 | 'Array, any': function ArrayAny(x, y) {
|
98 |
|
99 | return algorithm14(matrix(x), y, this, false).valueOf();
|
100 | },
|
101 | 'any, Array': function anyArray(x, y) {
|
102 |
|
103 | return algorithm14(matrix(y), x, this, true).valueOf();
|
104 | }
|
105 | });
|
106 | }); |
\ | No newline at end of file |