1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.createCompareTextNumber = exports.createCompareText = void 0;
|
7 |
|
8 | var _string = require("../../utils/string");
|
9 |
|
10 | var _factory = require("../../utils/factory");
|
11 |
|
12 | var _algorithm = require("../../type/matrix/utils/algorithm14");
|
13 |
|
14 | var _algorithm2 = require("../../type/matrix/utils/algorithm13");
|
15 |
|
16 | var name = 'compareText';
|
17 | var dependencies = ['typed', 'matrix'];
|
18 | var createCompareText = (0, _factory.factory)(name, dependencies, function (_ref) {
|
19 | var typed = _ref.typed,
|
20 | matrix = _ref.matrix;
|
21 | var algorithm13 = (0, _algorithm2.createAlgorithm13)({
|
22 | typed: typed
|
23 | });
|
24 | var algorithm14 = (0, _algorithm.createAlgorithm14)({
|
25 | typed: typed
|
26 | });
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | var compareText = typed(name, {
|
57 | 'any, any': _string.compareText,
|
58 | 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
|
59 | return algorithm13(x, y, _string.compareText);
|
60 | },
|
61 | 'Array, Array': function ArrayArray(x, y) {
|
62 |
|
63 | return compareText(matrix(x), matrix(y)).valueOf();
|
64 | },
|
65 | 'Array, Matrix': function ArrayMatrix(x, y) {
|
66 |
|
67 | return compareText(matrix(x), y);
|
68 | },
|
69 | 'Matrix, Array': function MatrixArray(x, y) {
|
70 |
|
71 | return compareText(x, matrix(y));
|
72 | },
|
73 | 'DenseMatrix, any': function DenseMatrixAny(x, y) {
|
74 | return algorithm14(x, y, _string.compareText, false);
|
75 | },
|
76 | 'any, DenseMatrix': function anyDenseMatrix(x, y) {
|
77 | return algorithm14(y, x, _string.compareText, true);
|
78 | },
|
79 | 'Array, any': function ArrayAny(x, y) {
|
80 |
|
81 | return algorithm14(matrix(x), y, _string.compareText, false).valueOf();
|
82 | },
|
83 | 'any, Array': function anyArray(x, y) {
|
84 |
|
85 | return algorithm14(matrix(y), x, _string.compareText, true).valueOf();
|
86 | }
|
87 | });
|
88 | return compareText;
|
89 | });
|
90 | exports.createCompareText = createCompareText;
|
91 | var createCompareTextNumber = (0, _factory.factory)(name, ['typed'], function (_ref2) {
|
92 | var typed = _ref2.typed;
|
93 | return typed(name, {
|
94 | 'any, any': _string.compareText
|
95 | });
|
96 | });
|
97 | exports.createCompareTextNumber = createCompareTextNumber; |
\ | No newline at end of file |