alpaqa 1.0.0a9
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MaxHistory< T > Class Template Reference

#include <alpaqa/util/max-history.hpp>

Detailed Description

template<class T>
class alpaqa::MaxHistory< T >

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

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

+ Collaboration diagram for 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()

MaxHistory ( size_t  memory)
inline

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

Member Function Documentation

◆ add()

void add ( newt)
inline

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

◆ max()

const T & max ( ) const
inline

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

Member Data Documentation

◆ buffer

std::vector<T> buffer
private

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

◆ full

bool full = false
private

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

◆ it

decltype(buffer.begin()) it = buffer.begin()
private

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

◆ max_

T max_ {}
private

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


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