/** @class RemoveMissingRefrac.cpp @author Brian Magill @datecreated 11/01/2007 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief: Removes the missing values from the solar extents and corresponding time */ //---------------------------------------------------------------------- // #include #include #include #include #include "RemoveMissingRefrac.h" #include "Vec2Val.hpp" using namespace std; void RemoveMissingRefrac::operator()(std::valarray const &inTime, std::valarray const &inExtent, std::valarray &fixedTime, std::valarray &fixedExtent) { vector workTime; vector workExtent; unsigned long indx; double absMissing = fabs(missingValue); assert(inTime.size() == inExtent.size()); for(indx = 0; indx < inExtent.size(); indx++) { if (fabs(inExtent[indx]) < absMissing) { workTime.push_back(inTime[indx]); workExtent.push_back(inExtent[indx]); } } Vec2Val(workTime, fixedTime); Vec2Val(workExtent, fixedExtent); }