Inheritance diagram for classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >:

This class implements an instance for candidate classification. An instance for candidate classification consists of multiple candidates each of which consists of a feature vector (implemented by attributes_tmpl). The true candidate is specified by a candidate index (implemented in this class). In addition, an instance class exposes the interfaces for instance weighting (implemented by weight_tmpl) and instance group numbers (implemented by group_tmpl).
| attributes_tmpl | The type of an attribute vector. | |
| weight_tmpl | The base class implementing instance weighting. By default, this class uses weight_base. | |
| group_tmpl | The base class implementing group numbers. By default, this class uses group_base. |
Public Types | |
| typedef attributes_tmpl | attributes_type |
| A type representing an attribute vector. | |
| typedef attributes_type | candidate_type |
| A type representing a candidate (a synonym of attributes_type). | |
| typedef std::vector< candidate_type > | candidates_type |
| A type providing a container of all candidates. | |
| typedef candidates_type::size_type | size_type |
| A type counting the number of candidates in the instance. | |
| typedef candidates_type::iterator | iterator |
| A type providing a random-access iterator for candidates. | |
| typedef candidates_type::const_iterator | const_iterator |
| A type providing a read-only random-access iterator for candidates. | |
| typedef attributes_type::identifier_type | attribute_type |
| The type of an attribute identifier. | |
| typedef attributes_type::value_type | value_type |
| The type of an attribute value. | |
Public Member Functions | |
| candidate_instance_base () | |
| Constructs an object. | |
| virtual | ~candidate_instance_base () |
| Destructs the object. | |
| void | clear () |
| Erases all the candidates in the object. | |
| bool | empty () const |
| Tests if the object has no candidate. | |
| size_type | size () const |
| Returns the number of candidates. | |
| iterator | begin () |
| Returns a random-access iterator to the first candidate. | |
| const_iterator | begin () const |
| Returns a random-access iterator to the first candidate. | |
| iterator | end () |
| Returns a random-access iterator pointing just beyond the last candidate. | |
| const_iterator | end () const |
| Returns a random-access iterator pointing just beyond the last candidate. | |
| void | append (const candidate_type &candidate) |
| Adds an candidate to the object. | |
| candidate_type & | new_element () |
| Creates a new candidate. | |
| void | set_label (int i) |
| Sets the index of the reference candidate. | |
| int | get_label () const |
| Gets the index of the reference candidate. | |
| int | num_candidates (const int L) const |
| Returns the number of candidates associated with the instance. | |
| const candidate_type & | attributes (int i) const |
| Returns a read-only access to the attribute vector of a candidate. | |
| candidate_type & | attributes (int i) |
| Returns an access to the attribute vector of a candidate. | |
Protected Attributes | |
| candidates_type | candidates |
| A container of all candidates associated with the instance. | |
| int | m_label |
| The label of this instance. | |
| bool classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::empty | ( | ) | const [inline] |
Tests if the object has no candidate.
| bool | true if the object has no candidate, false otherwise. |
| size_type classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::size | ( | ) | const [inline] |
Returns the number of candidates.
| int | The number of candidates associated with the instance. |
| iterator classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::begin | ( | ) | [inline] |
Returns a random-access iterator to the first candidate.
| iterator | A random-access iterator (for read/write) addressing the first candidate or to the location succeeding an empty candidate. |
| const_iterator classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::begin | ( | ) | const [inline] |
Returns a random-access iterator to the first candidate.
| iterator | A random-access iterator (for read-only) addressing the first candidate or to the location succeeding an empty candidate. |
| iterator classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::end | ( | ) | [inline] |
Returns a random-access iterator pointing just beyond the last candidate.
| iterator | A random-access iterator (for read/write) addressing the end of the candidates. |
| const_iterator classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::end | ( | ) | const [inline] |
Returns a random-access iterator pointing just beyond the last candidate.
| iterator | A random-access iterator (for read-only) addressing the end of the candidates. |
| void classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::append | ( | const candidate_type & | candidate | ) | [inline] |
Adds an candidate to the object.
| candidate | The candidate to be inserted to this object. |
| candidate_type& classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::new_element | ( | ) | [inline] |
Creates a new candidate.
| attributes_type& | The reference to the new candidate. |
| void classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::set_label | ( | int | i | ) | [inline] |
Sets the index of the reference candidate.
| i | The index number of the reference candidate. |
| int classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::get_label | ( | ) | const [inline] |
Gets the index of the reference candidate.
| int classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::num_candidates | ( | const int | L | ) | const [inline] |
Returns the number of candidates associated with the instance.
| L | Ignored. Reserved only for the compatibility with multi_instance_base class. |
| const candidate_type& classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::attributes | ( | int | i | ) | const [inline] |
Returns a read-only access to the attribute vector of a candidate.
| i | The candidate label (index). |
| candidate_type& classias::candidate_instance_base< attributes_tmpl, weight_tmpl, group_tmpl >::attributes | ( | int | i | ) | [inline] |
Returns an access to the attribute vector of a candidate.
| i | Reserved only for the compatibility with candidate_instance_base class. |