Replace elements that match the condition in a vector
int ocmath_replace_data_in_vector( UINT lSize, double * pv, const double dThreshold, const double dRepVal, UINT wBitwiseOption = MATREPL_TEST_EQUAL )
Return OE_NOERROR if succeed, otherwise, non-zero error code is returned.
EX1
void ocmath_replace_data_in_vector_ex1() { vector vx = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; ocmath_replace_data_in_vector(vx.GetSize(), vx, 5, 0, MATREPL_TEST_EQUAL | MATREPL_TEST_GREATER); // vx = {1, 2, 3, 4, 0, 0, 0, 0, 0, 0} now }
origin.h