Skip to content

Class UserData

template <typename TSeq>

ClassList > UserData

Personalized data by the user. More...

  • #include <userdata-bones.hpp>

Public Functions

Type Name
UserData () = delete
UserData (Model< TSeq > & m)
UserData (Model< TSeq > * m)
UserData (std::vector< std::string > names)
Construct a new User Data object.
void add (std::vector< epiworld_double > x)
void add (epiworld_fast_uint j, epiworld_double x)
void get_all (std::vector< std::string > * names=nullptr, std::vector< int > * date=nullptr, std::vector< epiworld_double > * data=nullptr)
std::vector< epiworld_double > & get_data ()
std::vector< int > & get_dates ()
std::vector< std::string > & get_names ()
epiworld_fast_uint ncol () const
epiworld_fast_uint nrow () const
epiworld_double & operator() (epiworld_fast_uint i, epiworld_fast_uint j)
epiworld_double & operator() (epiworld_fast_uint i, std::string name)
void print () const
void write (std::string fn)

Detailed Description

Template parameters:

  • TSeq

Public Functions Documentation

function UserData [1/4]

UserData::UserData () = delete

function UserData [2/4]

inline UserData::UserData (
    Model < TSeq > & m
) 

function UserData [3/4]

inline UserData::UserData (
    Model < TSeq > * m
) 

function UserData [4/4]

Construct a new User Data object.

inline UserData::UserData (
    std::vector< std::string > names
) 

Parameters:

  • names A vector of names. The length of the vector sets the number of columns to record.

function add [1/2]

inline void UserData::add (
    std::vector< epiworld_double > x
) 

function add [2/2]

inline void UserData::add (
    epiworld_fast_uint j,
    epiworld_double x
) 

function get_all

inline void UserData::get_all (
    std::vector< std::string > * names=nullptr,
    std::vector< int > * date=nullptr,
    std::vector< epiworld_double > * data=nullptr
) 

function get_data

inline std::vector< epiworld_double > & UserData::get_data () 

function get_dates

inline std::vector< int > & UserData::get_dates () 

function get_names

inline std::vector< std::string > & UserData::get_names () 

function ncol

inline epiworld_fast_uint UserData::ncol () const

function nrow

inline epiworld_fast_uint UserData::nrow () const

function operator()

inline epiworld_double & UserData::operator() (
    epiworld_fast_uint i,
    epiworld_fast_uint j
) 

function operator()

inline epiworld_double & UserData::operator() (
    epiworld_fast_uint i,
    std::string name
) 

function print

inline void UserData::print () const

function write

inline void UserData::write (
    std::string fn
) 


The documentation for this class was generated from the following file epiworld-src/include/epiworld/userdata-bones.hpp