C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

outlier_detection_univariate_types.h
1 /* file: outlier_detection_univariate_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // univariate outlier detection algorithm types
21 //--
22 */
23 
24 #ifndef __OUTLIERDETECTION_UNIVARIATE_TYPES_H__
25 #define __OUTLIERDETECTION_UNIVARIATE_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
43 namespace univariate_outlier_detection
44 {
49 enum Method
50 {
51  defaultDense = 0
52 };
53 
58 enum InputId
59 {
60  data ,
61  location ,
62  scatter ,
63  threshold ,
64  lastInputId = threshold
65 };
66 
71 enum ResultId
72 {
73  weights,
74  lastResultId = weights
75 };
76 
80 namespace interface1
81 {
86 struct InitIface
87 {
95  virtual void operator()(data_management::NumericTable *data,
96  data_management::NumericTable *location,
97  data_management::NumericTable *scatter,
98  data_management::NumericTable *threshold) = 0;
99  virtual ~InitIface() {}
100 };
101 
106 struct DAAL_EXPORT DefaultInit : public InitIface
107 {
115  virtual void operator()(data_management::NumericTable *data,
116  data_management::NumericTable *location,
117  data_management::NumericTable *scatter,
118  data_management::NumericTable *threshold) {}
119 };
120 
127 /* [Parameter source code] */
128 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
129 {
130  Parameter() {}
131  services::SharedPtr<InitIface> initializationProcedure;
138  virtual services::Status check() const DAAL_C11_OVERRIDE {return services::Status();}
139 };
140 /* [Parameter source code] */
141 
146 class DAAL_EXPORT Input : public daal::algorithms::Input
147 {
148 public:
149  Input();
150  Input(const Input& other);
151 
152  virtual ~Input() {}
153 
159  data_management::NumericTablePtr get(InputId id) const;
160 
166  void set(InputId id, const data_management::NumericTablePtr &ptr);
167 
175  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
176 };
177 
182 class DAAL_EXPORT Result : public daal::algorithms::Result
183 {
184 public:
185  DECLARE_SERIALIZABLE_CAST(Result);
186  Result();
187 
188  virtual ~Result() {};
189 
198  template <typename algorithmFPType>
199  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
200 
206  data_management::NumericTablePtr get(ResultId id) const;
207 
213  void set(ResultId id, const data_management::NumericTablePtr &ptr);
214 
223  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
224 
225 protected:
227  template<typename Archive, bool onDeserialize>
228  services::Status serialImpl(Archive *arch)
229  {
230  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
231  }
232 };
233 typedef services::SharedPtr<Result> ResultPtr;
234 
236 } // namespace interface1
237 using interface1::InitIface;
238 using interface1::DefaultInit;
239 using interface1::Parameter;
240 using interface1::Input;
241 using interface1::Result;
242 using interface1::ResultPtr;
243 
244 } // namespace univariate_outlier_detection
245 } // namespace algorithm
246 } // namespace daal
247 #endif
daal::algorithms::univariate_outlier_detection::interface1::Input
Input objects for the univariate outlier detection algorithm
Definition: outlier_detection_univariate_types.h:146
daal::algorithms::univariate_outlier_detection::interface1::Parameter::initializationProcedure
services::SharedPtr< InitIface > initializationProcedure
Definition: outlier_detection_univariate_types.h:131
daal::algorithms::univariate_outlier_detection::ResultId
ResultId
Definition: outlier_detection_univariate_types.h:71
daal::algorithms::univariate_outlier_detection::interface1::DefaultInit::operator()
virtual void operator()(data_management::NumericTable *data, data_management::NumericTable *location, data_management::NumericTable *scatter, data_management::NumericTable *threshold)
Definition: outlier_detection_univariate_types.h:115
daal::algorithms::univariate_outlier_detection::Method
Method
Definition: outlier_detection_univariate_types.h:49
daal::algorithms::univariate_outlier_detection::location
Definition: outlier_detection_univariate_types.h:61
daal::algorithms::univariate_outlier_detection::weights
Definition: outlier_detection_univariate_types.h:73
daal::algorithms::univariate_outlier_detection::interface1::DefaultInit
Class that specifies the default method for initialization.
Definition: outlier_detection_univariate_types.h:106
daal::algorithms::univariate_outlier_detection::interface1::Parameter::check
virtual services::Status check() const DAAL_C11_OVERRIDE
Definition: outlier_detection_univariate_types.h:138
daal::algorithms::univariate_outlier_detection::threshold
Definition: outlier_detection_univariate_types.h:63
daal::algorithms::univariate_outlier_detection::defaultDense
Definition: outlier_detection_univariate_types.h:51
daal::algorithms::univariate_outlier_detection::interface1::InitIface::operator()
virtual void operator()(data_management::NumericTable *data, data_management::NumericTable *location, data_management::NumericTable *scatter, data_management::NumericTable *threshold)=0
daal::algorithms::univariate_outlier_detection::interface1::Parameter
Parameters of the univariate outlier detection algorithm.
Definition: outlier_detection_univariate_types.h:128
daal::algorithms::univariate_outlier_detection::interface1::InitIface
Abstract class that provides a functor for the initial procedure.
Definition: outlier_detection_univariate_types.h:86
daal::algorithms::univariate_outlier_detection::data
Definition: outlier_detection_univariate_types.h:60
daal::algorithms::univariate_outlier_detection::interface1::Result
Results obtained with the compute() method of the univariate outlier detection algorithm in the batch...
Definition: outlier_detection_univariate_types.h:182
daal::algorithms::univariate_outlier_detection::InputId
InputId
Definition: outlier_detection_univariate_types.h:58
daal::algorithms::univariate_outlier_detection::scatter
Definition: outlier_detection_univariate_types.h:62

For more complete information about compiler optimizations, see our Optimization Notice.