xmsinterp  1.0
InterpUtil.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 
10 //----- Included files ---------------------------------------------------------
11 
12 // 3. Standard library headers
13 
14 // 4. External library headers
15 
16 // 5. Shared code headers
17 #include <xmscore/points/pt.h> // for Pt3d
18 #include <xmscore/points/ptsfwd.h> // for Pt3d
19 #include <xmscore/misc/DynBitset.h>
20 
21 // 6. Non-shared code headers
22 
23 //----- Forward declarations ---------------------------------------------------
24 
25 //----- Namespace declaration --------------------------------------------------
26 namespace xms
27 {
28 //----- Forward declarations ---------------------------------------------------
29 
30 //----- Constants / Enumerations -----------------------------------------------
31 
32 //----- Structs / Classes ------------------------------------------------------
35 {
36 public:
38  double m_scalar;
39  double m_weight;
40 };
41 
42 //----- Function prototypes ----------------------------------------------------
43 void inNodalFuncSetUpMatrixAndVector(double xk,
44  double yk,
45  double fk,
46  const std::vector<InterpPtInfo>& closest,
47  double** M,
48  double* VV);
50  double yk,
51  double zk,
52  double fk,
53  const std::vector<InterpPtInfo>& closest,
54  double** M,
55  double* VV);
56 void inDistanceSquared(const Pt3d& a_pt,
57  const std::vector<int>& a_ptIdxs,
58  const std::vector<Pt3d>& a_ptLoc,
59  bool a_2d,
60  std::vector<double>& a_d2);
61 void inIdwWeights(const std::vector<double>& a_d2,
62  double a_power,
63  bool a_modifiedShepardWeights,
64  std::vector<double>& a_w);
65 bool inAllScalarsEqual(const std::vector<float>& a_scalar, const DynBitset& a_act);
66 
67 } // namespace xms
Convenience struct used in interpolation utility functions.
Definition: InterpUtil.h:34
boost::dynamic_bitset< size_t > DynBitset
void inNodalFuncSetUpMatrixAndVector(double xk, double yk, double fk, const std::vector< InterpPtInfo > &closest, double **M, double *VV)
Sets up matrices for nodal function calculations. Refactored out of GMS.
Definition: InterpUtil.cpp:50
Pt3d m_loc
location of interest
Definition: InterpUtil.h:37
void inNodalFuncSetUpMatrixAndVector3d(double xk, double yk, double zk, double fk, const std::vector< InterpPtInfo > &closest, double **M, double *vv)
Sets up matrices for nodal function calculations. Refactored out of GMS.
Definition: InterpUtil.cpp:126
void inDistanceSquared(const Pt3d &a_pt, const std::vector< int > &a_ptIdxs, const std::vector< Pt3d > &a_ptLoc, bool a_2d, std::vector< double > &a_d2)
Computes the distance squared between the point "a_pt" and the other points. The other points are def...
Definition: InterpUtil.cpp:266
void inIdwWeights(const std::vector< double > &a_distSquare, double a_power, bool a_modifiedShepardWeights, std::vector< double > &a_w)
Computes the idw weights that would be assigned to points associated with the distance squared that i...
Definition: InterpUtil.cpp:305
double m_scalar
scalar at location
Definition: InterpUtil.h:38
bool inAllScalarsEqual(const std::vector< float > &a_scalars, const DynBitset &a_act)
Check to see if the all of the values in the scalars array are the same. It will also take into accou...
Definition: InterpUtil.cpp:363
double m_weight
weight at location
Definition: InterpUtil.h:39