@univerjs/engine-formula 0.2.14 → 0.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/lib/cjs/index.js +2 -2
  2. package/lib/es/index.js +2744 -886
  3. package/lib/types/basics/engineering.d.ts +2 -0
  4. package/lib/types/basics/statistical.d.ts +32 -0
  5. package/lib/types/engine/reference-object/base-reference-object.d.ts +1 -1
  6. package/lib/types/engine/utils/compare.d.ts +11 -3
  7. package/lib/types/engine/value-object/array-value-object.d.ts +12 -1
  8. package/lib/types/engine/value-object/lambda-value-object.d.ts +2 -2
  9. package/lib/types/functions/base-function.d.ts +6 -6
  10. package/lib/types/functions/compatibility/betadist/__tests__/index.spec.d.ts +16 -0
  11. package/lib/types/functions/compatibility/betadist/index.d.ts +8 -0
  12. package/lib/types/functions/compatibility/normsdist/__tests__/index.spec.d.ts +16 -0
  13. package/lib/types/functions/compatibility/normsdist/index.d.ts +8 -0
  14. package/lib/types/functions/logical/bycol/index.d.ts +3 -1
  15. package/lib/types/functions/logical/byrow/index.d.ts +3 -1
  16. package/lib/types/functions/logical/map/index.d.ts +3 -1
  17. package/lib/types/functions/logical/reduce/index.d.ts +3 -1
  18. package/lib/types/functions/logical/scan/index.d.ts +3 -1
  19. package/lib/types/functions/lookup/offset/index.d.ts +1 -1
  20. package/lib/types/functions/lookup/xlookup/index.d.ts +8 -2
  21. package/lib/types/functions/lookup/xmatch/index.d.ts +1 -2
  22. package/lib/types/functions/math/function-map.d.ts +1 -1
  23. package/lib/types/functions/statistical/beta-dist/__tests__/index.spec.d.ts +16 -0
  24. package/lib/types/functions/statistical/beta-dist/index.d.ts +8 -0
  25. package/lib/types/functions/statistical/beta-inv/__tests__/index.spec.d.ts +16 -0
  26. package/lib/types/functions/statistical/beta-inv/index.d.ts +8 -0
  27. package/lib/types/functions/statistical/binom-dist/__tests__/index.spec.d.ts +16 -0
  28. package/lib/types/functions/statistical/binom-dist/index.d.ts +8 -0
  29. package/lib/types/functions/statistical/binom-dist-range/__tests__/index.spec.d.ts +16 -0
  30. package/lib/types/functions/statistical/binom-dist-range/index.d.ts +8 -0
  31. package/lib/types/functions/statistical/binom-inv/__tests__/index.spec.d.ts +16 -0
  32. package/lib/types/functions/statistical/binom-inv/index.d.ts +8 -0
  33. package/lib/types/functions/statistical/chisq-dist/__tests__/index.spec.d.ts +16 -0
  34. package/lib/types/functions/statistical/chisq-dist/index.d.ts +8 -0
  35. package/lib/types/functions/statistical/chisq-dist-rt/__tests__/index.spec.d.ts +16 -0
  36. package/lib/types/functions/statistical/chisq-dist-rt/index.d.ts +8 -0
  37. package/lib/types/functions/statistical/chisq-inv/__tests__/index.spec.d.ts +16 -0
  38. package/lib/types/functions/statistical/chisq-inv/index.d.ts +8 -0
  39. package/lib/types/functions/statistical/chisq-inv-rt/__tests__/index.spec.d.ts +16 -0
  40. package/lib/types/functions/statistical/chisq-inv-rt/index.d.ts +8 -0
  41. package/lib/types/functions/statistical/chisq-test/__tests__/index.spec.d.ts +16 -0
  42. package/lib/types/functions/statistical/chisq-test/index.d.ts +8 -0
  43. package/lib/types/functions/statistical/confidence-norm/__tests__/index.spec.d.ts +16 -0
  44. package/lib/types/functions/statistical/confidence-norm/index.d.ts +7 -0
  45. package/lib/types/functions/statistical/confidence-t/__tests__/index.spec.d.ts +16 -0
  46. package/lib/types/functions/statistical/confidence-t/index.d.ts +7 -0
  47. package/lib/types/functions/statistical/correl/__tests__/index.spec.d.ts +16 -0
  48. package/lib/types/functions/statistical/correl/index.d.ts +8 -0
  49. package/lib/types/functions/statistical/covariance-p/__tests__/index.spec.d.ts +16 -0
  50. package/lib/types/functions/statistical/covariance-p/index.d.ts +8 -0
  51. package/lib/types/functions/statistical/covariance-s/__tests__/index.spec.d.ts +16 -0
  52. package/lib/types/functions/statistical/covariance-s/index.d.ts +8 -0
  53. package/lib/types/functions/statistical/devsq/__tests__/index.spec.d.ts +16 -0
  54. package/lib/types/functions/statistical/devsq/index.d.ts +8 -0
  55. package/lib/types/functions/statistical/expon-dist/__tests__/index.spec.d.ts +16 -0
  56. package/lib/types/functions/statistical/expon-dist/index.d.ts +8 -0
  57. package/lib/types/functions/statistical/f-dist/__tests__/index.spec.d.ts +16 -0
  58. package/lib/types/functions/statistical/f-dist/index.d.ts +8 -0
  59. package/lib/types/functions/statistical/f-dist-rt/__tests__/index.spec.d.ts +16 -0
  60. package/lib/types/functions/statistical/f-dist-rt/index.d.ts +8 -0
  61. package/lib/types/functions/statistical/f-inv/__tests__/index.spec.d.ts +16 -0
  62. package/lib/types/functions/statistical/f-inv/index.d.ts +8 -0
  63. package/lib/types/functions/statistical/f-inv-rt/__tests__/index.spec.d.ts +16 -0
  64. package/lib/types/functions/statistical/f-inv-rt/index.d.ts +8 -0
  65. package/lib/types/functions/statistical/f-test/__tests__/index.spec.d.ts +16 -0
  66. package/lib/types/functions/statistical/f-test/index.d.ts +8 -0
  67. package/lib/types/functions/statistical/fisher/__tests__/index.spec.d.ts +16 -0
  68. package/lib/types/functions/statistical/fisher/index.d.ts +8 -0
  69. package/lib/types/functions/statistical/fisherinv/__tests__/index.spec.d.ts +16 -0
  70. package/lib/types/functions/statistical/fisherinv/index.d.ts +8 -0
  71. package/lib/types/functions/statistical/forecast/__tests__/index.spec.d.ts +16 -0
  72. package/lib/types/functions/statistical/forecast/index.d.ts +8 -0
  73. package/lib/types/functions/statistical/function-map.d.ts +1 -1
  74. package/lib/types/functions/statistical/intercept/__tests__/index.spec.d.ts +16 -0
  75. package/lib/types/functions/statistical/intercept/index.d.ts +8 -0
  76. package/lib/types/functions/statistical/norm-dist/__tests__/index.spec.d.ts +16 -0
  77. package/lib/types/functions/statistical/norm-dist/index.d.ts +8 -0
  78. package/lib/types/functions/statistical/norm-inv/__tests__/index.spec.d.ts +16 -0
  79. package/lib/types/functions/statistical/norm-inv/index.d.ts +8 -0
  80. package/lib/types/functions/statistical/norm-s-dist/__tests__/index.spec.d.ts +16 -0
  81. package/lib/types/functions/statistical/norm-s-dist/index.d.ts +8 -0
  82. package/lib/types/functions/statistical/norm-s-inv/__tests__/index.spec.d.ts +16 -0
  83. package/lib/types/functions/statistical/norm-s-inv/index.d.ts +8 -0
  84. package/lib/types/functions/text/function-map.d.ts +1 -1
  85. package/lib/types/functions/text/leftb/__test__/index.spec.d.ts +16 -0
  86. package/lib/types/functions/text/leftb/index.d.ts +9 -0
  87. package/lib/types/functions/text/mid/__test__/index.spec.d.ts +16 -0
  88. package/lib/types/functions/text/mid/index.d.ts +8 -0
  89. package/lib/types/functions/text/textafter/index.d.ts +2 -1
  90. package/lib/types/functions/text/textbefore/index.d.ts +2 -1
  91. package/lib/types/index.d.ts +13 -13
  92. package/lib/umd/index.js +2 -2
  93. package/package.json +8 -8
