numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::util::iteration_period_checker Class Reference

Class to check periods of iterations. More...

#include <num_collect/util/iteration_period_checker.h>

+ Collaboration diagram for num_collect::util::iteration_period_checker:

Public Member Functions

 iteration_period_checker (index_type period)
 Constructor.
 
auto is_start_of_period () const noexcept
 Check whether the current iteration is a start of the period.
 
void iterate () noexcept
 Iterate.
 
 operator bool () const noexcept
 Check whether the current iteration is a start of the period.
 
auto operator++ () noexcept -> iteration_period_checker &
 Iterate.
 
void reset () noexcept
 Reset the counter.
 

Private Attributes

index_type counter_ {0}
 Iteration counter.
 
index_type period_
 Period.
 

Detailed Description

Class to check periods of iterations.

Definition at line 32 of file iteration_period_checker.h.

Constructor & Destructor Documentation

◆ iteration_period_checker()

num_collect::util::iteration_period_checker::iteration_period_checker ( index_type period)
inlineexplicit

Constructor.

Parameters
[in]periodPeriod.

Definition at line 39 of file iteration_period_checker.h.

Member Function Documentation

◆ is_start_of_period()

auto num_collect::util::iteration_period_checker::is_start_of_period ( ) const
inlinenodiscardnoexcept

Check whether the current iteration is a start of the period.

Returns
Whether the current iteration is a start of the period.

Definition at line 59 of file iteration_period_checker.h.

◆ iterate()

void num_collect::util::iteration_period_checker::iterate ( )
inlinenoexcept

Iterate.

Definition at line 47 of file iteration_period_checker.h.

◆ operator bool()

num_collect::util::iteration_period_checker::operator bool ( ) const
inlineexplicitnoexcept

Check whether the current iteration is a start of the period.

Returns
Whether the current iteration is a start of the period.

Definition at line 83 of file iteration_period_checker.h.

◆ operator++()

auto num_collect::util::iteration_period_checker::operator++ ( ) -> iteration_period_checker&
inlinenoexcept

Iterate.

Returns
This.

Definition at line 73 of file iteration_period_checker.h.

◆ reset()

void num_collect::util::iteration_period_checker::reset ( )
inlinenoexcept

Reset the counter.

Definition at line 66 of file iteration_period_checker.h.

Member Data Documentation

◆ counter_

index_type num_collect::util::iteration_period_checker::counter_ {0}
private

Iteration counter.

Definition at line 90 of file iteration_period_checker.h.

◆ period_

index_type num_collect::util::iteration_period_checker::period_
private

Period.

Definition at line 87 of file iteration_period_checker.h.


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