MCPcopy Create free account
hub / github.com/apache/madlib / initialize

Method initialize

src/modules/stats/cox_prop_hazards.cpp:188–195  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

186 * function of inWidthOfX.
187 */
188 inline void initialize(const Allocator &inAllocator, uint16_t inWidthOfX) {
189 mStorage = inAllocator.allocateArray<double, dbal::AggregateContext,
190 dbal::DoZero,
191 dbal::ThrowBadAlloc>(arraySize(inWidthOfX));
192 rebind(inWidthOfX);
193 widthOfX = inWidthOfX;
194 this->reset();
195 }
196
197 /**
198 * @brief We need to support assigning the previous state

Callers 1

runMethod · 0.45

Calls 2

resetMethod · 0.95
rebindClass · 0.50

Tested by

no test coverage detected