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

Method initialize

src/modules/stats/marginal_cox.cpp:71–82  ·  view source on GitHub ↗

* @brief Initialize the marginal variance calculation state. * * This function is only called for the first iteration, for the first row. */

Source from the content-addressed store, hash-verified

69 * This function is only called for the first iteration, for the first row.
70 */
71 inline void initialize(const Allocator &inAllocator,
72 const uint16_t inWidthOfX,
73 const uint16_t inNumBasis,
74 const uint16_t inNumCategoricals) {
75 mStorage = inAllocator.allocateArray<double, dbal::AggregateContext,
76 dbal::DoZero, dbal::ThrowBadAlloc>(
77 arraySize(inWidthOfX, inNumBasis, inNumCategoricals));
78 rebind(inWidthOfX, inNumBasis, inNumCategoricals);
79 widthOfX = inWidthOfX;
80 numBasis = inNumBasis;
81 numCategoricalVarsInSubset = inNumCategoricals;
82 }
83
84 /**
85 * @brief We need to support assigning the previous state

Callers 1

runMethod · 0.45

Calls 1

rebindClass · 0.50

Tested by

no test coverage detected