* @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. */
| 42 | * function of inWidthOfX. |
| 43 | */ |
| 44 | inline void initialize(const Allocator &inAllocator, uint16_t inWidthOfX, const double * inCoef = 0) { |
| 45 | mStorage = inAllocator.allocateArray<double, dbal::AggregateContext, |
| 46 | dbal::DoZero, dbal::ThrowBadAlloc>(arraySize(inWidthOfX)); |
| 47 | rebind(inWidthOfX); |
| 48 | widthOfX = inWidthOfX; |
| 49 | if(inCoef){ |
| 50 | for(uint16_t i = 0; i < widthOfX; i++) |
| 51 | coef[i] = inCoef[i]; |
| 52 | } |
| 53 | this->reset(); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * @brief We need to support assigning the previous state |
no test coverage detected