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