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

Method run

src/modules/stats/coxph_improved.cpp:75–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73// ------------------------------------------------------------
74
75AnyType split_transition::run(AnyType &args)
76{
77 double val = args[1].getAs<double>();
78 int buff_size = args[2].getAs<int>();
79 int num_splits = args[3].getAs<int>();
80 if (num_splits == 1)
81 return Null();
82
83 MutableArrayHandle<double> state(NULL);
84 if (args[0].isNull()) {
85 state = allocateArray<double>(buff_size + 2);
86 state[0] = 0;
87 state[1] = num_splits;
88 } else {
89 state = args[0].getAs<MutableArrayHandle<double> >();
90 }
91
92 // The pre-allocated buffer has been filled up
93 if (state[0] >= buff_size) {
94 return state;
95 }
96
97 state[static_cast<int>(++state[0]) + 1] = val;
98 return state;
99}
100
101// ------------------------------------------------------------
102

Callers

nothing calls this directly

Calls 14

NullFunction · 0.85
isfiniteFunction · 0.85
transFunction · 0.85
endMethod · 0.80
beginMethod · 0.80
stateToResultFunction · 0.70
isNullMethod · 0.45
ptrMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected