M
Malcolm
I volunteered to write a program for someone to calculate Wagner trees.
(A Wagner tree is a phylogenetic tree made by comparing lists of traits,
which are coded as integers, and for which the basal or most primitive value
is known).
It took 2-3 hours to get a tree right, based on this input.
typedef struct
{
int ntraits; /* number of traits */
int nspecies; /* no species (excluding ancestor) */
int *ancestor; /* traits for ancestor */
int **traits; /* traits for species */
char **names; /* names of species */
} WAG_INPUT;
Now of course the user can't fill up this structure directly, so I wondered
if it might be nice to define a file format.
Example file
Wagner Tree file
Version 1.0
Traits
No digits
Tail length
Skin Colour = Grey, Dark Grey, Black, Brown
Species
Oinkus woinkus, 2, 4, Black
Equus geegee, 1, 10, Dark Grey
Moocow 2, 8, Brown
Ancestor 5, 1, Grey
Now coding this up is proving to be a complete nightmare, because of course
input is hostile and you have to deal with anything the user throws at you.
I wonder if I am missing a trick (I hardly ever use text input files).
Otherwise it looks like the imput parser is going to be substantially bigger
than the rest of the program.
(A Wagner tree is a phylogenetic tree made by comparing lists of traits,
which are coded as integers, and for which the basal or most primitive value
is known).
It took 2-3 hours to get a tree right, based on this input.
typedef struct
{
int ntraits; /* number of traits */
int nspecies; /* no species (excluding ancestor) */
int *ancestor; /* traits for ancestor */
int **traits; /* traits for species */
char **names; /* names of species */
} WAG_INPUT;
Now of course the user can't fill up this structure directly, so I wondered
if it might be nice to define a file format.
Example file
Wagner Tree file
Version 1.0
Traits
No digits
Tail length
Skin Colour = Grey, Dark Grey, Black, Brown
Species
Oinkus woinkus, 2, 4, Black
Equus geegee, 1, 10, Dark Grey
Moocow 2, 8, Brown
Ancestor 5, 1, Grey
Now coding this up is proving to be a complete nightmare, because of course
input is hostile and you have to deal with anything the user throws at you.
I wonder if I am missing a trick (I hardly ever use text input files).
Otherwise it looks like the imput parser is going to be substantially bigger
than the rest of the program.