// //----------------------------------------------------------------------- /// @copyright /// (c) Copyright 2008 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. /// //----------------------------------------------------------------------- /// /// @file EdgeLocation.cpp /// /// @author John Burton /// /// @date Fri May 16 09:28:34 2008 /// //----------------------------------------------------------------------- // //----------------------------------------------------------------------- // Include Files: //----------------------------------------------------------------------- // #include "EventVar.h" // //----------------------------------------------------------------------- // Defines and Macros: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Global Variables: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Class Methods: //----------------------------------------------------------------------- // static double linterp(double &x, double &xa, double &xb, double &ya, double &yb) { double dx, y; double a; dx = xb - xa; if(dx != 0) { a = (x - xa) / dx; y = ya + a * (yb - ya); }else y = (ya * yb) / 2.0; return y; } double findLowXEdge(double &edge, EventVar &X, EventVar &Y) { int len = X.size(); int i,j; double x,xa,xb,y,ya,yb; i = 0; while((i &X, EventVar &Y) { int len = X.size(); int i,j; double x,xa,xb,y,ya,yb; i = len-2; while((i>0)&&(X[i]