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