///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2021 Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RiaCurveDataTools.h" #include //================================================================================================== /// //================================================================================================== class RiaWellLogCurveMerger { public: RiaWellLogCurveMerger(); void addCurveData( const std::vector& xValues, const std::vector& yValues ); size_t curveCount() const; void computeLookupValues( bool includeValuesFromPartialCurves = true ); RiaCurveDataTools::CurveIntervals validIntervalsForAllXValues() const; const std::vector& allXValues() const; const std::vector& lookupYValuesForAllXValues( size_t curveIdx ) const; private: void computeUnionOfXValues( bool includeValuesFromPartialCurves ); static double lookupYValue( const double& xValue, const std::vector& curveXValues, const std::vector& curveYValues ); std::vector, std::vector>> m_originalValues; RiaCurveDataTools::CurveIntervals m_validIntervalsForAllXValues; std::vector m_allXValues; std::vector> m_lookupValuesForAllCurves; };