XCSF  1.4.7
XCSF learning classifier system
env_csv.h File Reference

CSV input file handling functions. More...

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

Go to the source code of this file.

Data Structures

struct  EnvCSV
 CSV environment data structure. More...
 

Functions

bool env_csv_is_done (const struct XCSF *xcsf)
 Returns whether the csv environment is in a terminal state. More...
 
bool env_csv_multistep (const struct XCSF *xcsf)
 Returns whether the csv environment is a multistep problem. More...
 
double env_csv_execute (const struct XCSF *xcsf, const int action)
 Dummy method since no action is executed by the csv environment. More...
 
double env_csv_maxpayoff (const struct XCSF *xcsf)
 Returns the maximum payoff value possible in the csv environment. More...
 
const double * env_csv_get_state (const struct XCSF *xcsf)
 Dummy method since no state is returned by the csv environment. More...
 
void env_csv_free (const struct XCSF *xcsf)
 Frees the csv environment. More...
 
void env_csv_init (struct XCSF *xcsf, const char *filename)
 Initialises a CSV input environment from a specified filename. More...
 
void env_csv_reset (const struct XCSF *xcsf)
 Dummy method since no csv environment reset is necessary. More...
 

Variables

static struct EnvVtbl const env_csv_vtbl
 csv input environment implemented functions. More...
 

Detailed Description

CSV input file handling functions.

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

Definition in file env_csv.h.

Function Documentation

◆ env_csv_execute()

double env_csv_execute ( const struct XCSF xcsf,
const int  action 
)

Dummy method since no action is executed by the csv environment.

Parameters
[in]xcsfThe XCSF data structure.
[in]actionThe selected action.
Returns
0.

Definition at line 230 of file env_csv.c.

◆ env_csv_free()

void env_csv_free ( const struct XCSF xcsf)

Frees the csv environment.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 177 of file env_csv.c.

References EnvCSV::test_data, EnvCSV::train_data, Input::x, and Input::y.

◆ env_csv_get_state()

const double* env_csv_get_state ( const struct XCSF xcsf)

Dummy method since no state is returned by the csv environment.

Parameters
[in]xcsfThe XCSF data structure.
Returns
0.

Definition at line 217 of file env_csv.c.

◆ env_csv_init()

void env_csv_init ( struct XCSF xcsf,
const char *  filename 
)

Initialises a CSV input environment from a specified filename.

Parameters
[in]xcsfThe XCSF data structure.
[in]filenameThe file name of the csv data.

Definition at line 160 of file env_csv.c.

References env_csv_input_read(), param_init(), EnvCSV::test_data, EnvCSV::train_data, Input::x_dim, and Input::y_dim.

Referenced by env_init().

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

◆ env_csv_is_done()

bool env_csv_is_done ( const struct XCSF xcsf)

Returns whether the csv environment is in a terminal state.

Parameters
[in]xcsfThe XCSF data structure.
Returns
True.

Definition at line 205 of file env_csv.c.

◆ env_csv_maxpayoff()

double env_csv_maxpayoff ( const struct XCSF xcsf)

Returns the maximum payoff value possible in the csv environment.

Parameters
[in]xcsfThe XCSF data structure.
Returns
0.

Definition at line 255 of file env_csv.c.

◆ env_csv_multistep()

bool env_csv_multistep ( const struct XCSF xcsf)

Returns whether the csv environment is a multistep problem.

Parameters
[in]xcsfThe XCSF data structure.
Returns
False.

Definition at line 243 of file env_csv.c.

◆ env_csv_reset()

void env_csv_reset ( const struct XCSF xcsf)

Dummy method since no csv environment reset is necessary.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 194 of file env_csv.c.

Variable Documentation

◆ env_csv_vtbl

struct EnvVtbl const env_csv_vtbl
static
Initial value:
= {
}
bool env_csv_multistep(const struct XCSF *xcsf)
Returns whether the csv environment is a multistep problem.
Definition: env_csv.c:243
const double * env_csv_get_state(const struct XCSF *xcsf)
Dummy method since no state is returned by the csv environment.
Definition: env_csv.c:217
double env_csv_execute(const struct XCSF *xcsf, const int action)
Dummy method since no action is executed by the csv environment.
Definition: env_csv.c:230
bool env_csv_is_done(const struct XCSF *xcsf)
Returns whether the csv environment is in a terminal state.
Definition: env_csv.c:205
void env_csv_reset(const struct XCSF *xcsf)
Dummy method since no csv environment reset is necessary.
Definition: env_csv.c:194
double env_csv_maxpayoff(const struct XCSF *xcsf)
Returns the maximum payoff value possible in the csv environment.
Definition: env_csv.c:255
void env_csv_free(const struct XCSF *xcsf)
Frees the csv environment.
Definition: env_csv.c:177

csv input environment implemented functions.

Definition at line 59 of file env_csv.h.

Referenced by env_init().