Qucs-core  0.0.19
Public Member Functions | Private Attributes
qucs::history Class Reference

#include <history.h>

Public Member Functions

 history ()
 history (const history &h)
void push_back (const nr_double_t val)
void truncate (const std::size_t n)
void resize (const std::size_t n)
std::size_t size (void) const
void setAge (const nr_double_t a)
nr_double_t getAge (void) const
void apply (const history &h)
nr_double_t last (void) const
 Returns the last (youngest) time value in the history.
nr_double_t first (void) const
 Returns the first (oldest) time value in the history.
unsigned int leftidx (void) const
std::size_t unused (void)
nr_double_t duration (void) const
 Returns the duration of the history.
void truncate (const nr_double_t)
void drop (void)
void self (void)
nr_double_t interpol (nr_double_t, int, bool)
nr_double_t nearest (nr_double_t, bool interpolate=true)
int seek (nr_double_t, int, int, nr_double_t &, int)
nr_double_t getTfromidx (const int idx)
nr_double_t getValfromidx (const int idx)

Private Attributes

bool sign
nr_double_t age
std::shared_ptr< std::vector
< nr_double_t > > 
std::shared_ptr< std::vector
< nr_double_t > > 

Detailed Description

Definition at line 34 of file history.h.

Constructor & Destructor Documentation

qucs::history::history ( ) [inline]

default constructor

Definition at line 38 of file history.h.

qucs::history::history ( const history h) [inline]

The copy constructor creates a new instance based on the given history object.

Definition at line 47 of file history.h.

Member Function Documentation

void qucs::history::apply ( const history h) [inline]

Definition at line 78 of file history.h.

void qucs::history::drop ( void  )

Definition at line 63 of file history.cpp.

nr_double_t qucs::history::duration ( void  ) const [inline]

Returns the duration of the history.

Definition at line 108 of file history.h.

nr_double_t qucs::history::first ( void  ) const [inline]

Returns the first (oldest) time value in the history.

Definition at line 88 of file history.h.

nr_double_t qucs::history::getAge ( void  ) const [inline]

Definition at line 75 of file history.h.

nr_double_t qucs::history::getTfromidx ( const int  idx) [inline]

Definition at line 121 of file history.h.

nr_double_t qucs::history::getValfromidx ( const int  idx) [inline]

Definition at line 124 of file history.h.

nr_double_t qucs::history::interpol ( nr_double_t  tval,
int  idx,
bool  left 

Definition at line 87 of file history.cpp.

nr_double_t qucs::history::last ( void  ) const [inline]

Returns the last (youngest) time value in the history.

Definition at line 83 of file history.h.

unsigned int qucs::history::leftidx ( void  ) const [inline]

Definition at line 93 of file history.h.

nr_double_t qucs::history::nearest ( nr_double_t  tval,
bool  interpolate = true 

Definition at line 109 of file history.cpp.

void qucs::history::push_back ( const nr_double_t  val) [inline]

The function appends the given value to the history.

Definition at line 55 of file history.h.

void qucs::history::resize ( const std::size_t  n) [inline]

Definition at line 63 of file history.h.

int qucs::history::seek ( nr_double_t  tval,
int  l,
int  r,
nr_double_t diff,
int  idx 

Definition at line 129 of file history.cpp.

void qucs::history::self ( void  ) [inline]

Definition at line 115 of file history.h.

void qucs::history::setAge ( const nr_double_t  a) [inline]

Definition at line 74 of file history.h.

std::size_t qucs::history::size ( void  ) const [inline]

Definition at line 69 of file history.h.

void qucs::history::truncate ( const std::size_t  n)
void qucs::history::truncate ( const nr_double_t  tcut)

Definition at line 45 of file history.cpp.

std::size_t qucs::history::unused ( void  ) [inline]

Returns number of unused values (time value vector shorter than value vector).

Definition at line 101 of file history.h.

Field Documentation

nr_double_t qucs::history::age [private]

Definition at line 130 of file history.h.

bool qucs::history::sign [private]

Definition at line 129 of file history.h.

std::shared_ptr<std::vector<nr_double_t> > qucs::history::t [private]

Definition at line 132 of file history.h.

std::shared_ptr<std::vector<nr_double_t> > qucs::history::values [private]

Definition at line 131 of file history.h.

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