IODA Bundle
EqRegionCache.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 /// \file EqRegionCache.h
12 /// ECMWF July 2010
13 ///
14 /// A PARTITION OF THE UNIT SPHERE INTO REGIONS OF EQUAL AREA AND SMALL DIAMETER
15 /// Algorithm by Paul Leopardi, School of Mathematics, University of South Wales
16 ///
17 
18 #ifndef EqRegionCache_H
19 #define EqRegionCache_H
20 
22 
23 namespace odc {
24 namespace sql {
25 namespace function {
26 
27 /// @todo Move these functions to eckit::maths or eckit::geometry, or remove them at all
28 ///
29 
30 class EqRegionCache : public RegionCache {
31 public:
32 
33  EqRegionCache();
34 
36 
37 private:
38 // No copy allowed
41 
42  virtual double get_resol(const double & val);
43  virtual void create_cache(const double &, const int &);
44 
45  int gcd(int, int&);
46  void eq_caps(int &, int &, double [], int [], int*);
47  void bot_cap_region(int &, double &, double []);
48  double circle_offset(int &, int &);
49  void cap_colats(int &, int &, int &, double &,const int [], double []);
50  void round_to_naturals(int &, int &, const double [], int []);
51  double area_of_cap(int &, double &);
52  double area_of_collar(int &, double, double);
53  void ideal_region_list(int &, int &, double &,int &, double []);
54  double area_of_ideal_region(int &, int &);
55  int num_collars(int &, double &, double);
56  double ideal_collar_angle(int &, int &);
57  double sradius_of_cap(int &, double&);
58  double my_gamma(double &);
59  double area_of_sphere(int &);
60  double polar_colat(int &, int &);
61  double eq_area(const double &);
62  double eq_resol(const double&);
63  double eq_n(const double&);
64  void eq_regions(int, int, double []);
65  void sphere_region(int &, double []);
66  void top_cap_region(int &, double & ,double []);
67 
68  // -- Friends
69  //friend std::ostream& operator<<(std::ostream& s,const EqRegionCache& p)
70  // { p.print(s); return s; }
71 };
72 
73 } // namespace function
74 } // namespace sql
75 } // namespace odc
76 
77 #endif
double eq_area(const double &)
double eq_resol(const double &)
void bot_cap_region(int &, double &, double[])
virtual double get_resol(const double &val)
double polar_colat(int &, int &)
void ideal_region_list(int &, int &, double &, int &, double[])
void sphere_region(int &, double[])
EqRegionCache & operator=(const EqRegionCache &)
int num_collars(int &, double &, double)
void top_cap_region(int &, double &, double[])
void cap_colats(int &, int &, int &, double &, const int[], double[])
EqRegionCache(const EqRegionCache &)
double area_of_ideal_region(int &, int &)
double sradius_of_cap(int &, double &)
void eq_caps(int &, int &, double[], int[], int *)
void eq_regions(int, int, double[])
void round_to_naturals(int &, int &, const double[], int[])
double area_of_collar(int &, double, double)
virtual void create_cache(const double &, const int &)
double area_of_cap(int &, double &)
double ideal_collar_angle(int &, int &)
double circle_offset(int &, int &)
Definition: ColumnInfo.h:23