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