guanaqo main
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::MaxHistory< T > Class Template Reference

#include <guanaqo/max-history.hpp>

Detailed Description

template<class T>
class guanaqo::MaxHistory< T >

Keep track of the maximum value over a specified horizon length.

Definition at line 15 of file max-history.hpp.

Collaboration diagram for guanaqo::MaxHistory< T >:

Public Member Functions

 MaxHistory (size_t memory)
void add (T newt)
const T & max () const

Private Attributes

std::vector< T > buffer
bool full = false
decltype(buffer.begin()) it = buffer.begin()
max_ {}

Constructor & Destructor Documentation

◆ MaxHistory()

template<class T>
guanaqo::MaxHistory< T >::MaxHistory ( size_t memory)
inline

Definition at line 17 of file max-history.hpp.

Member Function Documentation

◆ add()

template<class T>
void guanaqo::MaxHistory< T >::add ( T newt)
inline

Definition at line 19 of file max-history.hpp.

◆ max()

template<class T>
const T & guanaqo::MaxHistory< T >::max ( ) const
inline

Definition at line 42 of file max-history.hpp.

Member Data Documentation

◆ buffer

template<class T>
std::vector<T> guanaqo::MaxHistory< T >::buffer
private

Definition at line 45 of file max-history.hpp.

◆ full

template<class T>
bool guanaqo::MaxHistory< T >::full = false
private

Definition at line 46 of file max-history.hpp.

◆ it

template<class T>
decltype(buffer.begin()) guanaqo::MaxHistory< T >::it = buffer.begin()
private

Definition at line 47 of file max-history.hpp.

◆ max_

template<class T>
T guanaqo::MaxHistory< T >::max_ {}
private

Definition at line 48 of file max-history.hpp.


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