WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
InterpolateBilinear.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_INTERPOLATE_BILINEAR_H
17#define UTILS_INTERPOLATE_BILINEAR_H
18
19#include <vector>
20
22
23namespace warptwin {
56 {
57 public:
71 int setData(const std::vector<double> &xValues, const std::vector<double> &yValues, const std::vector<std::vector<double>> &zValues);
72
81 int getMinX(double& minX) const;
82
91 int getMaxX(double& maxX) const;
92
101 int getMinY(double& minX) const;
102
111 int getMaxY(double& maxX) const;
112
124 int interpolate(double x, double y, double &zInterpolated);
125
126 private:
127 std::vector<double> _x_data;
128 std::vector<double> _y_data;
129 std::vector<std::vector<double>> _z_data;
130
132 unsigned int _x_idx, _y_idx;
133
135 double _x1, _x2, _y1, _y2, _z11, _z12, _z21, _z22;
136
141 unsigned int _findIntervalIndex(const std::vector<double> &vec, double value);
142 };
143}
144
145#endif // UTILS_INTERPOLATE_BILINEAR_H
A class for performing simple x-y-z bilinear interpolation.
Definition InterpolateBilinear.h:56
int getMaxX(double &maxX) const
Returns the maximum x-value from the stored data.
Definition InterpolateBilinear.cpp:70
int interpolate(double x, double y, double &zInterpolated)
Performs bilinear interpolation given an (x, y) value pair.
Definition InterpolateBilinear.cpp:106
int getMinY(double &minX) const
Returns the minimum y-value from the stored data.
Definition InterpolateBilinear.cpp:80
int getMaxY(double &maxX) const
Returns the maximum y-value from the stored data.
Definition InterpolateBilinear.cpp:90
int setData(const std::vector< double > &xValues, const std::vector< double > &yValues, const std::vector< std::vector< double > > &zValues)
Sets the data for the interpolator.
Definition InterpolateBilinear.cpp:21
int getMinX(double &minX) const
Returns the minimum x-value from the stored data.
Definition InterpolateBilinear.cpp:60
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22