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

Class storing and computing quarantine escap metrics for one simulation. More...

#include <quarantine.hpp>

Public Member Functions

 QuarantineEscape (const IntegerRaster &quarantine_areas, double ew_res, double ns_res, unsigned num_steps, const std::vector< std::vector< int >> &suitable_cells)
 
 QuarantineEscape ()=delete
 
void infection_escape_quarantine (const IntegerRaster &infected, const IntegerRaster &quarantine_areas, unsigned step, const std::vector< std::vector< int >> &suitable_cells)
 Computes whether infection in certain step escaped from quarantine areas and if not, computes and saves minimum distance and direction to quarantine areas for the specified step. More...
 
const EscapeDistDir escape_info (unsigned step) const
 Computes escape info (if escaped, distance and direction if not escaped) for certain action step. More...
 
bool escaped (unsigned step) const
 Returns true if infection escaped the quarantine boundary. More...
 
double distance (unsigned step) const
 Returns minimum distance to quarantine boundary bbox. More...
 
Direction direction (unsigned step) const
 Returns the direction (N, S, E, W, None) of the minimum distance to quarantine boundary bbox. More...
 

Detailed Description

template<typename IntegerRaster, typename RasterIndex = int>
class pops::QuarantineEscape< IntegerRaster, RasterIndex >

Class storing and computing quarantine escap metrics for one simulation.

Definition at line 45 of file quarantine.hpp.

Constructor & Destructor Documentation

◆ QuarantineEscape() [1/2]

template<typename IntegerRaster , typename RasterIndex = int>
pops::QuarantineEscape< IntegerRaster, RasterIndex >::QuarantineEscape ( const IntegerRaster &  quarantine_areas,
double  ew_res,
double  ns_res,
unsigned  num_steps,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Definition at line 135 of file quarantine.hpp.

◆ QuarantineEscape() [2/2]

template<typename IntegerRaster , typename RasterIndex = int>
pops::QuarantineEscape< IntegerRaster, RasterIndex >::QuarantineEscape ( )
delete

Member Function Documentation

◆ direction()

template<typename IntegerRaster , typename RasterIndex = int>
Direction pops::QuarantineEscape< IntegerRaster, RasterIndex >::direction ( unsigned  step) const
inline

Returns the direction (N, S, E, W, None) of the minimum distance to quarantine boundary bbox.

Returns None if infection already escaped.

Definition at line 224 of file quarantine.hpp.

◆ distance()

template<typename IntegerRaster , typename RasterIndex = int>
double pops::QuarantineEscape< IntegerRaster, RasterIndex >::distance ( unsigned  step) const
inline

Returns minimum distance to quarantine boundary bbox.

If infection already escaped, returns NaN. Aggregated over all quarantine areas.

Definition at line 214 of file quarantine.hpp.

◆ escape_info()

template<typename IntegerRaster , typename RasterIndex = int>
const EscapeDistDir pops::QuarantineEscape< IntegerRaster, RasterIndex >::escape_info ( unsigned  step) const
inline

Computes escape info (if escaped, distance and direction if not escaped) for certain action step.

Definition at line 196 of file quarantine.hpp.

◆ escaped()

template<typename IntegerRaster , typename RasterIndex = int>
bool pops::QuarantineEscape< IntegerRaster, RasterIndex >::escaped ( unsigned  step) const
inline

Returns true if infection escaped the quarantine boundary.

Definition at line 204 of file quarantine.hpp.

◆ infection_escape_quarantine()

template<typename IntegerRaster , typename RasterIndex = int>
void pops::QuarantineEscape< IntegerRaster, RasterIndex >::infection_escape_quarantine ( const IntegerRaster &  infected,
const IntegerRaster &  quarantine_areas,
unsigned  step,
const std::vector< std::vector< int >> &  suitable_cells 
)
inline

Computes whether infection in certain step escaped from quarantine areas and if not, computes and saves minimum distance and direction to quarantine areas for the specified step.

Aggregates over all quarantine areas.

Definition at line 162 of file quarantine.hpp.

Here is the caller graph for this function:

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