55 const struct Cl *src);
72 const double *x,
const double *y);
void cond_rectangle_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
Copies a hyperrectangle condition from one classifier to another.
void cond_rectangle_free(const struct XCSF *xcsf, const struct Cl *c)
Frees the memory used by a hyperrectangle condition.
static struct CondVtbl const cond_rectangle_vtbl
Hyperrectangle condition implemented functions.
bool cond_rectangle_general(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Returns whether classifier c1 has a condition more general than c2.
void cond_rectangle_json_import(const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
Creates a hyperrectangle from a cJSON object.
char * cond_rectangle_json_export(const struct XCSF *xcsf, const struct Cl *c)
Returns a json formatted string representation of a hyperrectangle.
void cond_rectangle_print(const struct XCSF *xcsf, const struct Cl *c)
Prints a hyperrectangle condition.
void cond_rectangle_update(const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
Updates a hyperrectangle, sliding the centers towards the mean input.
void cond_rectangle_init(const struct XCSF *xcsf, struct Cl *c)
Creates and initialises a hyperrectangle condition.
size_t cond_rectangle_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
Writes a hyperrectangle condition to a file.
bool cond_rectangle_mutate(const struct XCSF *xcsf, const struct Cl *c)
Mutates a hyperrectangle condition with the self-adaptive rate.
bool cond_rectangle_crossover(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Performs uniform crossover with two hyperrectangle conditions.
double cond_rectangle_size(const struct XCSF *xcsf, const struct Cl *c)
Returns the size of a hyperrectangle condition.
size_t cond_rectangle_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp)
Reads a hyperrectangle condition from a file.
void cond_rectangle_cover(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Generates a hyperrectangle that matches the current input.
bool cond_rectangle_match(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Calculates whether a hyperrectangle condition matches an input.
Interface for classifier conditions.
Classifier data structure.
Hyperrectangle condition data structure.
double * b2
Spreads for CSR, second bound for UBR.
double * mu
Mutation rates.
double * b1
Centers for CSR, first bound for UBR.
Condition interface data structure.