Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 addCustomNodeFunction
 addNodeFunction
C
 clearFunctionSet
 copyChromosome
E
 executeChromosome
F
 freeChromosome
 freeDataSet
 freeParameters
 freeResults
G
 getAverageActiveNodes
 getAverageFitness
 getAverageGenerations
 getChromosome
 getChromosomeFitness
 getChromosomeGenerations
 getChromosomeNodeArity
 getChromosomeNodeValue
 getChromosomeOutput
 getDataSetSampleInput
 getDataSetSampleInputs
 getDataSetSampleOutput
 getDataSetSampleOutputs
 getMedianActiveNodes
 getMedianFitness
 getMedianGenerations
 getNumChromosomeActiveConnections
 getNumChromosomeActiveNodes
 getNumChromosomeInputs
 getNumChromosomeNodes
 getNumChromosomeOutputs
 getNumChromosomes
 getNumDataSetInputs
 getNumDataSetOutputs
 getNumDataSetSamples
I
 initialiseChromosome
 initialiseChromosomeFromChromosome
 initialiseChromosomeFromFile
 initialiseDataSetFromArrays
 initialiseDataSetFromFile
 initialiseParameters
 isNodeActive
M
 mutateChromosome
P
 printChromosome
 printDataSet
 printParameters
R
 removeInactiveNodes
 repeatCGP
 resetChromosome
 runCGP
