KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
kriging.h
Go to the documentation of this file.
1 
6 /*
7  * $Id: kriging.h 17611 2014-09-26 20:39:48Z predoehl $
8  *
9  * Tab size: 4
10  */
11 
12 #ifndef KRIGING_H_INCLUDED_PREDOEHL_UOFARIZONAVISION
13 #define KRIGING_H_INCLUDED_PREDOEHL_UOFARIZONAVISION 1
14 
16 #include <m_cpp/m_vector.h>
17 #include <topo_cpp/nedgrid.h>
18 #include <vector>
19 
20 namespace kjb
21 {
22 
65 {
66  const double m_char_sf2;
67  char m_utm_zone;
68  std::vector< TopoFusion::pt > m_training;
69  Vector m_cov_inv_targ;
70 
71 
72  mutable bool kcache_valid;
73 
75  mutable TopoFusion::pt m_query_zbad;
76 
78  mutable TopoFusion::pt m_query_zgood;
79 
81  mutable Vector k_cache;
82 
83 
84  void refresh_cache(const TopoFusion::pt&) const;
85 
86 public:
88  double,
91  Pthread_mutex* = 0
92  );
93 
99  double operator()(const TopoFusion::pt& utm) const
100  {
101  refresh_cache(utm);
102  return dot( m_cov_inv_targ, k_cache );
103  }
104 
111  double diff_e(const TopoFusion::pt&) const;
112 
119  double diff_n(const TopoFusion::pt&) const;
120 };
121 
122 
123 }
124 
125 #endif /* KRIGING_H_INCLUDED_PREDOEHL_UOFARIZONAVISION */
double diff_n(const TopoFusion::pt &) const
compute the north-south slope of the terrain at query pt
Definition: kriging.cpp:543
integer-valued, latitude-style and longitude-style coordinates
Definition: nedgrid.h:174
This caches a bunch (potentially) of one-degree grids for you.
Definition: nedgrid.h:240
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
simple raii class to manage lock/unlock of a pthread mutex
double diff_e(const TopoFusion::pt &) const
compute the east-west slope of the terrain at query pt
Definition: kriging.cpp:531
a class to interpolate elevation values using Gaussian processes
Definition: kriging.h:64
interface for low-level NED reader functions
double operator()(const TopoFusion::pt &utm) const
interpolate (krige) the elevation at the given query point
Definition: kriging.h:99
Kriging_interpolator(double, const Ned13_one_degree_grid::IntegralLL &, Ned13_grid_cache *, Pthread_mutex *=0)
Create object that can interpolate points in a small neighborhood.
Definition: kriging.cpp:463
long int dot(const Int_vector &op1, const Int_vector &op2)
Returns dot product of this and op2.
Definition: l_int_vector.h:1532
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
dynamically allocated mutex: unlock before you destroy it!
Definition: l_mt_mutexlock.h:56
definition for a TopoFusion pt
Definition: layer.h:34