APEMoST
Functions

src/utils.c File Reference

#include "utils.h"
#include <ctype.h>

Functions

FILE * openfile (const char *filename)
unsigned int countlines (const char *filename)
unsigned int get_column_count (const char *filename)

Function Documentation

unsigned int countlines ( const char *  filename)

count the lines (
) in the file

Parameters:
filename

References assert, openfile(), and r.

Referenced by mcmc_load_params(), and test_write_prob().

unsigned int get_column_count ( const char *  filename)

how many columns does this file have? (looks at first line only)

References openfile().

Referenced by calc_marginal_distribution().

FILE* openfile ( const char *  filename)