Legofit
infers population history from nucleotide site patterns.
Data Structures | Functions
pointbuff.c File Reference

Class PointBuff. More...

#include "pointbuff.h"
#include "misc.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Data Structures

struct  Point
 
struct  PointBuff
 

Functions

static void Point_set (Point *self, double cost, int n, double par[n])
 
static double Point_get (Point *self, int n, double par[n])
 
PointBuffPointBuff_new (unsigned npar, unsigned totpts)
 
void PointBuff_free (PointBuff *self)
 
unsigned PointBuff_size (const PointBuff *self)
 
void PointBuff_push (PointBuff *self, double cost, int n, double param[n])
 
double PointBuff_pop (PointBuff *self, int n, double param[n])
 

Detailed Description

Class PointBuff.

A buffer into which one can push points, which consist of a vector of parameter values and an associated cost value.

Author
Alan R. Rogers