#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "assert.h"
#include "gettext.h"
#include "modsup.h"
#include "chromo.h"
#include "data.h"
Functions | |
table * | table_new (int typenum, int tuplenum) |
Allocates a new table structure. | |
void | table_free (table *tab) |
Free a table structure. | |
population * | population_new (int size, int typenum, int tuplenum) |
Allocates population structure. | |
void | population_free (population *pop) |
Free all allocated memory in a population struct. | |
population * | population_load (char *filename) |
Loads population from a file. | |
int | population_save (char *filename, population *pop) |
Saves population to a file. |
void population_free | ( | population * | pop | ) |
Free all allocated memory in a population struct.
pop | Pointer to the population struct to be freed. |
population* population_load | ( | char * | filename | ) |
Loads population from a file.
filename | Name of the file with the saved population. |
population* population_new | ( | int | size, | |
int | typenum, | |||
int | tuplenum | |||
) |
Allocates population structure.
size | Size of the population. | |
typenum | Number of defined resource types. | |
tuplenum | Number of defined tuples. |
int population_save | ( | char * | filename, | |
population * | pop | |||
) |
Saves population to a file.
filename | Name of the file for the saved population. | |
pop | Pointer to the population struct to be saved. |
void table_free | ( | table * | tab | ) |
Free a table structure.
tab | Pointer to the table structure. |
table* table_new | ( | int | typenum, | |
int | tuplenum | |||
) |
Allocates a new table structure.
typenum | Number of defined resource types. | |
tuplenum | Number of defined tuples. |