Gadget
Functions
readfunc.cc File Reference
#include "readfunc.h"
#include "errorhandler.h"
#include "gadget.h"
#include "global.h"
Include dependency graph for readfunc.cc:

Functions

void readRefWeights (CommentStream &infile, DoubleMatrix &M)
 This is the function that will read reference weight data from a file into a matrix. More...
 
int countColumns (CommentStream &infile)
 This is the function that will count the number of columns of data in a file. More...
 
void readAmounts (CommentStream &infile, const IntVector &tmpareas, const TimeClass *const TimeInfo, const AreaClass *const Area, FormulaMatrix &amount, const char *givenname)
 
void readGrowthAmounts (CommentStream &infile, const TimeClass *const TimeInfo, const AreaClass *const Area, FormulaMatrixPtrVector &amount, const CharPtrVector &lenindex, const IntVector &tmpareas)
 

Function Documentation

◆ countColumns()

int countColumns ( CommentStream infile)

This is the function that will count the number of columns of data in a file.

Parameters
infileis the CommentStream to read the data from
Returns
number of columns of data in the file
Note
This function currently counts the number of columns that the first line of data in the file has, and then assumes that the rest of the file has the same number of columns

◆ readAmounts()

void readAmounts ( CommentStream infile,
const IntVector tmpareas,
const TimeClass *const  TimeInfo,
const AreaClass *const  Area,
FormulaMatrix amount,
const char *  givenname 
)

◆ readGrowthAmounts()

void readGrowthAmounts ( CommentStream infile,
const TimeClass *const  TimeInfo,
const AreaClass *const  Area,
FormulaMatrixPtrVector amount,
const CharPtrVector lenindex,
const IntVector tmpareas 
)

◆ readRefWeights()

void readRefWeights ( CommentStream infile,
DoubleMatrix M 
)

This is the function that will read reference weight data from a file into a matrix.

Parameters
infileis the CommentStream to read the data from
Mis the DoubleMatrix that the reference weight data will be stored in