* @brief Initialize the transition state. Only called for first row. * * @param inAllocator Allocator for the memory transition state. Must fill * the memory block with zeros. * @param inWidthOfX Number of independent variables. The first row of data * determines the size of the transition state. This size is a quadratic * function of inWidthOfX. */
| 313 | * function of inWidthOfX. |
| 314 | */ |
| 315 | inline void initialize(const Allocator &inAllocator, uint16_t inWidthOfX, |
| 316 | const double * inCoef = 0) |
| 317 | { |
| 318 | mStorage = inAllocator.allocateArray<double, dbal::AggregateContext, |
| 319 | dbal::DoZero, dbal::ThrowBadAlloc>(arraySize(inWidthOfX)); |
| 320 | rebind(inWidthOfX); |
| 321 | widthOfX = inWidthOfX; |
| 322 | |
| 323 | if(inCoef){ |
| 324 | for(uint16_t i = 0; i < widthOfX; i++) |
| 325 | coef[i] = inCoef[i]; |
| 326 | } |
| 327 | this->reset(); |
| 328 | } |
| 329 | |
| 330 | /** |
| 331 | * @brief Reset the inter-iteration fields. |