GPUdb C++ API  Version 7.2.2.4
aggregate_convex_hull.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __AGGREGATE_CONVEX_HULL_H__
7 #define __AGGREGATE_CONVEX_HULL_H__
8 
9 namespace gpudb
10 {
20  {
26  tableName(std::string()),
27  xColumnName(std::string()),
28  yColumnName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
52  AggregateConvexHullRequest(const std::string& tableName_, const std::string& xColumnName_, const std::string& yColumnName_, const std::map<std::string, std::string>& options_):
53  tableName( tableName_ ),
54  xColumnName( xColumnName_ ),
55  yColumnName( yColumnName_ ),
56  options( options_ )
57  {
58  }
59 
66  std::string tableName;
67 
72  std::string xColumnName;
73 
78  std::string yColumnName;
79 
83  std::map<std::string, std::string> options;
84  };
85 } // end namespace gpudb
86 
87 namespace avro
88 {
89  template<> struct codec_traits<gpudb::AggregateConvexHullRequest>
90  {
91  static void encode(Encoder& e, const gpudb::AggregateConvexHullRequest& v)
92  {
93  ::avro::encode(e, v.tableName);
94  ::avro::encode(e, v.xColumnName);
95  ::avro::encode(e, v.yColumnName);
96  ::avro::encode(e, v.options);
97  }
98 
99  static void decode(Decoder& d, gpudb::AggregateConvexHullRequest& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.tableName);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.xColumnName);
115  break;
116 
117  case 2:
118  ::avro::decode(d, v.yColumnName);
119  break;
120 
121  case 3:
122  ::avro::decode(d, v.options);
123  break;
124 
125  default:
126  break;
127  }
128  }
129  }
130  else
131  {
132  ::avro::decode(d, v.tableName);
133  ::avro::decode(d, v.xColumnName);
134  ::avro::decode(d, v.yColumnName);
135  ::avro::decode(d, v.options);
136  }
137  }
138  };
139 } // end namespace avro
140 
141 namespace gpudb
142 {
149  {
155  xVector(std::vector<double>()),
156  yVector(std::vector<double>()),
157  count(int32_t()),
158  isValid(bool()),
159  info(std::map<std::string, std::string>())
160  {
161  }
162 
166  std::vector<double> xVector;
167 
171  std::vector<double> yVector;
172 
176  int32_t count;
177 
178  bool isValid;
179 
183  std::map<std::string, std::string> info;
184  };
185 } // end namespace gpudb
186 
187 namespace avro
188 {
189  template<> struct codec_traits<gpudb::AggregateConvexHullResponse>
190  {
191  static void encode(Encoder& e, const gpudb::AggregateConvexHullResponse& v)
192  {
193  ::avro::encode(e, v.xVector);
194  ::avro::encode(e, v.yVector);
195  ::avro::encode(e, v.count);
196  ::avro::encode(e, v.isValid);
197  ::avro::encode(e, v.info);
198  }
199 
200  static void decode(Decoder& d, gpudb::AggregateConvexHullResponse& v)
201  {
202  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
203  {
204  const std::vector<size_t> fo = rd->fieldOrder();
205 
206  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
207  {
208  switch (*it)
209  {
210  case 0:
211  ::avro::decode(d, v.xVector);
212  break;
213 
214  case 1:
215  ::avro::decode(d, v.yVector);
216  break;
217 
218  case 2:
219  ::avro::decode(d, v.count);
220  break;
221 
222  case 3:
223  ::avro::decode(d, v.isValid);
224  break;
225 
226  case 4:
227  ::avro::decode(d, v.info);
228  break;
229 
230  default:
231  break;
232  }
233  }
234  }
235  else
236  {
237  ::avro::decode(d, v.xVector);
238  ::avro::decode(d, v.yVector);
239  ::avro::decode(d, v.count);
240  ::avro::decode(d, v.isValid);
241  ::avro::decode(d, v.info);
242  }
243  }
244  };
245 } // end namespace avro
246 
247 #endif // __AGGREGATE_CONVEX_HULL_H__
int32_t count
Count of the number of points in the convex set.
std::vector< double > yVector
Array of y coordinates of the resulting convex set.
std::string tableName
Name of table on which the operation will be performed.
std::string yColumnName
Name of the column containing the y coordinates of the points for the operation being performed.
AggregateConvexHullResponse()
Constructs an AggregateConvexHullResponse object with default parameters.
std::vector< double > xVector
Array of x coordinates of the resulting convex set.
std::string xColumnName
Name of the column containing the x coordinates of the points for the operation being performed.
std::map< std::string, std::string > info
Additional information.
AggregateConvexHullRequest(const std::string &tableName_, const std::string &xColumnName_, const std::string &yColumnName_, const std::map< std::string, std::string > &options_)
Constructs an AggregateConvexHullRequest object with the specified parameters.
A set of parameters for GPUdb::aggregateConvexHull.
A set of results returned by GPUdb::aggregateConvexHull.
AggregateConvexHullRequest()
Constructs an AggregateConvexHullRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.