16 #ifndef __DATA_MANAGEMENT_FEATURES_SHORTCUTS_H__
17 #define __DATA_MANAGEMENT_FEATURES_SHORTCUTS_H__
21 #include "services/internal/utilities.h"
22 #include "data_management/features/internal/identifiers_impl.h"
26 namespace data_management
40 class IdFactory :
public Base
47 IdFactory(services::Status *status = NULL) :
48 _featureId(internal::NumericFeatureId::create(0, status)) { }
55 IdFactory(
int index, services::Status *status = NULL) :
56 _featureId(internal::NumericFeatureId::create(index, status)) { }
63 IdFactory(
long index, services::Status *status = NULL) :
64 _featureId(internal::NumericFeatureId::create(index, status)) { }
71 IdFactory(
const services::String &name, services::Status *status = NULL) :
72 _featureId(internal::StringFeatureId::create(name, status)) { }
79 IdFactory(
const char *name, services::Status *status = NULL) :
80 _featureId(internal::StringFeatureId::create(name, status)) { }
86 const FeatureIdIfacePtr &
get()
const {
return _featureId; }
89 FeatureIdIfacePtr _featureId;
97 inline FeatureIdCollectionIfacePtr list(
const IdFactory &
id)
99 using internal::FeatureIdList;
100 using internal::FeatureIdListPtr;
102 FeatureIdListPtr l = FeatureIdList::create();
103 if (l) { l->add(
id.
get()); }
113 inline FeatureIdCollectionIfacePtr list(
const IdFactory &id1,
114 const IdFactory &id2)
116 using internal::FeatureIdList;
117 using internal::FeatureIdListPtr;
119 FeatureIdListPtr l = FeatureIdList::create();
120 if (l) { l->add(id1.get()); l->add(id2.get()); }
131 inline FeatureIdCollectionIfacePtr list(
const IdFactory &id1,
132 const IdFactory &id2,
133 const IdFactory &id3)
135 using internal::FeatureIdList;
136 using internal::FeatureIdListPtr;
138 FeatureIdListPtr l = FeatureIdList::create();
139 if (l) { l->add(id1.get()); l->add(id2.get()); l->add(id3.get()); }
148 inline FeatureIdCollectionIfacePtr list(
const std::vector<IdFactory> &ids)
150 using internal::FeatureIdList;
151 using internal::FeatureIdListPtr;
153 FeatureIdListPtr l = FeatureIdList::create();
154 for (
size_t i = 0; i < ids.size(); i++)
156 l->add( ids[i].
get() );
168 inline FeatureIdCollectionIfacePtr range(
const IdFactory &begin,
const IdFactory &end)
170 return internal::FeatureIdRange::create(begin.get(), end.get());
177 inline FeatureIdCollectionIfacePtr all()
187 inline FeatureIdCollectionIfacePtr allReverse()
194 using interface1::IdFactory;
195 using interface1::list;
196 using interface1::range;
197 using interface1::all;
198 using interface1::allReverse;
daal
Definition: algorithm_base_common.h:31
daal::data_management::features::interface1::IdFactory::get
const FeatureIdIfacePtr & get() const
Definition: features/shortcuts.h:86
daal::data_management::features::interface1::IdFactory
Auxiliary class that simplifies definition of feature ids collections.
Definition: features/shortcuts.h:40
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(int index, services::Status *status=NULL)
Definition: features/shortcuts.h:55
daal::data_management::features::interface1::allReverse
FeatureIdCollectionIfacePtr allReverse()
Definition: features/shortcuts.h:187
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(long index, services::Status *status=NULL)
Definition: features/shortcuts.h:63
daal::data_management::features::interface1::all
FeatureIdCollectionIfacePtr all()
Definition: features/shortcuts.h:177
daal::data_management::features::interface1::range
FeatureIdCollectionIfacePtr range(const IdFactory &begin, const IdFactory &end)
Definition: features/shortcuts.h:168
daal::data_management::features::internal::FeatureIdList
Implementation of FeatureIdCollection to store a list of feature identifiers.
Definition: identifiers_impl.h:100
daal::Base
Base class for Intel(R) Data Analytics Acceleration Library objects
Definition: base.h:39
daal::data_management::features::interface1::list
FeatureIdCollectionIfacePtr list(const IdFactory &id)
Definition: features/shortcuts.h:97
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(const services::String &name, services::Status *status=NULL)
Definition: features/shortcuts.h:71
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(const char *name, services::Status *status=NULL)
Definition: features/shortcuts.h:79
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(services::Status *status=NULL)
Definition: features/shortcuts.h:47