18 #ifndef __DATA_MANAGEMENT_FEATURES_SHORTCUTS_H__
19 #define __DATA_MANAGEMENT_FEATURES_SHORTCUTS_H__
23 #include "services/internal/utilities.h"
24 #include "data_management/features/internal/identifiers_impl.h"
28 namespace data_management
42 class IdFactory :
public Base
49 IdFactory(services::Status *status = NULL) :
50 _featureId(internal::NumericFeatureId::create(0, status)) { }
57 IdFactory(
int index, services::Status *status = NULL) :
58 _featureId(internal::NumericFeatureId::create(index, status)) { }
65 IdFactory(
long index, services::Status *status = NULL) :
66 _featureId(internal::NumericFeatureId::create(index, status)) { }
73 IdFactory(
const services::String &name, services::Status *status = NULL) :
74 _featureId(internal::StringFeatureId::create(name, status)) { }
81 IdFactory(
const char *name, services::Status *status = NULL) :
82 _featureId(internal::StringFeatureId::create(name, status)) { }
88 const FeatureIdIfacePtr &
get()
const {
return _featureId; }
91 FeatureIdIfacePtr _featureId;
99 inline FeatureIdCollectionIfacePtr list(
const IdFactory &
id)
101 using internal::FeatureIdList;
102 using internal::FeatureIdListPtr;
104 FeatureIdListPtr l = FeatureIdList::create();
105 if (l) { l->add(
id.
get()); }
115 inline FeatureIdCollectionIfacePtr list(
const IdFactory &id1,
116 const IdFactory &id2)
118 using internal::FeatureIdList;
119 using internal::FeatureIdListPtr;
121 FeatureIdListPtr l = FeatureIdList::create();
122 if (l) { l->add(id1.get()); l->add(id2.get()); }
133 inline FeatureIdCollectionIfacePtr list(
const IdFactory &id1,
134 const IdFactory &id2,
135 const IdFactory &id3)
137 using internal::FeatureIdList;
138 using internal::FeatureIdListPtr;
140 FeatureIdListPtr l = FeatureIdList::create();
141 if (l) { l->add(id1.get()); l->add(id2.get()); l->add(id3.get()); }
150 inline FeatureIdCollectionIfacePtr list(
const std::vector<IdFactory> &ids)
152 using internal::FeatureIdList;
153 using internal::FeatureIdListPtr;
155 FeatureIdListPtr l = FeatureIdList::create();
156 for (
size_t i = 0; i < ids.size(); i++)
158 l->add( ids[i].
get() );
170 inline FeatureIdCollectionIfacePtr range(
const IdFactory &begin,
const IdFactory &end)
172 return internal::FeatureIdRange::create(begin.get(), end.get());
179 inline FeatureIdCollectionIfacePtr all()
189 inline FeatureIdCollectionIfacePtr allReverse()
196 using interface1::IdFactory;
197 using interface1::list;
198 using interface1::range;
199 using interface1::all;
200 using interface1::allReverse;
daal::data_management::features::interface1::range
FeatureIdCollectionIfacePtr range(const IdFactory &begin, const IdFactory &end)
Definition: features/shortcuts.h:170
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(long index, services::Status *status=NULL)
Definition: features/shortcuts.h:65
daal::Base
Base class for Intel(R) Data Analytics Acceleration Library objects
Definition: base.h:41
daal::data_management::features::internal::FeatureIdList
Implementation of FeatureIdCollection to store a list of feature identifiers.
Definition: identifiers_impl.h:102
daal::data_management::features::interface1::list
FeatureIdCollectionIfacePtr list(const IdFactory &id)
Definition: features/shortcuts.h:99
daal::data_management::features::interface1::all
FeatureIdCollectionIfacePtr all()
Definition: features/shortcuts.h:179
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(const services::String &name, services::Status *status=NULL)
Definition: features/shortcuts.h:73
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(services::Status *status=NULL)
Definition: features/shortcuts.h:49
daal::data_management::features::interface1::IdFactory::get
const FeatureIdIfacePtr & get() const
Definition: features/shortcuts.h:88
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(int index, services::Status *status=NULL)
Definition: features/shortcuts.h:57
daal::data_management::features::interface1::IdFactory
Auxiliary class that simplifies definition of feature ids collections.
Definition: features/shortcuts.h:42
daal::data_management::features::interface1::allReverse
FeatureIdCollectionIfacePtr allReverse()
Definition: features/shortcuts.h:189
daal::data_management::features::interface1::IdFactory::IdFactory
IdFactory(const char *name, services::Status *status=NULL)
Definition: features/shortcuts.h:81