APEMoST
Functions

src/utils.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

Go to the source code of this file.

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)

a wc -l on the file.

count the lines (
) in the file

Parameters:
filename

References assert, openfile(), and r.

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)