ArraySizePredictor
Class
Constructors
Section titled “Constructors”constructor
Section titled “constructor”+ new ArraySizePredictor(config: Config, functionRegistry: FunctionRegistry): ArraySizePredictor
Defined in hyperformula/src/ArraySize.ts:45
Parameters:
| Name | Type |
|---|---|
config |
Config |
functionRegistry |
FunctionRegistry |
Returns: ArraySizePredictor
Methods
Section titled “Methods”checkArraySize
Section titled “checkArraySize”▸ checkArraySize(ast: Ast, formulaAddress: SimpleCellAddress): ArraySize
Defined in hyperformula/src/ArraySize.ts:54
Parameters:
| Name | Type |
|---|---|
ast |
Ast |
formulaAddress |
SimpleCellAddress |
Returns: ArraySize
checkArraySizeForAst
Section titled “checkArraySizeForAst”▸ checkArraySizeForAst(ast: Ast, state: InterpreterState): ArraySize
Defined in hyperformula/src/ArraySize.ts:58
Parameters:
| Name | Type |
|---|---|
ast |
Ast |
state |
InterpreterState |
Returns: ArraySize
isSizeKnownBeforeEvaluation
Section titled “isSizeKnownBeforeEvaluation”▸ isSizeKnownBeforeEvaluation(ast: Ast, state: InterpreterState): boolean
Defined in hyperformula/src/ArraySize.ts:140
Says whether the size predicted for ast by checkArraySizeForAst is the size of its value, so that a result
area can be reserved from it. It is not when the size is computed from a named expression, which is sized as one cell
while its value can be a range of any size and can be redefined after the formula is placed, or from a function call
whose own size method returns ArraySize.error(), such as SEQUENCE(A1), whose result size depends on cell values.
Arguments that do not determine the size of a call, such as the ranges SUM adds up, are not checked.
Parameters:
| Name | Type | Description |
|---|---|---|
ast |
Ast | the AST whose size is predicted |
state |
InterpreterState | the state its size is predicted in |
Returns: boolean