LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
loos::EstimatingCounter Class Reference

A progress counter that can estimate how much time is left. More...

#include <ProgressCounters.hpp>

Inheritance diagram for loos::EstimatingCounter:
Inheritance graph
[legend]
Collaboration diagram for loos::EstimatingCounter:
Collaboration graph
[legend]

Public Member Functions

 EstimatingCounter (const uint n)
 
void setExpected (uint)
 Alter the expected count.
 
uint remaining (void)
 Returns the number of iterations left.
 
double timeRemaining (void)
 
double fractionComplete (void)
 Returns the percent completed so far.
 
- Public Member Functions inherited from loos::SimpleCounter
void attach (ObsT *)
 
void detach (ObsT *)
 
virtual void notify (void)
 Notify observers that an update should occur.
 
virtual void finish (void)
 Notify observers that we've finished with our calculation.
 
virtual void start (void)
 Notify observers that we're starting a calculation.
 
uint count (void) const
 Number of iterations we've seen so far.
 
virtual double elapsed (void)
 Total elapsed wall-time.
 

Protected Attributes

uint expected
 
- Protected Attributes inherited from loos::SimpleCounter
uint count_
 
Timer< WallTimertimer_
 
Observers observers
 

Detailed Description

A progress counter that can estimate how much time is left.

This class has to know the count of expected iterations so it can estimate how much time is left. It is assumed that the execution time per iteration is largely constant.

Member Function Documentation

◆ fractionComplete()

double loos::EstimatingCounter::fractionComplete ( void )
virtual

Returns the percent completed so far.

Reimplemented from loos::SimpleCounter.

◆ remaining()

uint loos::EstimatingCounter::remaining ( void )
virtual

Returns the number of iterations left.

Reimplemented from loos::SimpleCounter.

◆ timeRemaining()

double loos::EstimatingCounter::timeRemaining ( void )
virtual

Estimates the amount of time left using the current average time per iteration

Reimplemented from loos::SimpleCounter.


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