# ArraySizePredictor

## Constructors

### constructor 

\+ **new ArraySizePredictor**(`config`: [Config](config.md), `functionRegistry`: FunctionRegistry): *[ArraySizePredictor](arraysizepredictor.md)*

*Defined in [src/ArraySize.ts:50](https://github.com/handsontable/hyperformula/blob/ea75425/src/ArraySize.ts#L50)*

**Parameters:**

Name | Type |
------ | ------ |
`config` | [Config](config.md) |
`functionRegistry` | FunctionRegistry |

**Returns:** *[ArraySizePredictor](arraysizepredictor.md)*

## Methods

### checkArraySize 

▸ **checkArraySize**(`ast`: Ast, `formulaAddress`: [SimpleCellAddress](../interfaces/simplecelladdress.md)): *[ArraySize](arraysize.md)*

*Defined in [src/ArraySize.ts:64](https://github.com/handsontable/hyperformula/blob/ea75425/src/ArraySize.ts#L64)*

Limits the predicted spill area before the dependency graph maps its cells.
A scalar fallback still evaluates the formula, so runtime allocation guards
determine the error and also protect intermediate arrays.
Infinite dimensions represent whole-row or whole-column references, whose
effective size is resolved by the dependency graph.

**Parameters:**

Name | Type |
------ | ------ |
`ast` | Ast |
`formulaAddress` | [SimpleCellAddress](../interfaces/simplecelladdress.md) |

**Returns:** *[ArraySize](arraysize.md)*

___

### checkArraySizeForAst 

▸ **checkArraySizeForAst**(`ast`: Ast, `state`: InterpreterState): *[ArraySize](arraysize.md)*

*Defined in [src/ArraySize.ts:71](https://github.com/handsontable/hyperformula/blob/ea75425/src/ArraySize.ts#L71)*

**Parameters:**

Name | Type |
------ | ------ |
`ast` | Ast |
`state` | InterpreterState |

**Returns:** *[ArraySize](arraysize.md)*