Logo Search packages:      
Sourcecode: tablix2 version File versions  Download package

data.h File Reference


Detailed Description

Definition in file data.h.

#include "config.h"
#include "chromo.h"

Go to the source code of this file.

Classes

struct  ext_t
 Extension structure. More...
struct  miscinfo_t
 Structure holding miscellaneous information about the timetable. More...
struct  outputext_t
 Output extension structure. More...
struct  slist_t
 Slist structure. More...
struct  tuplelist_t
 A list of tuple IDs. More...

Defines

#define res_get_conflict(restype, resid1, resid2)   ((restype)->conflicts[resid1][resid2])
 Get conflict between two resources.

Typedefs

typedef struct ext_t ext
typedef struct miscinfo_t miscinfo
typedef struct outputext_t outputext
typedef struct slist_t slist
typedef struct tuplelist_t tuplelist

Functions

void data_exit ()
 Free all memory allocated by restype_new(), res_new(), domain_new() and tuple_new().
int data_init ()
 Prepare data structures for use.
void domain_and (domain *dom, int *val, int valnum)
 Removes some values from a domain.
int domain_rand (domain *dom)
 Returns a random value from a domain.
extext_new (ext **ex, int contype, int vartype)
 Allocate a new extension struct in a linked list.
void ext_update (ext *ex, table *tab)
 Update extension with new data from a timetable.
void outputext_free (outputext *dest)
 Free an output extension struct.
outputextoutputext_new (char *contype, char *vartype)
 Allocate a new output extension struct.
int outputext_update (outputext *ex, table *tab)
 Update output extension with new data from a timetable.
void population_hint (population *pop, int hintpart)
 Hint a part of the population.
populationpopulation_init (population *pop, int size)
 Initializes population structure.
void population_rand (population *pop)
 Randomize the entire population.
resourceres_find (resourcetype *restype, char *name)
 Find a resource by name.
int res_findid (resourcetype *restype, char *name)
 Find a resource by name and return its resource ID.
int res_get_matrix (resourcetype *restype, int *width, int *height)
 Finds the dimensions of a matrix of resources.
resourceres_new (resourcetype *restype, char *name)
 Add a new resource to a resource type.
resourceres_new_matrix (resourcetype *restype, int width, int height)
 Adds a matrix of resources to a resource type.
void res_set_conflict (resource *res1, resource *res2)
 Set conflict between resource res1 and resource res2.
resourcetyperestype_find (char *type)
 Find a resource type by name.
int restype_findid (char *type)
 Find a resource type (either variable or constant) by name and return a resource type ID.
resourcetyperestype_new (int var, char *type)
 Define a new resource type.
slistslist_new (slist **list, int vartype)
 Allocate a new slist struct in a linked list.
void slist_update (slist *list, table *tab)
 Update slist with new data from a timetable.
tupleinfotuple_new (char *name)
 Add a new tuple.
void tuple_set (tupleinfo *tuple, resource *res)
 Set a resource in a tuple.

Variables

miscinfo dat_info
 Miscellaneous information about the timetable.
resourcetypedat_restype
 Array of dat_typenum resource types.
tupleinfodat_tuplemap
 Array of dat_tuplenum tuples.
int dat_tuplenum
 Number of all defined tuples (events).
int dat_typenum
 Number of all defined resource types.


Generated by  Doxygen 1.6.0   Back to index