In this class, features are identical to attributes, and labels are ignored.
attribute_tmpl | The type of an attribute. | |
label_tmpl | The type of a label. | |
feature_tmpl | The type of a feature. |
Public Types | |
typedef attribute_tmpl | attribute_type |
The type of an attribute. | |
typedef label_tmpl | label_type |
The type of a label. | |
typedef feature_tmpl | feature_type |
The type of a feature. | |
Public Member Functions | |
thru_feature_generator_base () | |
Constructs an object. | |
virtual | ~thru_feature_generator_base () |
Destructs an object. | |
const char * | name () const |
Returns the name of the feature generator. | |
size_t | num_labels () const |
Returns the total number of labels. | |
size_t | num_attributes () const |
Returns the total number of attributes. | |
size_t | num_features () const |
Returns the total number of features. | |
void | set_num_attributes (size_t num_attributes) |
Sets the total number of attributes. | |
void | set_num_labels (size_t num_labels) |
Sets the total number of labels. | |
bool | needs_registration () const |
Returns if this class requires registration. | |
feature_type | regist (const attribute_type &a, const label_type &l) |
Registers an association between an attribute and label. | |
bool | forward (const attribute_type &a, const label_type &l, feature_type &f) const |
Returns the feature associated with a pair of an attribute and label. | |
bool | backward (const feature_type &f, attribute_type &a, label_type &l) const |
Returns the attribute and label associated with a feature. | |
Protected Attributes | |
size_t | m_num_attributes |
The total number of attributes. |
const char* classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::name | ( | ) | const [inline] |
Returns the name of the feature generator.
size_t classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::num_labels | ( | ) | const [inline] |
Returns the total number of labels.
size_t classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::num_attributes | ( | ) | const [inline] |
Returns the total number of attributes.
size_t classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::num_features | ( | ) | const [inline] |
Returns the total number of features.
void classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::set_num_attributes | ( | size_t | num_attributes | ) | [inline] |
Sets the total number of attributes.
num_attributes | The total number of attributes. |
void classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::set_num_labels | ( | size_t | num_labels | ) | [inline] |
Sets the total number of labels.
num_labels | The total number of labels. |
bool classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::needs_registration | ( | ) | const [inline] |
Returns if this class requires registration.
false
. feature_type classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::regist | ( | const attribute_type & | a, | |
const label_type & | l | |||
) | [inline] |
Registers an association between an attribute and label.
a | The attribute. | |
l | The label. |
bool classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::forward | ( | const attribute_type & | a, | |
const label_type & | l, | |||
feature_type & | f | |||
) | const [inline] |
Returns the feature associated with a pair of an attribute and label.
a | The attribute. | |
l | The label. | |
f | The feature for the attribute and label, which is always identical to the attribute. |
true
if the pair of the attribute and label is successfully mapped to a feature, which is always true
. bool classias::thru_feature_generator_base< attribute_tmpl, label_tmpl, feature_tmpl >::backward | ( | const feature_type & | f, | |
attribute_type & | a, | |||
label_type & | l | |||
) | const [inline] |
Returns the attribute and label associated with a feature.
f | The feature. | |
a | The attribute associated with the feature. | |
l | The label associated with the feature. |
if
the feature is successfully associated with the attribute and label.