Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Data.hpp File Reference

Data related class and methods. More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <vector>
#include <limits>
#include <string>
#include <stdexcept>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <math.h>
#include "repast_hpc/Properties.h"
#include "repast_hpc/RepastProcess.h"
#include "Network.hpp"
#include "tinyxml2.hpp"
#include "Random.hpp"
#include "repast_hpc/TDataSource.h"
#include "repast_hpc/SVDataSet.h"

Go to the source code of this file.

Classes

class  Singleton< T >
 Singleton class for the Data class. More...
 
class  Data
 A data class. More...
 
class  AggregateSum
 Aggregate output data class. More...
 

Functions

std::string secToTime (float n_sec)
 Convert a number of seconds to the format hour:min:sec. More...
 
unsigned int secToHour (float n_sec)
 Convert a number of seconds to hours. More...
 
unsigned int secToHalfHour (float n_sec)
 Convert a number of seconds to half-hours. More...
 
long int linesCount (std::string filename)
 Compute the number of lines in a file. More...
 
template<typename T >
std::vector< T > split (const std::string &msg, const std::string &separators)
 Decompose a string according to a separator into a vector of type T. More...
 

Variables

const int MODEL_AGENT_IND_TYPE = 0
 constant for the individual agent type More...
 
const int MODEL_AGENT_HH_TYPE = 1
 constant for the household agent type More...
 

Detailed Description

Data related class and methods.

Function Documentation

long int linesCount ( std::string  filename)

Compute the number of lines in a file.

Parameters
filenamethe path to the file to analyze
Returns
the number of lines in the file
unsigned int secToHalfHour ( float  n_sec)
inline

Convert a number of seconds to half-hours.

Parameters
n_secthe number of seconds to convert
Returns
the number of half hours since midnight
unsigned int secToHour ( float  n_sec)
inline

Convert a number of seconds to hours.

Parameters
n_secthe number of seconds to convert
Returns
the hours
std::string secToTime ( float  n_sec)
inline

Convert a number of seconds to the format hour:min:sec.

Parameters
n_secthe number of seconds to convert
Returns
a string in the hour:min:sec format
template<typename T >
std::vector<T> split ( const std::string &  msg,
const std::string &  separators 
)

Decompose a string according to a separator into a vector of type T.

Parameters
msgthe string to decompose
separatorsseparators used for the decomposition
Returns
a vector of type T

Variable Documentation

const int MODEL_AGENT_HH_TYPE = 1

constant for the household agent type

const int MODEL_AGENT_IND_TYPE = 0

constant for the individual agent type