/*--- to keep count ---*/ void init_count() { // const double border[] = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 3, 9999999999, -1}; #define AzpActivDfltCountStop 7777 const double border[] = {-1e+10, -10, -5, -1, -0.5, -0.2, -0.1, 0, 0.1, 0.2, 0.5, 1, 5, 10, 1e+10, AzpActivDfltCountStop}; int num = 0; int ix; for (ix = 0; ; ++ix, ++num) if (border[ix] == AzpActivDfltCountStop) break; v_border.set(border, num); v_pop.reform(num); }
void reset(const AzDvect *inp_v_y, const AzDvect *inp_v_fixed_dw=NULL) { v_dw.reform(inp_v_y->rowNum()); v_dw.set(1); v_tar_dw.set(inp_v_y); v_y.set(inp_v_y); fixed_dw_sum = -1; v_fixed_dw.reset(); if (!AzDvect::isNull(inp_v_fixed_dw)) { v_fixed_dw.set(inp_v_fixed_dw); if (v_fixed_dw.rowNum() != v_y.rowNum()) { throw new AzException(AzInputError, "AzTrTtarget::reset", "conlict in dimensionality: y and data point weights"); } fixed_dw_sum = v_fixed_dw.sum(); } }
void _release() { checkLock("_release"); a.free(&column); col_num = 0; row_num = 0; dummy_zero.reform(0); }