65 const struct Cl *src);
82 const double *x,
const double *y);
double cond_ternary_size(const struct XCSF *xcsf, const struct Cl *c)
Returns the size of a ternary condition.
static struct CondVtbl const cond_ternary_vtbl
Ternary condition implemented functions.
void cond_ternary_init(const struct XCSF *xcsf, struct Cl *c)
Creates and initialises a ternary bitstring condition.
bool cond_ternary_match(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Calculates whether a ternary condition matches an input.
char * cond_ternary_param_json_export(const struct XCSF *xcsf)
Returns a json formatted string of the ternary parameters.
void cond_ternary_update(const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
Dummy update function.
bool cond_ternary_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_ternary_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
Copies a ternary condition from one classifier to another.
char * cond_ternary_param_json_import(struct XCSF *xcsf, cJSON *json)
Sets the ternary parameters from a cJSON object.
void cond_ternary_cover(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Generates a ternary condition that matches the current input.
bool cond_ternary_mutate(const struct XCSF *xcsf, const struct Cl *c)
Mutates a ternary condition.
void cond_ternary_print(const struct XCSF *xcsf, const struct Cl *c)
Prints a ternary condition.
void cond_ternary_json_import(const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
Creates a ternary condition from a cJSON object.
void cond_ternary_free(const struct XCSF *xcsf, const struct Cl *c)
Frees the memory used by a ternary condition.
bool cond_ternary_crossover(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Performs uniform crossover with two ternary conditions.
size_t cond_ternary_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
Writes a ternary condition to a file.
char * cond_ternary_json_export(const struct XCSF *xcsf, const struct Cl *c)
Returns a json formatted string representation of a ternary condition.
void cond_ternary_param_defaults(struct XCSF *xcsf)
Initialises default ternary condition parameters.
size_t cond_ternary_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp)
Reads a ternary condition from a file.
Interface for classifier conditions.
Classifier data structure.
Ternary condition data structure.
int length
Length of the bitstring.
char * string
Ternary bitstring.
double * mu
Mutation rates.
char * tmp_input
Temporary storage for float conversion.
Condition interface data structure.