@@ -23,3 +23,5 @@ export declare function isValidBinaryNumber(number: string): boolean;
23
23
  export declare function isValidOctalNumber(number: string): boolean;
24
24
  export declare function isValidHexadecimalNumber(number: string): boolean;
25
25
  export declare function erf(x: number): number;
26
+ export declare function erfc(x: number): number;
27
+ export declare function erfcINV(p: number): number;
@@ -0,0 +1,32 @@
1
+ import { BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
2
+ export declare function betaCDF(x: number, alpha: number, beta: number): number;
3
+ export declare function betaPDF(x: number, alpha: number, beta: number): number;
4
+ export declare function betaINV(probability: number, alpha: number, beta: number): number;
5
+ export declare function binomialCDF(x: number, trials: number, probability: number): number;
6
+ export declare function binomialPDF(x: number, trials: number, probability: number): number;
7
+ export declare function chisquareCDF(x: number, degFreedom: number): number;
8
+ export declare function chisquarePDF(x: number, degFreedom: number): number;
9
+ export declare function chisquareINV(probability: number, degFreedom: number): number;
10
+ export declare function studentTINV(probability: number, degFreedom: number): number;
11
+ export declare function exponentialCDF(x: number, lambda: number): number;
12
+ export declare function exponentialPDF(x: number, lambda: number): number;
13
+ export declare function centralFCDF(x: number, degFreedom1: number, degFreedom2: number): number;
14
+ export declare function centralFPDF(x: number, degFreedom1: number, degFreedom2: number): number;
15
+ export declare function centralFINV(probability: number, degFreedom1: number, degFreedom2: number): number;
16
+ export declare function forecastLinear(x: number, knownYs: number[], knownXs: number[]): number;
17
+ export declare function normalCDF(x: number, mean: number, standardDev: number): number;
18
+ export declare function normalPDF(x: number, mean: number, standardDev: number): number;
19
+ export declare function normalINV(probability: number, mean: number, standardDev: number): number;
20
+ export declare function getTwoArrayNumberValues(array1: BaseValueObject, array2: BaseValueObject, count: number, array1ColumnCount: number, array2ColumnCount: number): {
21
+ isError: boolean;
22
+ errorObject: ErrorValueObject;
23
+ array1Values: number[];
24
+ array2Values: number[];
25
+ noCalculate: boolean;
26
+ } | {
27
+ isError: boolean;
28
+ errorObject: null;
29
+ array1Values: number[];
30
+ array2Values: number[];
31
+ noCalculate: boolean;
32
+ };
@@ -96,7 +96,7 @@ export declare class BaseReferenceObject extends ObjectClassType {
96
96
  getCurrentRuntimeSheetData(): import('@univerjs/core').ObjectMatrix<Nullable<ICellData>> | undefined;
97
97
  getCurrentActiveArrayFormulaCellData(): import('@univerjs/core').ObjectMatrix<Nullable<ICellData>> | undefined;
98
98
  getCurrentRuntimeActiveArrayFormulaCellData(): import('@univerjs/core').ObjectMatrix<Nullable<ICellData>> | undefined;
99
- getCellData(row: number, column: number): ICellData;
99
+ getCellData(row: number, column: number): Nullable<ICellData>;
100
100
  getRuntimeFeatureCellValue(row: number, column: number): ICellData | undefined;
101
101
  getCellByPosition(row?: number, column?: number): ErrorValueObject | NullValueObject | NumberValueObject | import('../..').BooleanValueObject | StringValueObject | ArrayValueObject;
102
102
  /**
@@ -1,11 +1,17 @@
1
1
  import { compareToken } from '../../basics/token';
2
+ /**
3
+ * For SearchType
4
+ */
2
5
  export declare enum ArrayBinarySearchType {
3
- MIN = 0,
6
+ MIN = 0,// Ascending order
4
7
  MAX = 1
5
8
  }
9
+ /**
10
+ * For MatchType
11
+ */
6
12
  export declare enum ArrayOrderSearchType {
7
- NORMAL = 0,
8
- MIN = 1,
13
+ NORMAL = 0,// Exact match.
14
+ MIN = 1,// Exact match. If none found, return the next smaller item.
9
15
  MAX = 2
10
16
  }
11
17
  export declare function getCompare(): (x: string, y: string) => number;
@@ -14,3 +20,5 @@ export declare function isMatchWildcard(currentValue: string, value: string): bo
14
20
  export declare function replaceWildcard(value: string): string;
15
21
  export declare function compareWithWildcard(currentValue: string, value: string, operator: compareToken): boolean;
16
22
  export declare function escapeRegExp(str: string): string;
23
+ export declare function getMatchModeValue(matchModeValue: number): ArrayOrderSearchType;
24
+ export declare function getSearchModeValue(searchModeValue: number): ArrayBinarySearchType;
@@ -117,7 +117,18 @@ export declare class ArrayValueObject extends BaseValueObject {
117
117
  row: number;
118
118
  column: number;
119
119
  } | null;
120
- binarySearch(valueObject: BaseValueObject, searchType?: ArrayBinarySearchType): number | undefined;
120
+ binarySearch(valueObject: BaseValueObject, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): number | undefined;
121
+ /**
122
+ * searchType defaults to ascending order
123
+ *
124
+ * matchType defaults to the maximum value less than the search value, which is used for the default matching mode of VLOOKUP/LOOKUP/HLOOKUP.
125
+ * @param valueObject
126
+ * @param searchArray
127
+ * @param positionArray
128
+ * @param searchType
129
+ * @param matchType
130
+ * @returns
131
+ */
121
132
  private _binarySearch;
122
133
  sum(): BaseValueObject;
123
134
  max(): BaseValueObject;
@@ -1,4 +1,4 @@
1
- import { AsyncObject } from '../reference-object/base-reference-object';
1
+ import { AsyncObject, FunctionVariantType } from '../reference-object/base-reference-object';
2
2
  import { BaseValueObject } from './base-value-object';
3
3
  import { BaseAstNode } from '../ast-node/base-ast-node';
4
4
  import { Interpreter } from '../interpreter/interpreter';
@@ -10,7 +10,7 @@ export declare class LambdaValueObjectObject extends BaseValueObject {
10
10
  private _lambdaPrivacyValueMap;
11
11
  constructor(_lambdaNode: BaseAstNode, _interpreter: Interpreter, _lambdaPrivacyVarKeys: string[]);
12
12
  isLambda(): boolean;
13
- execute(...variants: BaseValueObject[]): BaseValueObject | AsyncObject;
13
+ execute(...variants: FunctionVariantType[]): BaseValueObject | AsyncObject;
14
14
  private _setLambdaNodeValue;
15
15
  private _setLambdaPrivacyValueMap;
16
16
  getLambdaPrivacyVarKeys(): string[];
@@ -1,10 +1,10 @@
1
- import { IRange, Nullable, Disposable } from '@univerjs/core';
1
+ import { Disposable, IRange, Nullable } from '@univerjs/core';
2
+ import { ArrayOrderSearchType, ArrayBinarySearchType } from '../engine/utils/compare';
3
+ import { BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
4
+ import { PrimitiveValueType } from '../engine/value-object/primitive-object';
2
5
  import { IFunctionNames } from '../basics/function';
3
6
  import { BaseReferenceObject, FunctionVariantType, NodeValueType } from '../engine/reference-object/base-reference-object';
4
- import { ArrayBinarySearchType, ArrayOrderSearchType } from '../engine/utils/compare';
5
7
  import { ArrayValueObject } from '../engine/value-object/array-value-object';
6
- import { BaseValueObject, ErrorValueObject } from '../engine/value-object/base-value-object';
7
- import { PrimitiveValueType } from '../engine/value-object/primitive-object';
8
8
  import { IDefinedNameMapItem } from '../services/defined-names.service';
9
9
  export declare class BaseFunction extends Disposable {
10
10
  private _name;
@@ -76,13 +76,13 @@ export declare class BaseFunction extends Disposable {
76
76
  * @param logicValueObject
77
77
  */
78
78
  getMatchTypeValue(logicValueObject?: BaseValueObject): number | undefined;
79
- binarySearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayBinarySearchType): BaseValueObject;
79
+ binarySearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): BaseValueObject;
80
80
  private _getOneFirstByRaw;
81
81
  private _getOneLastByRaw;
82
82
  equalSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
83
83
  fuzzySearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
84
84
  orderSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean): BaseValueObject;
85
- binarySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, axis?: number, searchType?: ArrayBinarySearchType): ErrorValueObject | ArrayValueObject | undefined;
85
+ binarySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, axis?: number, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): ErrorValueObject | ArrayValueObject | undefined;
86
86
  equalSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
87
87
  fuzzySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
88
88
  orderSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class Betadist extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(x: BaseValueObject, alpha: BaseValueObject, beta: BaseValueObject, A?: BaseValueObject, B?: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseFunction } from '../../base-function';
2
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
+ export declare class Normsdist extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(z: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -1,7 +1,9 @@
1
1
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
2
  import { BaseFunction } from '../../base-function';
3
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
4
  export declare class Bycol extends BaseFunction {
4
5
  minParams: number;
5
6
  maxParams: number;
6
- calculate(array: BaseValueObject, lambda: BaseValueObject): BaseValueObject;
7
+ needsReferenceObject: boolean;
8
+ calculate(array: FunctionVariantType, lambda: BaseValueObject): BaseValueObject;
7
9
  }
@@ -1,7 +1,9 @@
1
1
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
2
  import { BaseFunction } from '../../base-function';
3
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
4
  export declare class Byrow extends BaseFunction {
4
5
  minParams: number;
5
6
  maxParams: number;
6
- calculate(array: BaseValueObject, lambda: BaseValueObject): BaseValueObject;
7
+ needsReferenceObject: boolean;
8
+ calculate(array: FunctionVariantType, lambda: BaseValueObject): BaseValueObject;
7
9
  }
@@ -1,8 +1,10 @@
1
1
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
2
  import { BaseFunction } from '../../base-function';
3
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
4
  export declare class Map extends BaseFunction {
4
5
  minParams: number;
5
6
  maxParams: number;
6
- calculate(...variants: BaseValueObject[]): BaseValueObject;
7
+ needsReferenceObject: boolean;
8
+ calculate(...variants: FunctionVariantType[]): BaseValueObject;
7
9
  private _getResultArray;
8
10
  }
@@ -1,8 +1,10 @@
1
1
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
2
  import { BaseFunction } from '../../base-function';
3
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
4
  export declare class Reduce extends BaseFunction {
4
5
  minParams: number;
5
6
  maxParams: number;
6
- calculate(initialValue: BaseValueObject, array: BaseValueObject, lambda: BaseValueObject): BaseValueObject;
7
+ needsReferenceObject: boolean;
8
+ calculate(initialValue: FunctionVariantType, array: FunctionVariantType, lambda: BaseValueObject): BaseValueObject;
7
9
  private _handleSingleValueObject;
8
10
  }
@@ -1,8 +1,10 @@
1
1
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
2
  import { BaseFunction } from '../../base-function';
3
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
4
  export declare class Scan extends BaseFunction {
4
5
  minParams: number;
5
6
  maxParams: number;
6
- calculate(initialValue: BaseValueObject, array: BaseValueObject, lambda: BaseValueObject): BaseValueObject;
7
+ needsReferenceObject: boolean;
8
+ calculate(initialValue: FunctionVariantType, array: FunctionVariantType, lambda: BaseValueObject): BaseValueObject;
7
9
  private _getResult;
8
10
  }
@@ -1,5 +1,5 @@
1
- import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
2
1
  import { BaseFunction } from '../../base-function';
2
+ import { FunctionVariantType } from '../../../engine/reference-object/base-reference-object';
3
3
  export declare class Offset extends BaseFunction {
4
4
  minParams: number;
5
5
  maxParams: number;
@@ -1,6 +1,6 @@
1
+ import { BaseFunction } from '../../base-function';
1
2
  import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
3
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
- import { BaseFunction } from '../../base-function';
4
4
  export declare class Xlookup extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
@@ -8,5 +8,11 @@ export declare class Xlookup extends BaseFunction {
8
8
  private _getResult;
9
9
  private _handleExpandObject;
10
10
  private _handleSingleObject;
11
- private _getSearchModeValue;
11
+ /**
12
+ * Wildcard matching and binary search cannot appear at the same time
13
+ * @param matchModeValue
14
+ * @param searchModeValue
15
+ * @returns
16
+ */
17
+ private _checkErrorCombination;
12
18
  }
@@ -1,10 +1,9 @@
1
+ import { BaseFunction } from '../../base-function';
1
2
  import { ArrayValueObject } from '../../../engine/value-object/array-value-object';
2
3
  import { BaseValueObject } from '../../../engine/value-object/base-value-object';
3
- import { BaseFunction } from '../../base-function';
4
4
  export declare class Xmatch extends BaseFunction {
5
5
  minParams: number;
6
6
  maxParams: number;
7
7
  calculate(lookupValue: BaseValueObject, lookupArray: ArrayValueObject, matchMode?: BaseValueObject, searchMode?: BaseValueObject): BaseValueObject;
8
8
  private _handleSingleObject;
9
- private _getSearchModeValue;
10
9
  }
@@ -1,5 +1,5 @@
1
- import { FUNCTION_NAMES_MATH } from './function-names';
2
1
  import { Base } from './base';
2
+ import { FUNCTION_NAMES_MATH } from './function-names';
3
3
  import { Randarray } from './randarray';
4
4
  import { Subtotal } from './subtotal';
5
5
  import { Sum } from './sum';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class BetaDist extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(x: BaseValueObject, alpha: BaseValueObject, beta: BaseValueObject, cumulative: BaseValueObject, A?: BaseValueObject, B?: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class BetaInv extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(probability: BaseValueObject, alpha: BaseValueObject, beta: BaseValueObject, A?: BaseValueObject, B?: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class BinomDist extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(numberS: BaseValueObject, trials: BaseValueObject, probabilityS: BaseValueObject, cumulative: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class BinomDistRange extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(trials: BaseValueObject, probabilityS: BaseValueObject, numberS: BaseValueObject, numberS2?: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class BinomInv extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(trials: BaseValueObject, probabilityS: BaseValueObject, alpha: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ChisqDist extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(x: BaseValueObject, degFreedom: BaseValueObject, cumulative: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ChisqDistRt extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(x: BaseValueObject, degFreedom: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ChisqInv extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(probability: BaseValueObject, degFreedom: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ChisqInvRt extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(probability: BaseValueObject, degFreedom: BaseValueObject): BaseValueObject;
7
+ private _handleSignleObject;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ChisqTest extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(actualRange: BaseValueObject, expectedRange: BaseValueObject): BaseValueObject;
7
+ private _getResult;
8
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -0,0 +1,7 @@
1
+ import { BaseValueObject } from '../../../engine/value-object/base-value-object';
2
+ import { BaseFunction } from '../../base-function';
3
+ export declare class ConfidenceNorm extends BaseFunction {
4
+ minParams: number;
5
+ maxParams: number;
6
+ calculate(alpha: BaseValueObject, standardDev: BaseValueObject, size: BaseValueObject): BaseValueObject;
7
+ }