Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
frechet::poly::PolygonWorkerJob Class Referenceabstract

Detailed Description

Abstract base class for executing the algorithm for simple polygons in a background thread. As any worker job, it may be interrupted by the user.

Definition at line 13 of file jobs.h.

#include <jobs.h>

Inherits frechet::app::WorkerJob.

Inherited by frechet::poly::DecideWorkerJob, frechet::poly::OptimiseCurveWorkerJob, and frechet::poly::OptimisePolyWorkerJob.

Public Member Functions

 PolygonWorkerJob (poly::Algorithm::ptr analg, frechet::FreeSpace::ptr anfs, frechet::reach::FSPath::ptr apath, double aparam)
 default constructor More...
 
virtual void runAlg ()=0
 implemented by derived classes More...
 
virtual void runJob () override
 implements abstract method. Sets up the cancel flags and delegates to runAlg(). More...
 
virtual void afterInterrupted () override
 implements abstract method. Handles user interruption. Resets the status of the algorithm (see poly::Algorithm::Status). More...
 
- Public Member Functions inherited from frechet::app::WorkerJob
virtual void run () override
 abstract method that performs the long-running task More...
 

Protected Attributes

poly::Algorithm::ptr alg
 the algorithm More...
 
frechet::FreeSpace::ptr fs
 the underlying free-space More...
 
frechet::reach::FSPath::ptr fspath
 holds the feasible path on return More...
 
poly::Algorithm::Status status_before
 previous algorithm status; will be reset in the case of user interruption More...
 
double param
 parameter to the algorithm (epsilon) More...
 

Additional Inherited Members

- Public Attributes inherited from frechet::app::WorkerJob
volatile bool cancelRequested
 cancellation flag More...
 

Constructor & Destructor Documentation

◆ PolygonWorkerJob()

frechet::poly::PolygonWorkerJob::PolygonWorkerJob ( poly::Algorithm::ptr  analg,
frechet::FreeSpace::ptr  anfs,
frechet::reach::FSPath::ptr  apath,
double  aparam 
)
inline

default constructor

Parameters
analgthe algorithm
anfsthe underlying free-space
apathholds the feasible path on return
aparamparameter to the algorithm. This is either epsilon, or an approximation bound.

Definition at line 35 of file jobs.h.

Member Function Documentation

◆ afterInterrupted()

virtual void frechet::poly::PolygonWorkerJob::afterInterrupted ( )
inlineoverridevirtual

implements abstract method. Handles user interruption. Resets the status of the algorithm (see poly::Algorithm::Status).

Implements frechet::app::WorkerJob.

Definition at line 61 of file jobs.h.

◆ runAlg()

virtual void frechet::poly::PolygonWorkerJob::runAlg ( )
pure virtual

◆ runJob()

virtual void frechet::poly::PolygonWorkerJob::runJob ( )
inlineoverridevirtual

implements abstract method. Sets up the cancel flags and delegates to runAlg().

Implements frechet::app::WorkerJob.

Definition at line 50 of file jobs.h.

Member Data Documentation

◆ alg

poly::Algorithm::ptr frechet::poly::PolygonWorkerJob::alg
protected

the algorithm

Definition at line 17 of file jobs.h.

◆ fs

frechet::FreeSpace::ptr frechet::poly::PolygonWorkerJob::fs
protected

the underlying free-space

Definition at line 19 of file jobs.h.

◆ fspath

frechet::reach::FSPath::ptr frechet::poly::PolygonWorkerJob::fspath
protected

holds the feasible path on return

Definition at line 21 of file jobs.h.

◆ param

double frechet::poly::PolygonWorkerJob::param
protected

parameter to the algorithm (epsilon)

Definition at line 25 of file jobs.h.

◆ status_before

poly::Algorithm::Status frechet::poly::PolygonWorkerJob::status_before
protected

previous algorithm status; will be reset in the case of user interruption

Definition at line 23 of file jobs.h.


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