#ifndef MERGE_REFRACTION_08_08_13 #define MERGE_REFRACTION_08_08_13 /** @file MergeRefrac.h @author Brian Magill @datecreated 08/13/2008 $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: Merges the two refraction profiles */ //---------------------------------------------------------------------- // #include class MergeRefrac { private: double mergeCriteria; long halfWidthPoints; public: MergeRefrac(): mergeCriteria(0.0), halfWidthPoints(0) { } MergeRefrac(double crit, long n): mergeCriteria(crit), halfWidthPoints(n) { } MergeRefrac(MergeRefrac const &rhs): mergeCriteria(rhs.mergeCriteria), halfWidthPoints(rhs.halfWidthPoints) { } MergeRefrac& operator = (MergeRefrac const& rhs ) { if (this == &rhs) return *this; mergeCriteria = rhs.mergeCriteria; halfWidthPoints = rhs.halfWidthPoints; return *this; }; ~MergeRefrac() { }; long FindIndex(const std::valarray & array) const; /// /// Merges two profiles together. Both are assumed to be monotonically increasing. /// Criteria is applied to ProfileA /// /// @ProfileA - Array with first profile entries /// @ProfileB - Array with second profile entries /// std::valarray Combine(const std::valarray &ProfileA, const std::valarray &ProfileB) const; }; #endif