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

indices.h
1 /* file: indices.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 #ifndef __DATA_MANAGEMENT__FEATURES_INDICES_H__
19 #define __DATA_MANAGEMENT__FEATURES_INDICES_H__
20 
21 #include <limits>
22 
23 #include "services/daal_string.h"
24 #include "services/buffer_view.h"
25 #include "services/daal_shared_ptr.h"
26 
27 namespace daal
28 {
29 namespace data_management
30 {
31 namespace features
32 {
33 namespace interface1
34 {
35 
39 typedef size_t FeatureIndex;
40 
45 class FeatureIndexTraits
46 {
47 public:
51  static FeatureIndex invalid()
52  {
53  return (std::numeric_limits<FeatureIndex>::max)();
54  }
55 
59  static FeatureIndex maxIndex()
60  {
61  return (std::numeric_limits<FeatureIndex>::max)() - 1;
62  }
63 
64 private:
65  FeatureIndexTraits();
66 };
67 
72 class FeatureIndicesIface
73 {
74 public:
75  virtual ~FeatureIndicesIface() { }
76 
80  virtual size_t size() const = 0;
81 
87  virtual bool isPlainRange() const = 0;
88 
93  virtual bool areRawFeatureIndicesAvailable() const = 0;
94 
100  virtual FeatureIndex getFirst() const = 0;
101 
107  virtual FeatureIndex getLast() const = 0;
108 
113  virtual services::BufferView<FeatureIndex> getRawFeatureIndices() = 0;
114 };
115 typedef services::SharedPtr<FeatureIndicesIface> FeatureIndicesIfacePtr;
116 
122 class FeatureIndices : public Base, public FeatureIndicesIface { };
123 typedef services::SharedPtr<FeatureIndices> FeatureIndicesPtr;
124 
125 } // namespace interface1
126 
127 using interface1::FeatureIndex;
128 using interface1::FeatureIndexTraits;
129 using interface1::FeatureIndicesIface;
130 using interface1::FeatureIndicesIfacePtr;
131 using interface1::FeatureIndices;
132 using interface1::FeatureIndicesPtr;
133 
134 } // namespace features
135 } // namespace data_management
136 } // namespace daal
137 
138 #endif
daal::data_management::features::interface1::FeatureIndicesIface::isPlainRange
virtual bool isPlainRange() const =0
daal::data_management::features::interface1::FeatureIndicesIface::areRawFeatureIndicesAvailable
virtual bool areRawFeatureIndicesAvailable() const =0
daal::data_management::features::interface1::FeatureIndexTraits
Static class that contains auxiliary methods for FeatureIndex.
Definition: indices.h:45
daal::Base
Base class for Intel(R) Data Analytics Acceleration Library objects
Definition: base.h:41
daal::data_management::features::interface1::FeatureIndicesIface::getRawFeatureIndices
virtual services::BufferView< FeatureIndex > getRawFeatureIndices()=0
daal::data_management::features::interface1::FeatureIndices
Base class that represents the collection of feature indices, intended for inheritance from the user ...
Definition: indices.h:122
daal::data_management::features::interface1::FeatureIndicesIface
Abstract class that defines interface for feature indices collection.
Definition: indices.h:72
daal::data_management::features::interface1::FeatureIndex
size_t FeatureIndex
Definition: indices.h:39
daal::data_management::features::interface1::FeatureIndicesIface::getFirst
virtual FeatureIndex getFirst() const =0
daal::data_management::features::interface1::FeatureIndicesIface::getLast
virtual FeatureIndex getLast() const =0
daal::data_management::features::interface1::FeatureIndicesIface::size
virtual size_t size() const =0
daal::data_management::features::interface1::FeatureIndexTraits::invalid
static FeatureIndex invalid()
Definition: indices.h:51
daal::data_management::features::interface1::FeatureIndexTraits::maxIndex
static FeatureIndex maxIndex()
Definition: indices.h:59

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