HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_ScatteredInterp.h
Go to the documentation of this file.
1 /*
2 * PROPRIETARY INFORMATION. This software is proprietary to
3 * Side Effects Software Inc., and is not to be reproduced,
4 * transmitted, or disclosed in any way without written permission.
5 *
6 * NAME: GU_ScatteredInterp.h (GU Library, C++)
7 *
8 * COMMENTS:
9 */
10 
11 #ifndef __GU_SCATTEREDINTERP_H__
12 #define __GU_SCATTEREDINTERP_H__
13 
14 #include "GU_API.h"
15 #include <SYS/SYS_Types.h>
16 
18 {
19 
20 };
21 
22 // Scattered Interpolation formulation
24 {
28 };
29 
30 // Scattered interpolation kernel types
32 {
40 };
41 
42 // Least squares solver types
44 {
47 };
48 
49 // Template must match the following matrix-like interface including:
50 // accessors for:
51 // virtual int rows() const = 0;
52 // virtual int columns() const = 0;
53 
54 // accessors for row-wise data:
55 // virtual fpreal *row(int i) = 0;
56 // virtual const fpreal *row(int i) const = 0;
57 
58 // or accessors for column-wise data:
59 // virtual fpreal *column(int i) = 0;
60 // virtual const fpreal *column(int i) const = 0;
61 
62 template <typename U>
63 struct GU_Matrix
64 {
65  template <typename V, fpreal * (V::*)(int)> struct Accessor {};
66  template <typename V, const fpreal * (V::*)(int) const> struct ConstAccessor {};
67 
68  template <typename V> static std::true_type row_test(Accessor <V, &V::row>*);
69  template <typename V> static std::false_type row_test(...);
70 
71  template <typename V> static std::true_type const_row_test(ConstAccessor <V, &V::row>*);
72  template <typename V> static std::false_type const_row_test(...);
73 
74  template <typename V> static std::true_type column_test(Accessor <V, &V::column>*);
75  template <typename V> static std::false_type column_test(...);
76 
77  template <typename V> static std::true_type const_column_test(ConstAccessor <V, &V::column>*);
78  template <typename V> static std::false_type const_column_test(...);
79 
80  // true if the type has member functions fpreal *row(int) and const fpreal *row(int) const
81  static constexpr bool has_row = std::is_same<decltype(row_test<U>(0)), std::true_type>::value &&
82  std::is_same<decltype(const_row_test<U>(0)), std::true_type>::value;
83 
84  // true if the type has member functions fpreal *column(int) and const fpreal *column(int) const
85  static constexpr bool has_column = std::is_same<decltype(column_test<U>(0)), std::true_type>::value &&
86  std::is_same<decltype(const_column_test<U>(0)), std::true_type>::value;
87 };
88 
89 #endif // __GU_SCATTEREDINTERP_H__
GLsizei const GLfloat * value
Definition: glcorearb.h:824
static constexpr bool has_row
static constexpr bool has_column
GU_RadialBasisKernelType
static std::true_type const_column_test(ConstAccessor< V,&V::column > *)
static std::true_type row_test(Accessor< V,&V::row > *)
static std::true_type const_row_test(ConstAccessor< V,&V::row > *)
GU_LeastSquaresSolverType
Definition: core.h:1131
static std::true_type column_test(Accessor< V,&V::column > *)
GU_ScatteredInterpType