Trim
Remove all missing values from the vector.
bool Trim( )
Returns true on success or false on failure.
EX1
void vectorbase_Trim_ex1() { vector vecData = {0.1, 0.2, 0.3, 0.4}; vecData[2] = NANUM; // vecData = {0.1, 0.2, NANUM, 0.4} vecData.Trim(); // trim missing value from the vector for(int ii = 0; ii < vecData.GetSize(); ii++) printf("%.1f ",vecData[ii]); // Result: // vecData = {0.1, 0.2, 0.4} }
Remove all missing values from the vectorbase derived object and resize by shifting data values up.
Note: Trim method for Curve objects causes both X and Y Datasets to be trimmed.
vectorbase::TrimLeft, vectorbase::TrimRight, vectorbase::GetLowerBound
origin.h