1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createDotPow = void 0;
|
7 |
|
8 | var _factory = require("../../utils/factory");
|
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/algorithm11");
|
15 |
|
16 | var _algorithm4 = require("../../type/matrix/utils/algorithm12");
|
17 |
|
18 | var _algorithm5 = require("../../type/matrix/utils/algorithm13");
|
19 |
|
20 | var _algorithm6 = require("../../type/matrix/utils/algorithm14");
|
21 |
|
22 | var name = 'dotPow';
|
23 | var dependencies = ['typed', 'equalScalar', 'matrix', 'pow', 'DenseMatrix'];
|
24 | var createDotPow = (0, _factory.factory)(name, dependencies, function (_ref) {
|
25 | var typed = _ref.typed,
|
26 | equalScalar = _ref.equalScalar,
|
27 | matrix = _ref.matrix,
|
28 | pow = _ref.pow,
|
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 algorithm11 = (0, _algorithm3.createAlgorithm11)({
|
38 | typed: typed,
|
39 | equalScalar: equalScalar
|
40 | });
|
41 | var algorithm12 = (0, _algorithm4.createAlgorithm12)({
|
42 | typed: typed,
|
43 | DenseMatrix: DenseMatrix
|
44 | });
|
45 | var algorithm13 = (0, _algorithm5.createAlgorithm13)({
|
46 | typed: typed
|
47 | });
|
48 | var algorithm14 = (0, _algorithm6.createAlgorithm14)({
|
49 | typed: typed
|
50 | });
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | var dotPow = typed(name, {
|
76 | 'any, any': pow,
|
77 | 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {
|
78 | return algorithm07(x, y, pow, false);
|
79 | },
|
80 | 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {
|
81 | return algorithm03(y, x, pow, true);
|
82 | },
|
83 | 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {
|
84 | return algorithm03(x, y, pow, false);
|
85 | },
|
86 | 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
|
87 | return algorithm13(x, y, pow);
|
88 | },
|
89 | 'Array, Array': function ArrayArray(x, y) {
|
90 |
|
91 | return dotPow(matrix(x), matrix(y)).valueOf();
|
92 | },
|
93 | 'Array, Matrix': function ArrayMatrix(x, y) {
|
94 |
|
95 | return dotPow(matrix(x), y);
|
96 | },
|
97 | 'Matrix, Array': function MatrixArray(x, y) {
|
98 |
|
99 | return dotPow(x, matrix(y));
|
100 | },
|
101 | 'SparseMatrix, any': function SparseMatrixAny(x, y) {
|
102 | return algorithm11(x, y, dotPow, false);
|
103 | },
|
104 | 'DenseMatrix, any': function DenseMatrixAny(x, y) {
|
105 | return algorithm14(x, y, dotPow, false);
|
106 | },
|
107 | 'any, SparseMatrix': function anySparseMatrix(x, y) {
|
108 | return algorithm12(y, x, dotPow, true);
|
109 | },
|
110 | 'any, DenseMatrix': function anyDenseMatrix(x, y) {
|
111 | return algorithm14(y, x, dotPow, true);
|
112 | },
|
113 | 'Array, any': function ArrayAny(x, y) {
|
114 |
|
115 | return algorithm14(matrix(x), y, dotPow, false).valueOf();
|
116 | },
|
117 | 'any, Array': function anyArray(x, y) {
|
118 |
|
119 | return algorithm14(matrix(y), x, dotPow, true).valueOf();
|
120 | }
|
121 | });
|
122 | return dotPow;
|
123 | });
|
124 | exports.createDotPow = createDotPow; |
\ | No newline at end of file |