XCSF  1.4.7
XCSF learning classifier system
cond_dummy.h
Go to the documentation of this file.
1 /*
2  * This program is free software: you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation, either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program. If not, see <http://www.gnu.org/licenses/>.
14  */
15 
24 #pragma once
25 
26 #include "condition.h"
27 #include "xcsf.h"
28 
29 bool
30 cond_dummy_crossover(const struct XCSF *xcsf, const struct Cl *c1,
31  const struct Cl *c2);
32 
33 bool
34 cond_dummy_general(const struct XCSF *xcsf, const struct Cl *c1,
35  const struct Cl *c2);
36 
37 bool
38 cond_dummy_match(const struct XCSF *xcsf, const struct Cl *c, const double *x);
39 
40 bool
41 cond_dummy_mutate(const struct XCSF *xcsf, const struct Cl *c);
42 
43 void
44 cond_dummy_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src);
45 
46 void
47 cond_dummy_cover(const struct XCSF *xcsf, const struct Cl *c, const double *x);
48 
49 void
50 cond_dummy_free(const struct XCSF *xcsf, const struct Cl *c);
51 
52 void
53 cond_dummy_init(const struct XCSF *xcsf, struct Cl *c);
54 
55 void
56 cond_dummy_print(const struct XCSF *xcsf, const struct Cl *c);
57 
58 void
59 cond_dummy_update(const struct XCSF *xcsf, const struct Cl *c, const double *x,
60  const double *y);
61 
62 double
63 cond_dummy_size(const struct XCSF *xcsf, const struct Cl *c);
64 
65 size_t
66 cond_dummy_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp);
67 
68 size_t
69 cond_dummy_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp);
70 
71 char *
72 cond_dummy_json_export(const struct XCSF *xcsf, const struct Cl *c);
73 
74 void
75 cond_dummy_json_import(const struct XCSF *xcsf, struct Cl *c,
76  const cJSON *json);
77 
81 static struct CondVtbl const cond_dummy_vtbl = {
87 };
char * cond_dummy_json_export(const struct XCSF *xcsf, const struct Cl *c)
Returns a json formatted string representation of a dummy condition.
Definition: cond_dummy.c:226
void cond_dummy_cover(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Dummy cover function.
Definition: cond_dummy.c:72
void cond_dummy_init(const struct XCSF *xcsf, struct Cl *c)
Dummy initialisation function.
Definition: cond_dummy.c:33
bool cond_dummy_crossover(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Dummy crossover function.
Definition: cond_dummy.c:120
bool cond_dummy_match(const struct XCSF *xcsf, const struct Cl *c, const double *x)
Dummy match function.
Definition: cond_dummy.c:104
bool cond_dummy_mutate(const struct XCSF *xcsf, const struct Cl *c)
Dummy mutate function.
Definition: cond_dummy.c:136
static struct CondVtbl const cond_dummy_vtbl
Dummy condition implemented functions.
Definition: cond_dummy.h:81
void cond_dummy_print(const struct XCSF *xcsf, const struct Cl *c)
Dummy print function.
Definition: cond_dummy.c:166
void cond_dummy_copy(const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
Dummy copy function.
Definition: cond_dummy.c:58
size_t cond_dummy_save(const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
Dummy save function.
Definition: cond_dummy.c:195
bool cond_dummy_general(const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
Dummy general function.
Definition: cond_dummy.c:151
double cond_dummy_size(const struct XCSF *xcsf, const struct Cl *c)
Dummy size function.
Definition: cond_dummy.c:180
void cond_dummy_update(const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
Dummy update function.
Definition: cond_dummy.c:87
size_t cond_dummy_load(const struct XCSF *xcsf, struct Cl *c, FILE *fp)
Dummy load function.
Definition: cond_dummy.c:211
void cond_dummy_json_import(const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
Dummy import function.
Definition: cond_dummy.c:244
void cond_dummy_free(const struct XCSF *xcsf, const struct Cl *c)
Dummy free function.
Definition: cond_dummy.c:45
Interface for classifier conditions.
Definition: __init__.py:1
Classifier data structure.
Definition: xcsf.h:45
Condition interface data structure.
Definition: condition.h:104
XCSF data structure.
Definition: xcsf.h:85
XCSF data structures.