#include <cycle_range.h>

Inheritance diagram for cycle_range:
read_info

Public Types

typedef size_t cycle_t
 

Public Member Functions

 cycle_range (const cycle_t first_cycle=std::numeric_limits< cycle_t >::max(), const cycle_t last_cycle=0)
 
cycle_t first_cycle () const
 
cycle_t last_cycle () const
 
void first_cycle (const cycle_t val)
 
void last_cycle (const cycle_t val)
 
bool empty () const
 
void update (const cycle_t cycle)
 
void update (const cycle_range &rng)
 

Protected Attributes

cycle_t m_first_cycle
 
cycle_t m_last_cycle
 

Friends

class info
 
template<class MetricType , int Version>
struct io::generic_layout
 
cycle_range operator- (const cycle_range &lhs, const cycle_t &first_cycle_of_read)
 

Detailed Description

Defines a range over cycles

Member Typedef Documentation

typedef size_t cycle_t

Define integral cycle type

Constructor & Destructor Documentation

cycle_range ( const cycle_t  first_cycle = std::numeric_limits<cycle_t>::max(),
const cycle_t  last_cycle = 0 
)
inline

Constructor

Parameters
first_cycleindex of first cycle
last_cycleindex of last cycle

Member Function Documentation

void update ( const cycle_t  cycle)
inline

Update the cycle state

If this is less than the first cycle, save as the first cycle. If this is greater than the last cycle, save as the last cycle.

Parameters
cyclecurrent cycle
void update ( const cycle_range rng)
inline

Update the cycle state

Parameters
rngcycle state

Friends And Related Function Documentation

friend class info
friend
friend struct io::generic_layout
friend
cycle_range operator- ( const cycle_range lhs,
const cycle_t first_cycle_of_read 
)
friend

Subtract a cycle range from the first cycle of the read safely.

Note
This function checks if the first_cycle_of_read is in later than the last cycle in the range, if so the cycle range is returned as is (no subtraction)
Parameters
lhscycle range
first_cycle_of_readfirst cycle of read (0-indexed)
Returns
new cycle range

Member Data Documentation

cycle_t m_first_cycle
protected

First cycle index

cycle_t m_last_cycle
protected

Last cycle index


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