A
Adam Hartshorne
Hi All,
I want to do the following,
I have a std::vector<Patch> called say vs. Now there is a bool variable
in the class called outlier, which may be access by getOutlierStatus()
method.
Now I want to remove all "Patch"es in the vector dataPatches, whose
outlier variable is set to true.
Now my immediate thought was to use remove_if in the following way
vs.erase(std::remove_if(vs.begin(), vs.end(), getOutlierStatus()),
vs.end());
however this is obviously not correct way to call getOutlierStatus().
So I am wondering how I should go about doing this?
Any help much appreciated,
Adam
I want to do the following,
I have a std::vector<Patch> called say vs. Now there is a bool variable
in the class called outlier, which may be access by getOutlierStatus()
method.
Now I want to remove all "Patch"es in the vector dataPatches, whose
outlier variable is set to true.
Now my immediate thought was to use remove_if in the following way
vs.erase(std::remove_if(vs.begin(), vs.end(), getOutlierStatus()),
vs.end());
however this is obviously not correct way to call getOutlierStatus().
So I am wondering how I should go about doing this?
Any help much appreciated,
Adam