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

algorithm_quality_metric_set_types.h
1 /* file: algorithm_quality_metric_set_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 // Interface for the quality metric set.
21 //--
22 */
23 
24 #ifndef __ALGORITHM_QUALITY_METRIC_SET_TYPES_H__
25 #define __ALGORITHM_QUALITY_METRIC_SET_TYPES_H__
26 
27 #include "data_management/data/input_collection.h"
28 #include "algorithms/algorithm_quality_metric_batch.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
34 namespace quality_metric_set
35 {
36 
40 namespace interface1
41 {
50 class DAAL_EXPORT InputAlgorithmsCollection
51 {
52 public:
57  InputAlgorithmsCollection(size_t n = 0);
58 
59  virtual ~InputAlgorithmsCollection();
60 
66  const services::SharedPtr<quality_metric::Batch>& operator[](size_t k) const;
67 
74  services::SharedPtr<quality_metric::Batch>& operator[](size_t k);
75 
80  size_t size() const;
81 
85  void clear();
86 
92  size_t getKeyByIndex(int idx);
93 
94 protected:
95  services::Collection<services::SharedPtr<quality_metric::Batch> > _qualityMetrics;
96  services::Collection<size_t> _keys;
97  services::SharedPtr<quality_metric::Batch> *nullPtr;
98 };
99 
104 class DAAL_EXPORT InputDataCollection : public data_management::KeyValueInputCollection
105 {
106 public:
107  InputDataCollection();
108 
114  void add(size_t k, const algorithms::InputPtr& ptr);
115 
121  algorithms::InputPtr getInput(size_t key) const;
122 
123  virtual ~InputDataCollection() {}
124 };
125 typedef services::SharedPtr<InputDataCollection> InputDataCollectionPtr;
126 
131 class DAAL_EXPORT ResultCollection : public data_management::KeyValueDataCollection
132 {
133 public:
134  ResultCollection();
135 
136  void add(size_t key, const algorithms::ResultPtr& ptr);
137 
138  algorithms::ResultPtr getResult(size_t key) const;
139 
140  virtual ~ResultCollection() {}
141 };
142 typedef services::SharedPtr<ResultCollection> ResultCollectionPtr;
144 } // namespace interface1
145 using interface1::InputAlgorithmsCollection;
146 using interface1::InputDataCollection;
147 using interface1::InputDataCollectionPtr;
148 using interface1::ResultCollection;
149 using interface1::ResultCollectionPtr;
150 
151 } // namespace quality_metric_set
152 } // namespace algorithms
153 } // namespace daal
154 #endif
daal::algorithms::quality_metric_set::interface1::InputAlgorithmsCollection
Class that implements functionality of the collection of quality metrics algorithms.
Definition: algorithm_quality_metric_set_types.h:50
daal::algorithms::quality_metric_set::interface1::ResultCollection
Class that implements functionality of the collection of result objects of the quality metrics algori...
Definition: algorithm_quality_metric_set_types.h:131
daal::algorithms::quality_metric_set::interface1::InputDataCollection
Class that implements functionality of the collection of input objects of the quality metrics algorit...
Definition: algorithm_quality_metric_set_types.h:104

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