XCSF  1.4.7
XCSF learning classifier system
condition.h File Reference

Interface for classifier conditions. More...

#include "xcsf.h"
Include dependency graph for condition.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ArgsCond
 Parameters for initialising and operating conditions. More...
 
struct  CondVtbl
 Condition interface data structure. More...
 

Macros

#define COND_TYPE_INVALID   (-1)
 Error code for invalid condition. More...
 
#define COND_TYPE_DUMMY   (0)
 Condition type dummy. More...
 
#define COND_TYPE_HYPERRECTANGLE_CSR   (1)
 Condition type CSR hyperrectangle. More...
 
#define COND_TYPE_HYPERRECTANGLE_UBR   (2)
 Condition type UBR hyperrectangle. More...
 
#define COND_TYPE_HYPERELLIPSOID   (3)
 Condition type hyperellipsoid. More...
 
#define COND_TYPE_NEURAL   (4)
 Condition type neural network. More...
 
#define COND_TYPE_GP   (5)
 Condition type tree GP. More...
 
#define COND_TYPE_DGP   (6)
 Condition type DGP. More...
 
#define COND_TYPE_TERNARY   (7)
 Condition type ternary. More...
 
#define RULE_TYPE_DGP   (11)
 Condition type and action type DGP. More...
 
#define RULE_TYPE_NEURAL   (12)
 Condition type and action type neural. More...
 
#define RULE_TYPE_NETWORK   (13)
 Condition type and prediction type neural. More...
 
#define COND_STRING_DUMMY   ("dummy\0")
 Dummy. More...
 
#define COND_STRING_HYPERRECTANGLE_CSR   ("hyperrectangle_csr\0")
 CSR. More...
 
#define COND_STRING_HYPERRECTANGLE_UBR   ("hyperrectangle_ubr\0")
 UBR. More...
 
#define COND_STRING_HYPERELLIPSOID   ("hyperellipsoid\0")
 Hyperellipsoid. More...
 
#define COND_STRING_NEURAL   ("neural\0")
 Neural. More...
 
#define COND_STRING_GP   ("tree_gp\0")
 Tree GP. More...
 
#define COND_STRING_DGP   ("dgp\0")
 DGP. More...
 
#define COND_STRING_TERNARY   ("ternary\0")
 Ternary. More...
 
#define COND_STRING_RULE_DGP   ("rule_dgp\0")
 Rule DGP. More...
 
#define COND_STRING_RULE_NEURAL   ("rule_neural\0")
 Rule neural. More...
 
#define COND_STRING_RULE_NETWORK   ("rule_network\0")
 Rule network. More...
 
#define COND_TYPE_OPTIONS
 

Functions

void condition_set (const struct XCSF *xcsf, struct Cl *c)
 Sets a classifier's condition functions to the implementations. More...
 
const char * condition_type_as_string (const int type)
 Returns a string representation of a condition type from an integer. More...
 
int condition_type_as_int (const char *type)
 Returns the integer representation of a condition type given a name. More...
 
void cond_param_defaults (struct XCSF *xcsf)
 Initialises default condition parameters. More...
 
void cond_param_free (struct XCSF *xcsf)
 Frees condition parameters. More...
 
char * cond_param_json_import (struct XCSF *xcsf, cJSON *json)
 Sets the condition parameters from a cJSON object. More...
 
char * cond_param_json_export (const struct XCSF *xcsf)
 Returns a json formatted string of the condition parameters. More...
 
size_t cond_param_save (const struct XCSF *xcsf, FILE *fp)
 Saves condition parameters. More...
 
size_t cond_param_load (struct XCSF *xcsf, FILE *fp)
 Loads condition parameters. More...
 