DLL_EXPORT void addCustomNodeFunction(
   struct parameters *params,
   double (*function)(const int numInputs, const double *inputs, const double *weights),
   char const *functionName,
   int maxNumInputs
)
Adds custom node function to the set of functions stored by a parameters structure.
DLL_EXPORT void addNodeFunction(struct parameters *params,
char const *functionNames)
Adds pre-defined node function(s) to the set of functions stored by a parameters structure.
DLL_EXPORT void clearFunctionSet(struct parameters *params)
Resets the function set stored by a parameters structure to contain no functions.
DLL_EXPORT void copyChromosome(struct chromosome *chromoDest,
struct chromosome *chromoSrc)
Copies the contents of one chromoosme into the other.
DLL_EXPORT void executeChromosome(struct chromosome *chromo,
const double *inputs)
Executes the given chromosome.
DLL_EXPORT void freeChromosome(struct chromosome *chromo)
Frees chromosome instance.
DLL_EXPORT void freeDataSet(struct dataSet *data)
Frees dataSet instance.
DLL_EXPORT void freeParameters(struct parameters *params)
Frees parameters structure instance.
DLL_EXPORT void freeResults(struct results *rels)
Frees results instance.
DLL_EXPORT double getAverageActiveNodes(struct results *rels)
Gets the average number of active nodes of the best chromosome found for each run in results.
DLL_EXPORT double getAverageFitness(struct results *rels)
Gets the average fitness of the best chromosome found for each run in results.
DLL_EXPORT double getAverageGenerations(struct results *rels)
Gets the average number generations required to find the best best chromosome for each run in results.
DLL_EXPORT struct chromosome* getChromosome(struct results *rels,
int run)
Gets a copy of the best chromosome found on the given run in an initialised results structure.
DLL_EXPORT double getChromosomeFitness(struct chromosome *chromo)
Gets the fitness of the given chromosome
DLL_EXPORT int getChromosomeGenerations(struct chromosome *chromo)
Gets the number of generations for which the given chromosome has been trained.
DLL_EXPORT int getChromosomeNodeArity(struct chromosome *chromo,
int index)
Gets the arity of the chromosome nodes
DLL_EXPORT double getChromosomeNodeValue(struct chromosome *chromo,
int node)
Gets the node value of the given chromosome and node after it has been executed using executeChromosome.
DLL_EXPORT double getChromosomeOutput(struct chromosome *chromo,
int output)
Gets the outputs of the given chromosome after it has been executed using executeChromosome.
DLL_EXPORT double getDataSetSampleInput(struct dataSet *data,
int sample,
int input)
Gets the dataSet input for the given sample index and input index.
DLL_EXPORT double *getDataSetSampleInputs(struct dataSet *data,
int sample)
Gets the dataSet inputs for the given sample index.
DLL_EXPORT double getDataSetSampleOutput(struct dataSet *data,
int sample,
int output)
Gets the dataSet output for the given sample index and output index.
DLL_EXPORT double *getDataSetSampleOutputs(struct dataSet *data,
int sample)
Gets the dataSet outputs for the given sample index.
DLL_EXPORT double getMedianActiveNodes(struct results *rels)
Gets the median number of active nodes of the best chromosome found for each run in results.
DLL_EXPORT double getMedianFitness(struct results *rels)
Gets the median fitness of the best chromosome found for each run in results.
DLL_EXPORT double getMedianGenerations(struct results *rels)
Gets the median number generations required to find the best best chromosome for each run in results.
DLL_EXPORT int getNumChromosomeActiveConnections(struct chromosome *chromo)
Gets the number of active connections in the given chromosome
DLL_EXPORT int getNumChromosomeActiveNodes(struct chromosome *chromo)
Gets the number of chromosome active nodes
DLL_EXPORT int getNumChromosomeInputs(struct chromosome *chromo)
Gets the number of chromosome inputs
DLL_EXPORT int getNumChromosomeNodes(struct chromosome *chromo)
Gets the number of chromosome nodes
DLL_EXPORT int getNumChromosomeOutputs(struct chromosome *chromo)
Gets the number of chromosome outputs
DLL_EXPORT int getNumChromosomes(struct results *rels)
Gets number of chromosomes stored in the given results structure.
DLL_EXPORT int getNumDataSetInputs(struct dataSet *data)
Gets the number of dataSet inputs.
DLL_EXPORT int getNumDataSetOutputs(struct dataSet *data)
Gets the number of dataSet outputs.
DLL_EXPORT int getNumDataSetSamples(struct dataSet *data)
Gets the number of samples in the given dataSet.
DLL_EXPORT struct chromosome *initialiseChromosome(struct parameters *params)
Initialises a chromosome based on the given parameters.
DLL_EXPORT struct chromosome *initialiseChromosomeFromChromosome(
   struct chromosome *chromo
)
Initialises a chromosome from a given chromosome.
DLL_EXPORT struct chromosome* initialiseChromosomeFromFile(char const *file)
Initialises a chromosome from a given previously saved chromosome.
DLL_EXPORT struct dataSet *initialiseDataSetFromArrays(int numInputs,
int numOutputs,
int numSamples,
double *inputs,
double *outputs)
Initialises a dataSet structures using the given input output pairs.
DLL_EXPORT struct dataSet *initialiseDataSetFromFile(char const *file)
Initialises a dataSet structures using the given file.
DLL_EXPORT struct parameters *initialiseParameters(const int numInputs,
const int numNodes,
const int numOutputs,
const int arity)
Initialises a parameters structure used throughout the CGP-Library.
DLL_EXPORT int isNodeActive(struct chromosome *chromo,
int node)
Returns whether the given node in the given chromosome is active.
DLL_EXPORT void mutateChromosome(struct parameters *params,
struct chromosome *chromo)
Mutate the given chromosome using the mutation method described in the given parameters.
DLL_EXPORT void printChromosome(struct chromosome *chromo,
int weights)
Displays the given chromosome to the terminal / command prompt in a human readable format.
DLL_EXPORT void printDataSet(struct dataSet *data)
Prints the input output pairs held by a dataSet structure to the terminal.
DLL_EXPORT void printParameters(struct parameters *params)
Prints the given parameters to the screen in a human readable format.
DLL_EXPORT void removeInactiveNodes(struct chromosome *chromo)
Removes all of the inactive nodes from the given chromosome.
DLL_EXPORT struct results* repeatCGP(struct parameters *params,
struct dataSet *data,
int numGens,
int numRuns)
Repeatedly applies CGP to the given task.
DLL_EXPORT void resetChromosome(struct chromosome *chromo)
Resets all of the chromosome nodes to output zero.
DLL_EXPORT struct chromosome* runCGP(struct parameters *params,
struct dataSet *data,
int numGens)
Applies CGP to the given task.
Close