#ifndef RHO_CALCULATION_FUNCTION_07_04_2006 #define RHO_CALCULATION_FUNCTION_07_04_2006 /** @file RhoCalc.h @author Brian Magill @datecreated 07/04/2006 $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: Calculates what the refraction angle was (t - tau) ago Overall RhoFunction is a helper class to CalcRefraction. Assumes that time and refraction values are inserted in montonically increasing time. */ //---------------------------------------------------------------------- // //#include #include #include #include "AbstractTauFunction.h" typedef boost::shared_ptr TauPointer; class RhoFunction { private: TauPointer tauPtr; std::vector rho; std::vector time; public: RhoFunction():tauPtr(), rho(0),time(0) { }; RhoFunction(TauPointer t):tauPtr(t), rho(0),time(0) { }; RhoFunction(RhoFunction const& rhs):tauPtr(rhs.tauPtr), rho(rhs.rho), time(rhs.time){ }; RhoFunction& operator = (RhoFunction const& rhs ) { if (this == &rhs) return *this; tauPtr = rhs.tauPtr; rho = rhs.rho; time = rhs.time; return *this; }; ~RhoFunction() { }; /// /// Calculates the refraction angle for a given time /// /// @param currentTime - time of refraction angle /// double Calculate(double currentTime); /// /// adds a given time and corresponding refraction angle /// /// @param currentTime - time of refraction angle /// @param currentTime - refraction /// void addData(double currentTime, double rho_0) { time.push_back(currentTime); rho.push_back(rho_0); }; void dump(); }; #endif