WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
Interpolate2D.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, INC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, INC.
15******************************************************************************/
16#ifndef UTILS_INTERPOLATE2D_H
17#define UTILS_INTERPOLATE2D_H
18
19#include <vector>
20
22
23namespace warptwin {
50 {
51 public:
63 int setData(const std::vector<double>& xValues, const std::vector<double>& yValues);
64
73 int getMinX(double& minX) const;
74
83 int getMaxX(double& maxX) const;
84
95 int interpolate(double x, double& yInterpolated);
96
97 private:
98 std::vector<double> _x_data;
99 std::vector<double> _y_data;
100
101 unsigned int _last_bottom = 0;
102 unsigned int _last_top = 1;
103 double _slope = 0.0;
104 };
105}
106
107#endif // UTILS_INTERPOLATE2D_H
A class for performing simple x-y linear interpolation.
Definition Interpolate2D.h:50
int getMinX(double &minX) const
Returns the minimum x-value from the stored data.
Definition Interpolate2D.cpp:39
int interpolate(double x, double &yInterpolated)
Performs linear interpolation given an x-value.
Definition Interpolate2D.cpp:61
int setData(const std::vector< double > &xValues, const std::vector< double > &yValues)
Sets the data for the interpolator.
Definition Interpolate2D.cpp:5
int getMaxX(double &maxX) const
Returns the maximum x-value from the stored data.
Definition Interpolate2D.cpp:50
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22