6# include "strdblqueue.h"
10 char lbl[MAXSAMP][POPNAMESIZE];
18void LblNdx_sanityCheck(
const LblNdx *self,
const char *file,
int line);
23int LblNdx_rmPops(
LblNdx *self, tipId_t remove);
25char *
patLbl(
size_t n,
char buff[n], tipId_t tid,
const LblNdx * lblndx);
26void orderpat(
int n,
unsigned order[n], tipId_t tid[n]);
int LblNdx_collapse(LblNdx *self, tipId_t collapse, const char *lbl)
Reduce dimension of LblNdx object by collapsing several entries into a single entry.
Definition: lblndx.c:305
const char * LblNdx_lbl(const LblNdx *self, unsigned i)
Return the label associated with index i.
Definition: lblndx.c:55
void LblNdx_addSamples(LblNdx *self, unsigned nsamples, const char *lbl)
Add samples for a single population.
Definition: lblndx.c:30
unsigned LblNdx_size(const LblNdx *self)
Return number of samples, which equals number of labels.
Definition: lblndx.c:61
void LblNdx_init(LblNdx *self)
Set everything to zero.
Definition: lblndx.c:23
char * patLbl(size_t n, char buff[n], tipId_t tid, const LblNdx *lblndx)
Generate a label for site pattern tid.
Definition: lblndx.c:166
int LblNdx_from_StrDblQueue(LblNdx *lndx, StrDblQueue *queue)
Initialize a pre-allocated LblNdx from a StrDblQueue.
Definition: lblndx.c:359
void orderpat(int n, unsigned ord[n], tipId_t pat[n])
On entry, pat is an array of n tipId_t values.
Definition: lblndx.c:251
int LblNdx_equals(const LblNdx *lhs, const LblNdx *rhs)
Return 1 if the two arguments are equal; 0 otherwise.
Definition: lblndx.c:79
void LblNdx_print(const LblNdx *self, FILE *fp)
Print a LblNdx.
Definition: lblndx.c:158
tipId_t LblNdx_getTipId(const LblNdx *self, const char *lbl)
Reverse lookup.
Definition: lblndx.c:116
int compare_tipId(const void *void_x, const void *void_y)
Compare pointers to two tipId_t values.
Definition: lblndx.c:226
Definition: strdblqueue.h:22