static size_t cond_save (const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
 Writes the condition to a file. More...
 
static size_t cond_load (const struct XCSF *xcsf, struct Cl *c, FILE *fp)
 Reads the condition from a file. More...
 
static double cond_size (const struct XCSF *xcsf, const struct Cl *c)
 Returns the size of the classifier condition. More...
 
static void cond_update (const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
 Updates the classifier's condition. More...
 
static bool cond_crossover (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 Performs classifier condition crossover. More...
 
static bool cond_general (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 Returns whether classifier c1 has a condition more general than c2. More...
 
static bool cond_match (const struct XCSF *xcsf, const struct Cl *c, const double *x)
 Calculates whether the condition matches the input. More...
 
static bool cond_mutate (const struct XCSF *xcsf, const struct Cl *c)
 Performs classifier condition mutation. More...
 
static void cond_copy (const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
 Copies the condition from one classifier to another. More...
 
static void cond_cover (const struct XCSF *xcsf, const struct Cl *c, const double *x)
 Generates a condition that matches the current input. More...
 
static void cond_free (const struct XCSF *xcsf, const struct Cl *c)
 Frees the memory used by the classifier condition. More...
 
static void cond_init (const struct XCSF *xcsf, struct Cl *c)
 Initialises a classifier's condition. More...
 
static void cond_print (const struct XCSF *xcsf, const struct Cl *c)
 Prints the classifier condition. More...
 
static char * cond_json_export (const struct XCSF *xcsf, const struct Cl *c)
 Returns a json formatted string representation of a condition. More...
 
static void cond_json_import (const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
 Creates a condition from a cJSON object. More...
 
void cond_param_set_eta (struct XCSF *xcsf, const double a)
 
void cond_param_set_min (struct XCSF *xcsf, const double a)
 
void cond_param_set_max (struct XCSF *xcsf, const double a)
 
void cond_param_set_p_dontcare (struct XCSF *xcsf, const double a)
 
void cond_param_set_spread_min (struct XCSF *xcsf, const double a)
 
void cond_param_set_bits (struct XCSF *xcsf, const int a)
 
int cond_param_set_type_string (struct XCSF *xcsf, const char *a)
 
void cond_param_set_type (struct XCSF *xcsf, const int a)
 

Detailed Description

Interface for classifier conditions.

Author
Richard Preen rpree.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om
Date
2015–2022.

Definition in file condition.h.

Macro Definition Documentation

◆ COND_STRING_DGP

#define COND_STRING_DGP   ("dgp\0")

DGP.

Definition at line 47 of file condition.h.

◆ COND_STRING_DUMMY

#define COND_STRING_DUMMY   ("dummy\0")

Dummy.

Definition at line 41 of file condition.h.

◆ COND_STRING_GP

#define COND_STRING_GP   ("tree_gp\0")

Tree GP.

Definition at line 46 of file condition.h.

◆ COND_STRING_HYPERELLIPSOID

#define COND_STRING_HYPERELLIPSOID   ("hyperellipsoid\0")

Hyperellipsoid.

Definition at line 44 of file condition.h.

◆ COND_STRING_HYPERRECTANGLE_CSR

#define COND_STRING_HYPERRECTANGLE_CSR   ("hyperrectangle_csr\0")

CSR.

Definition at line 42 of file condition.h.

◆ COND_STRING_HYPERRECTANGLE_UBR

#define COND_STRING_HYPERRECTANGLE_UBR   ("hyperrectangle_ubr\0")

UBR.

Definition at line 43 of file condition.h.

◆ COND_STRING_NEURAL

#define COND_STRING_NEURAL   ("neural\0")

Neural.

Definition at line 45 of file condition.h.

◆ COND_STRING_RULE_DGP

#define COND_STRING_RULE_DGP   ("rule_dgp\0")

Rule DGP.

Definition at line 49 of file condition.h.

◆ COND_STRING_RULE_NETWORK

#define COND_STRING_RULE_NETWORK   ("rule_network\0")

Rule network.

Definition at line 51 of file condition.h.

◆ COND_STRING_RULE_NEURAL

#define COND_STRING_RULE_NEURAL   ("rule_neural\0")

Rule neural.

Definition at line 50 of file condition.h.

◆ COND_STRING_TERNARY

#define COND_STRING_TERNARY   ("ternary\0")

Ternary.

Definition at line 48 of file condition.h.

◆ COND_TYPE_DGP

#define COND_TYPE_DGP   (6)

Condition type DGP.

Definition at line 35 of file condition.h.

◆ COND_TYPE_DUMMY

#define COND_TYPE_DUMMY   (0)

Condition type dummy.

Definition at line 29 of file condition.h.

◆ COND_TYPE_GP

#define COND_TYPE_GP   (5)

Condition type tree GP.

Definition at line 34 of file condition.h.

◆ COND_TYPE_HYPERELLIPSOID

#define COND_TYPE_HYPERELLIPSOID   (3)

Condition type hyperellipsoid.

Definition at line 32 of file condition.h.

◆ COND_TYPE_HYPERRECTANGLE_CSR

#define COND_TYPE_HYPERRECTANGLE_CSR   (1)

Condition type CSR hyperrectangle.

Definition at line 30 of file condition.h.

◆ COND_TYPE_HYPERRECTANGLE_UBR

#define COND_TYPE_HYPERRECTANGLE_UBR   (2)

Condition type UBR hyperrectangle.

Definition at line 31 of file condition.h.

◆ COND_TYPE_INVALID

#define COND_TYPE_INVALID   (-1)

Error code for invalid condition.

Definition at line 28 of file condition.h.

◆ COND_TYPE_NEURAL

#define COND_TYPE_NEURAL   (4)

Condition type neural network.

Definition at line 33 of file condition.h.

◆ COND_TYPE_OPTIONS

#define COND_TYPE_OPTIONS
Value:
"dummy, hyperrectangle_csr, hyperrectangle_ubr, hyperellipsoid, neural, " \
"tree_gp, dgp, ternary, rule_dgp, rule_neural, rule_network"

Definition at line 53 of file condition.h.

◆ COND_TYPE_TERNARY

#define COND_TYPE_TERNARY   (7)

Condition type ternary.

Definition at line 36 of file condition.h.

◆ RULE_TYPE_DGP

#define RULE_TYPE_DGP   (11)

Condition type and action type DGP.

Definition at line 37 of file condition.h.

◆ RULE_TYPE_NETWORK

#define RULE_TYPE_NETWORK   (13)

Condition type and prediction type neural.

Definition at line 39 of file condition.h.

◆ RULE_TYPE_NEURAL

#define RULE_TYPE_NEURAL   (12)

Condition type and action type neural.

Definition at line 38 of file condition.h.

Function Documentation

◆ cond_copy()

static void cond_copy ( const struct XCSF xcsf,
struct Cl dest,
const struct Cl src 
)
static

Copies the condition from one classifier to another.

Parameters
[in]xcsfThe XCSF data structure.
[in]destThe destination classifier.
[in]srcThe source classifier.

Definition at line 241 of file condition.h.

References CondVtbl::cond_impl_copy, and Cl::cond_vptr.

Referenced by cl_copy(), and cl_init_copy().

Here is the caller graph for this function:

◆ cond_cover()

static void cond_cover ( const struct XCSF xcsf,
const struct Cl c,
const double *  x 
)
static

Generates a condition that matches the current input.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is being covered.
[in]xThe input state to cover.

Definition at line 253 of file condition.h.

References CondVtbl::cond_impl_cover, and Cl::cond_vptr.

Referenced by cl_cover().

Here is the caller graph for this function:

◆ cond_crossover()

static bool cond_crossover ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)
static

Performs classifier condition crossover.

Parameters
[in]xcsfThe XCSF data structure.
[in]c1The first classifier whose condition is being crossed.
[in]c2The second classifier whose condition is being crossed.
Returns
Whether any alterations were made.

Definition at line 190 of file condition.h.

References CondVtbl::cond_impl_crossover, and Cl::cond_vptr.

Referenced by cl_crossover().

Here is the caller graph for this function:

◆ cond_free()

static void cond_free ( const struct XCSF xcsf,
const struct Cl c 
)
static

Frees the memory used by the classifier condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is to be freed.

Definition at line 264 of file condition.h.

References CondVtbl::cond_impl_free, and Cl::cond_vptr.

Referenced by cl_free().

Here is the caller graph for this function:

◆ cond_general()

static bool cond_general ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)
static

Returns whether classifier c1 has a condition more general than c2.

Parameters
[in]xcsfThe XCSF data structure.
[in]c1The classifier whose condition is tested to be more general.
[in]c2The classifier whose condition is tested to be more specific.
Returns
Whether the condition of c1 is more general than c2.

Definition at line 204 of file condition.h.

References CondVtbl::cond_impl_general, and Cl::cond_vptr.

Referenced by cl_general().

Here is the caller graph for this function:

◆ cond_init()

static void cond_init ( const struct XCSF xcsf,
struct Cl c 
)
static

Initialises a classifier's condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is to be initialised.

Definition at line 275 of file condition.h.

References CondVtbl::cond_impl_init, and Cl::cond_vptr.

Referenced by cl_rand().

Here is the caller graph for this function:

◆ cond_json_export()

static char* cond_json_export ( const struct XCSF xcsf,
const struct Cl c 
)
static

Returns a json formatted string representation of a condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cClassifier whose condition is to be returned.
Returns
String encoded in json format.

Definition at line 298 of file condition.h.

References CondVtbl::cond_impl_json_export, and Cl::cond_vptr.

Referenced by cl_json_export().

Here is the caller graph for this function:

◆ cond_json_import()

static void cond_json_import ( const struct XCSF xcsf,
struct Cl c,
const cJSON *  json 
)
static

Creates a condition from a cJSON object.

Parameters
[in]xcsfThe XCSF data structure.
[in,out]cThe classifier whose condition is to be initialised.
[in]jsoncJSON object.

Definition at line 310 of file condition.h.

References CondVtbl::cond_impl_json_import, Cl::cond_vptr, condition_type_as_int(), and condition_type_as_string().

Referenced by cl_json_import().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_load()

static size_t cond_load ( const struct XCSF xcsf,
struct Cl c,
FILE *  fp 
)
static

Reads the condition from a file.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is to be read.
[in]fpPointer to the file to be read.
Returns
The number of elements read.

Definition at line 151 of file condition.h.

References CondVtbl::cond_impl_load, and Cl::cond_vptr.

Referenced by cl_load().

Here is the caller graph for this function:

◆ cond_match()

static bool cond_match ( const struct XCSF xcsf,
const struct Cl c,
const double *  x 
)
static

Calculates whether the condition matches the input.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition to match.
[in]xThe input state.
Returns
Whether the condition matches the input.

Definition at line 217 of file condition.h.

References CondVtbl::cond_impl_match, and Cl::cond_vptr.

Referenced by cl_match().

Here is the caller graph for this function:

◆ cond_mutate()

static bool cond_mutate ( const struct XCSF xcsf,
const struct Cl c 
)
static

Performs classifier condition mutation.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is being mutated.
Returns
Whether any alterations were made.

Definition at line 229 of file condition.h.

References CondVtbl::cond_impl_mutate, and Cl::cond_vptr.

Referenced by cl_mutate().

Here is the caller graph for this function:

◆ cond_param_defaults()

void cond_param_defaults ( struct XCSF xcsf)

Initialises default condition parameters.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 166 of file condition.c.

References cond_dgp_param_defaults(), cond_gp_param_defaults(), cond_neural_param_defaults(), cond_param_set_eta(), cond_param_set_max(), cond_param_set_min(), cond_param_set_spread_min(), cond_param_set_type(), cond_ternary_param_defaults(), and COND_TYPE_HYPERRECTANGLE_CSR.

Referenced by param_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_free()

void cond_param_free ( struct XCSF xcsf)

Frees condition parameters.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 365 of file condition.c.

References layer_args_free(), and tree_args_free().

Referenced by param_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_json_export()

char* cond_param_json_export ( const struct XCSF xcsf)

Returns a json formatted string of the condition parameters.

Parameters
[in]xcsfXCSF data structure.
Returns
String encoded in json format.

Definition at line 232 of file condition.c.

References cond_dgp_param_json_export(), cond_gp_param_json_export(), cond_param_json_export_csr(), cond_ternary_param_json_export(), COND_TYPE_DGP, COND_TYPE_GP, COND_TYPE_HYPERELLIPSOID, COND_TYPE_HYPERRECTANGLE_CSR, COND_TYPE_HYPERRECTANGLE_UBR, COND_TYPE_NEURAL, COND_TYPE_TERNARY, condition_type_as_string(), layer_args_json_export(), RULE_TYPE_DGP, RULE_TYPE_NETWORK, RULE_TYPE_NEURAL, and ArgsCond::type.

Referenced by param_json_export().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_json_import()

char* cond_param_json_import ( struct XCSF xcsf,
cJSON *  json 
)

Sets the condition parameters from a cJSON object.

Parameters
[in,out]xcsfThe XCSF data structure.
[in]jsoncJSON object.
Returns
NULL if successful; or the name of parameter if not found.

Definition at line 281 of file condition.c.

References cond_dgp_param_json_import(), cond_gp_param_json_import(), cond_neural_param_json_import(), cond_param_json_import_csr(), cond_ternary_param_json_import(), COND_TYPE_DGP, COND_TYPE_GP, COND_TYPE_HYPERELLIPSOID, COND_TYPE_HYPERRECTANGLE_CSR, COND_TYPE_HYPERRECTANGLE_UBR, COND_TYPE_NEURAL, COND_TYPE_TERNARY, RULE_TYPE_DGP, RULE_TYPE_NETWORK, and RULE_TYPE_NEURAL.

Referenced by param_json_import_condition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_load()

size_t cond_param_load ( struct XCSF xcsf,
FILE *  fp 
)

Loads condition parameters.

Parameters
[in]xcsfThe XCSF data structure.
[in]fpPointer to the output file.
Returns
The total number of elements written.

Definition at line 343 of file condition.c.

References ArgsCond::bits, ArgsCond::dargs, ArgsCond::eta, graph_args_load(), ArgsCond::largs, layer_args_load(), ArgsCond::max, ArgsCond::min, ArgsCond::p_dontcare, ArgsCond::spread_min, ArgsCond::targs, tree_args_load(), and ArgsCond::type.

Referenced by param_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_save()

size_t cond_param_save ( const struct XCSF xcsf,
FILE *  fp 
)

Saves condition parameters.

Parameters
[in]xcsfThe XCSF data structure.
[in]fpPointer to the output file.
Returns
The total number of elements written.

Definition at line 319 of file condition.c.

References ArgsCond::bits, ArgsCond::dargs, ArgsCond::eta, graph_args_save(), ArgsCond::largs, layer_args_save(), ArgsCond::max, ArgsCond::min, ArgsCond::p_dontcare, ArgsCond::spread_min, ArgsCond::targs, tree_args_save(), and ArgsCond::type.

Referenced by param_save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_param_set_bits()

void cond_param_set_bits ( struct XCSF xcsf,
const int  a 
)

Definition at line 429 of file condition.c.

Referenced by cond_ternary_param_defaults(), and cond_ternary_param_json_import().

Here is the caller graph for this function:

◆ cond_param_set_eta()

void cond_param_set_eta ( struct XCSF xcsf,
const double  a 
)

Definition at line 378 of file condition.c.

Referenced by cond_param_defaults(), and cond_param_json_import_csr().

Here is the caller graph for this function:

◆ cond_param_set_max()

void cond_param_set_max ( struct XCSF xcsf,
const double  a 
)

Definition at line 398 of file condition.c.

Referenced by cond_param_defaults(), and cond_param_json_import_csr().

Here is the caller graph for this function:

◆ cond_param_set_min()

void cond_param_set_min ( struct XCSF xcsf,
const double  a 
)

Definition at line 392 of file condition.c.

Referenced by cond_param_defaults(), and cond_param_json_import_csr().

Here is the caller graph for this function:

◆ cond_param_set_p_dontcare()

void cond_param_set_p_dontcare ( struct XCSF xcsf,
const double  a 
)

Definition at line 404 of file condition.c.

Referenced by cond_ternary_param_defaults(), and cond_ternary_param_json_import().

Here is the caller graph for this function:

◆ cond_param_set_spread_min()

void cond_param_set_spread_min ( struct XCSF xcsf,
const double  a 
)

Definition at line 418 of file condition.c.

Referenced by cond_param_defaults(), and cond_param_json_import_csr().

Here is the caller graph for this function:

◆ cond_param_set_type()

void cond_param_set_type ( struct XCSF xcsf,
const int  a 
)

Definition at line 450 of file condition.c.

Referenced by cond_param_defaults().

Here is the caller graph for this function:

◆ cond_param_set_type_string()

int cond_param_set_type_string ( struct XCSF xcsf,
const char *  a 
)

Definition at line 440 of file condition.c.

References COND_TYPE_INVALID, condition_type_as_int(), and ArgsCond::type.

Referenced by param_json_import_condition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cond_print()

static void cond_print ( const struct XCSF xcsf,
const struct Cl c 
)
static

Prints the classifier condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is to be printed.

Definition at line 286 of file condition.h.

References CondVtbl::cond_impl_print, and Cl::cond_vptr.

◆ cond_save()

static size_t cond_save ( const struct XCSF xcsf,
const struct Cl c,
FILE *  fp 
)
static

Writes the condition to a file.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition is to be written.
[in]fpPointer to the file to be written.
Returns
The number of elements written.

Definition at line 138 of file condition.h.

References CondVtbl::cond_impl_save, and Cl::cond_vptr.

Referenced by cl_save().

Here is the caller graph for this function:

◆ cond_size()

static double cond_size ( const struct XCSF xcsf,
const struct Cl c 
)
static

Returns the size of the classifier condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier whose condition size to return.
Returns
The size of the condition.

Definition at line 163 of file condition.h.

References CondVtbl::cond_impl_size, and Cl::cond_vptr.

Referenced by cl_cond_size().

Here is the caller graph for this function:

◆ cond_update()

static void cond_update ( const struct XCSF xcsf,
const struct Cl c,
const double *  x,
const double *  y 
)
static

Updates the classifier's condition.

Parameters
[in]xcsfThe XCSF data structure.
[in]cClassifier whose condition is to be updated.
[in]xInput state.
[in]yTruth/payoff value.

Definition at line 176 of file condition.h.

References CondVtbl::cond_impl_update, and Cl::cond_vptr.

Referenced by cl_update().

Here is the caller graph for this function:

◆ condition_set()

void condition_set ( const struct XCSF xcsf,
struct Cl c 
)

Sets a classifier's condition functions to the implementations.

Parameters
[in]xcsfThe XCSF data structure.
[in]cThe classifier to set.

Definition at line 41 of file condition.c.

References Cl::act_vptr, cond_dgp_vtbl, cond_dummy_vtbl, cond_ellipsoid_vtbl, cond_gp_vtbl, cond_neural_vtbl, cond_rectangle_vtbl, cond_ternary_vtbl, COND_TYPE_DGP, COND_TYPE_DUMMY, COND_TYPE_GP, COND_TYPE_HYPERELLIPSOID, COND_TYPE_HYPERRECTANGLE_CSR, COND_TYPE_HYPERRECTANGLE_UBR, COND_TYPE_NEURAL, COND_TYPE_TERNARY, Cl::cond_vptr, rule_dgp_act_vtbl, rule_dgp_cond_vtbl, rule_neural_act_vtbl, rule_neural_cond_vtbl, RULE_TYPE_DGP, and RULE_TYPE_NEURAL.

Referenced by cl_load(), and cl_rand().

Here is the caller graph for this function:

◆ condition_type_as_int()

int condition_type_as_int ( const char *  type)

Returns the integer representation of a condition type given a name.

Parameters
[in]typeString representation of a condition type.
Returns
Integer representing the condition type.

Definition at line 123 of file condition.c.

References COND_STRING_DGP, COND_STRING_DUMMY, COND_STRING_GP, COND_STRING_HYPERELLIPSOID, COND_STRING_HYPERRECTANGLE_CSR, COND_STRING_HYPERRECTANGLE_UBR, COND_STRING_NEURAL, COND_STRING_RULE_DGP, COND_STRING_RULE_NETWORK, COND_STRING_RULE_NEURAL, COND_STRING_TERNARY, COND_TYPE_DGP, COND_TYPE_DUMMY, COND_TYPE_GP, COND_TYPE_HYPERELLIPSOID, COND_TYPE_HYPERRECTANGLE_CSR, COND_TYPE_HYPERRECTANGLE_UBR, COND_TYPE_INVALID, COND_TYPE_NEURAL, COND_TYPE_TERNARY, RULE_TYPE_DGP, RULE_TYPE_NETWORK, and RULE_TYPE_NEURAL.

Referenced by cond_json_import(), and cond_param_set_type_string().

Here is the caller graph for this function:

◆ condition_type_as_string()

const char* condition_type_as_string ( const int  type)

Returns a string representation of a condition type from an integer.

Parameters
[in]typeInteger representation of a condition type.
Returns
String representing the name of the condition type.

Definition at line 86 of file condition.c.

References COND_STRING_DGP, COND_STRING_DUMMY, COND_STRING_GP, COND_STRING_HYPERELLIPSOID, COND_STRING_HYPERRECTANGLE_CSR, COND_STRING_HYPERRECTANGLE_UBR, COND_STRING_NEURAL, COND_STRING_RULE_DGP, COND_STRING_RULE_NETWORK, COND_STRING_RULE_NEURAL, COND_STRING_TERNARY, COND_TYPE_DGP, COND_TYPE_DUMMY, COND_TYPE_GP, COND_TYPE_HYPERELLIPSOID, COND_TYPE_HYPERRECTANGLE_CSR, COND_TYPE_HYPERRECTANGLE_UBR, COND_TYPE_NEURAL, COND_TYPE_TERNARY, RULE_TYPE_DGP, RULE_TYPE_NETWORK, and RULE_TYPE_NEURAL.

Referenced by cond_json_import(), and cond_param_json_export().

Here is the caller graph for this function: