Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

punnets_common::func_exp_diff Class Reference

#include <func.h>

Inheritance diagram for punnets_common::func_exp_diff:

punnets_common::func_base List of all members.

Public Methods

 func_exp_diff (real ir1, real ipsi1, real ir2, real ipsi2, real it0)
 constructs func_exp_diff.

virtual real getMaxGradient (ntime_t t) const
 A pure virtual function that returns the max gradient of the function after the time t.

virtual real getValue (ntime_t t) const
 A pure virtual function that returns f(t).

virtual real get1stDeriv (ntime_t t) const
 A pure virtual function that returns df(t)/dt.

virtual real get2ndDeriv (ntime_t t) const
 A pure virtual function that returns d2f(t)/dt2.

virtual ntime_t getNextIncontinuity (ntime_t) const
virtual void getValueDomain (ntime_t t, real &upslope, real &ceil, real &downslope, real &floor) const
 Obtains a zeroth-order linear envelope of the function. floor < f(t+&alpha;) < ceil, f(t)+&alpha;downslope < f(t+&alpha;) < f(t)+&alpha;upslope.

virtual void get1stDerivDomain (ntime_t t, real &upslope, real &ceil, real &downslope, real &floor) const
 Obtains a first--order linear envelope of the function. floor < f(t+&alpha;) < ceil, f(t)+&alpha;downslope < f(t+&alpha;) < f(t)+&alpha;upslope.

virtual void get2ndDerivDomain (ntime_t t, real &upslope, real &ceil, real &downslope, real &floor) const
 Obtains a second-order linear envelope of the function. floor < f(t+&alpha;) < ceil, f(t)+&alpha;downslope < f(t+&alpha;) < f(t)+&alpha;upslope.

virtual func_exp_diff * clone ()
 Allocates and returns another instance of this function.

virtual std::string getDescription ()
 Obtains a human-readable description string of this function.

virtual bool processMessage (ntime_t t, const message_base &m)

Detailed Description

Difference of two exponential functions

External input of a form f(t) = r1 exp( - &psi;1 (t - t0) ) - r2 exp( - &psi;2 (t - t0) ). Here r1Ar2 > 0 and 0 < psi1 < psi2.

Definition at line 801 of file func.h.


Member Function Documentation

virtual ntime_t punnets_common::func_exp_diff::getNextIncontinuity ntime_t    const [inline, virtual]
 

A virtual function that returns the next incontinuity point after the time t. In func_base, the function always returns infinity.

Reimplemented from punnets_common::func_base.

Definition at line 834 of file func.h.

References punnets_common::ntime_t.

00834 { return mak::Infinity; }

bool punnets_common::func_exp_diff::processMessage ntime_t    t,
const message_base   m
[virtual]
 

Process the specified message at the specified time. Return true if the message is processed. In func_base, this function always returns false (processes no message).

Reimplemented from punnets_common::func_base.

Definition at line 529 of file func.cpp.

References punnets_common::message_base::getMessageId(), punnets_common::ntime_t, and punnets_common::func_base::valueChange().

00530 { 
00531 #ifdef USE_DYNAMIC
00532     if( dynamic_cast<const message_add_event_time *>(&m) != NULL ) 
00533 #else
00534     if( m.getMessageId() == message_add_event_time::messageId ) 
00535 #endif
00536     {
00537         ir1 = r1orig + ir1 * exp( - psi1 * (t-it0) );
00538         ir2 = r2orig + ir2 * exp( - psi2 * (t-it0) );
00539         it0 = t;
00540         valueChange();
00541         return true;
00542     }
00543     return func_base::processMessage(t, m); 
00544 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:42:28 2003 for Punnets by doxygen1.2.18