Vita
|
Information about the set of categories used in a specific problem. More...
#include <category_set.h>
Public Member Functions | |
auto | begin () const |
const category_info & | category (category_t) const |
category_set (const dataframe::columns_info &, typing=typing::weak) | |
Builds a category_set extracting data from a columns_info object. More... | |
const category_info & | column (const std::string &) const |
const category_info & | column (std::size_t) const |
auto | end () const |
bool | is_valid () const |
std::set< category_t > | used_categories () const |
Information about the set of categories used in a specific problem.
More fine grained data types are required for Strongly Typed Genetic Programming: i.e. not just double
but possibly multiple categories (category_t
) that are subset of a d_double
domain_t
. Categories avoid mixing 3 Km/h with 4 Kg (in simple cases there is only one category for each domain).
The src_problem class uses a category_set object for creating the symbol set.
Definition at line 67 of file category_set.h.
|
explicit |
Builds a category_set extracting data from a columns_info object.
[in] | cols | columns of a dataframe |
[in] | t | weak or strong (see typing ) |
Definition at line 30 of file category_set.cc.
|
inline |
Definition at line 80 of file category_set.h.
const category_info & vita::category_set::category | ( | category_t | category | ) | const |
[in] | category | a category |
Definition at line 64 of file category_set.cc.
const category_info & vita::category_set::column | ( | const std::string & | name | ) | const |
[in] | name | column name |
Definition at line 88 of file category_set.cc.
const category_info & vita::category_set::column | ( | std::size_t | i | ) | const |
[in] | i | index of a dataframe column |
Definition at line 78 of file category_set.cc.
|
inline |
Definition at line 81 of file category_set.h.
bool vita::category_set::is_valid | ( | ) | const |
true
if the object satisfies class invariants Definition at line 114 of file category_set.cc.
std::set< category_t > vita::category_set::used_categories | ( | ) | const |
Definition at line 101 of file category_set.cc.