C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 5

indices.h
1 /* file: indices.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 #ifndef __DATA_MANAGEMENT__FEATURES_INDICES_H__
17 #define __DATA_MANAGEMENT__FEATURES_INDICES_H__
18 
19 #include <limits>
20 
21 #include "services/daal_string.h"
22 #include "services/buffer_view.h"
23 #include "services/daal_shared_ptr.h"
24 
25 namespace daal
26 {
27 namespace data_management
28 {
29 namespace features
30 {
31 namespace interface1
32 {
33 
37 typedef size_t FeatureIndex;
38 
43 class FeatureIndexTraits
44 {
45 public:
49  static FeatureIndex invalid()
50  {
51  return (std::numeric_limits<FeatureIndex>::max)();
52  }
53 
57  static FeatureIndex maxIndex()
58  {
59  return (std::numeric_limits<FeatureIndex>::max)() - 1;
60  }
61 
62 private:
63  FeatureIndexTraits();
64 };
65 
70 class FeatureIndicesIface
71 {
72 public:
73  virtual ~FeatureIndicesIface() { }
74 
78  virtual size_t size() const = 0;
79 
85  virtual bool isPlainRange() const = 0;
86 
91  virtual bool areRawFeatureIndicesAvailable() const = 0;
92 
98  virtual FeatureIndex getFirst() const = 0;
99 
105  virtual FeatureIndex getLast() const = 0;
106 
111  virtual services::BufferView<FeatureIndex> getRawFeatureIndices() = 0;
112 };
113 typedef services::SharedPtr<FeatureIndicesIface> FeatureIndicesIfacePtr;
114 
120 class FeatureIndices : public Base, public FeatureIndicesIface { };
121 typedef services::SharedPtr<FeatureIndices> FeatureIndicesPtr;
122 
123 } // namespace interface1
124 
125 using interface1::FeatureIndex;
126 using interface1::FeatureIndexTraits;
127 using interface1::FeatureIndicesIface;
128 using interface1::FeatureIndicesIfacePtr;
129 using interface1::FeatureIndices;
130 using interface1::FeatureIndicesPtr;
131 
132 } // namespace features
133 } // namespace data_management
134 } // namespace daal
135 
136 #endif
daal::data_management::features::interface1::FeatureIndex
size_t FeatureIndex
Definition: indices.h:37
daal
Definition: algorithm_base_common.h:31
daal::data_management::features::interface1::FeatureIndicesIface::getLast
virtual FeatureIndex getLast() const =0
daal::data_management::features::interface1::FeatureIndexTraits
Static class that contains auxiliary methods for FeatureIndex.
Definition: indices.h:43
daal::data_management::features::interface1::FeatureIndices
Base class that represents the collection of feature indices, intended for inheritance from the user ...
Definition: indices.h:120
daal::data_management::features::interface1::FeatureIndexTraits::maxIndex
static FeatureIndex maxIndex()
Definition: indices.h:57
daal::data_management::features::interface1::FeatureIndicesIface::getFirst
virtual FeatureIndex getFirst() const =0
daal::data_management::features::interface1::FeatureIndicesIface::areRawFeatureIndicesAvailable
virtual bool areRawFeatureIndicesAvailable() const =0
daal::data_management::features::interface1::FeatureIndicesIface::getRawFeatureIndices
virtual services::BufferView< FeatureIndex > getRawFeatureIndices()=0
daal::data_management::features::interface1::FeatureIndexTraits::invalid
static FeatureIndex invalid()
Definition: indices.h:49
daal::data_management::features::interface1::FeatureIndicesIface
Abstract class that defines interface for feature indices collection.
Definition: indices.h:70
daal::Base
Base class for Intel(R) Data Analytics Acceleration Library objects
Definition: base.h:39
daal::data_management::features::interface1::FeatureIndicesIface::isPlainRange
virtual bool isPlainRange() const =0
daal::data_management::features::interface1::FeatureIndicesIface::size
virtual size_t size() const =0

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