pops-core  0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
Public Member Functions | List of all members
pops::SpreadRate< Raster > Class Template Reference

Class storing and computing step spread rate for one simulation. More...

#include <spread_rate.hpp>

Public Member Functions

 SpreadRate (const Raster &raster, double ew_res, double ns_res, unsigned num_steps, const std::vector< std::vector< int >> &suitable_cells)
 
 SpreadRate ()=delete
 
const BBoxFloatstep_rate (unsigned step) const
 Returns rate for certain year of simulation. More...
 
void compute_step_spread_rate (const Raster &raster, unsigned step, const std::vector< std::vector< int >> &suitable_cells)
 Computes spread rate in n, s, e, w directions for certain simulation year based on provided infection raster and bbox of infection in previous year. More...
 

Detailed Description

template<typename Raster>
class pops::SpreadRate< Raster >

Class storing and computing step spread rate for one simulation.

Definition at line 31 of file spread_rate.hpp.

Constructor & Destructor Documentation

◆ SpreadRate() [1/2]

template<typename Raster >
pops::SpreadRate< Raster >::SpreadRate ( const Raster raster,
double  ew_res,
double  ns_res,
unsigned  num_steps,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Definition at line 114 of file spread_rate.hpp.

◆ SpreadRate() [2/2]

template<typename Raster >
pops::SpreadRate< Raster >::SpreadRate ( )
delete

Member Function Documentation

◆ compute_step_spread_rate()

template<typename Raster >
void pops::SpreadRate< Raster >::compute_step_spread_rate ( const Raster raster,
unsigned  step,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Computes spread rate in n, s, e, w directions for certain simulation year based on provided infection raster and bbox of infection in previous year.

Unit is distance (map units) per year. If spread rate is zero and the bbox is touching the edge, that means spread is out of bounds and rate is set to NaN.

Definition at line 151 of file spread_rate.hpp.

Here is the caller graph for this function:

◆ step_rate()

template<typename Raster >
const BBoxFloat& pops::SpreadRate< Raster >::step_rate ( unsigned  step) const
inline

Returns rate for certain year of simulation.

Definition at line 138 of file spread_rate.hpp.


The documentation for this class was generated from the following file: