StepBase Class Reference

Base class for steps associated with different parameter types. More...

#include <MCMC.h>

Inheritance diagram for StepBase:

Inheritance graph
[legend]
Collaboration diagram for StepBase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StepBase (ParameterBase *parameter, unsigned long accept, unsigned long ct, const double w, const double m, const double lowBound, const double highBound)
virtual ~StepBase (void)
virtual void DoStep (void)=0
virtual void SetBounds (double low, double high)=0
virtual void SetW (double w)=0
virtual void SetM (int m)=0
const boost::any aValue (void) const
const double Value (void) const
const int iValue (void) const
const std::vector< double > dVecValue (void) const
const std::vector< int > iVecValue (void) const
int accept (void) const
std::string Label (void) const
ParameterBasePar (void) const
void ResetAccept (void)
void SetLabel (const std::string &label)

Protected Attributes

ParameterBasepar_
 holds the data and methods
unsigned long accept_
 acceptance count for M-H
unsigned long ct_
 number of choices so far
double w_
 slice width
double m_
 maximum number of steps in slice sampler
double lowBound_
 smallest value of parameter allowed
double highBound_
 largest value of parameter allowed

Detailed Description

Base class for steps associated with different parameter types.

Definition at line 205 of file MCMC.h.


Constructor & Destructor Documentation

StepBase::StepBase ( ParameterBase parameter,
unsigned long  accept,
unsigned long  ct,
const double  w,
const double  m,
const double  lowBound,
const double  highBound 
)

Constructor

Used internally to construct Step classes. Not intended for direct use.

Definition at line 436 of file MCMC.cpp.

StepBase::~StepBase ( void   )  [virtual]

Destructor

Definition at line 445 of file MCMC.cpp.


Member Function Documentation

virtual void StepBase::DoStep ( void   )  [pure virtual]

Select new parameter from sampler

Implemented in MetroStepT< T >, AdaptMetroStepT< T >, and SliceStep.

virtual void StepBase::SetBounds ( double  low,
double  high 
) [pure virtual]

Set bounds on parameter value

Parameters:
low lower bound
high upper bound

Implemented in SliceStep.

virtual void StepBase::SetW ( double  w  )  [pure virtual]

Set width of step in slice sampler

Parameters:
w width

Implemented in SliceStep.

virtual void StepBase::SetM ( int  m  )  [pure virtual]

Set maximum number of steps in slice sampler

Parameters:
m maximum number of steps allowed

Implemented in SliceStep.

const boost::any StepBase::aValue ( void   )  const

Returns parameter value of the current step

Definition at line 490 of file MCMC.cpp.

References par_, and ParameterBase::Value().

const double StepBase::Value ( void   )  const

Returns parameter value of the current step

Assumes value stored as double

Definition at line 499 of file MCMC.cpp.

References par_, and ParameterT< T >::Value().

const int StepBase::iValue ( void   )  const

Returns parameter value of the current step

Assumes value stored as integer

Definition at line 509 of file MCMC.cpp.

References par_, and ParameterT< T >::Value().

const vector< double > StepBase::dVecValue ( void   )  const

Returns parameter value of the current step

Assumes value stored as vector<double>

Definition at line 519 of file MCMC.cpp.

References par_, and ParameterT< T >::Value().

const vector< int > StepBase::iVecValue ( void   )  const

Returns parameter value of the current step

Assumes value stored as vector<int>

Definition at line 529 of file MCMC.cpp.

References par_, and ParameterT< T >::Value().

int StepBase::accept ( void   )  const

Number of proposals accepted (for M-H)

Definition at line 451 of file MCMC.cpp.

References accept_.

std::string StepBase::Label ( void   )  const

Label of parameter associated with this step

Definition at line 458 of file MCMC.cpp.

References ParameterBase::Label(), and par_.

ParameterBase * StepBase::Par ( void   )  const

Parameter associated with this step

Definition at line 465 of file MCMC.cpp.

References par_.

void StepBase::ResetAccept ( void   ) 

Reset acceptance statistics (for M-H)

Definition at line 472 of file MCMC.cpp.

References accept_.

void StepBase::SetLabel ( const std::string &  label  ) 

Set the label associated with this step

Parameters:
label the label string

Definition at line 481 of file MCMC.cpp.

References par_, and ParameterBase::SetLabel().


The documentation for this class was generated from the following files:
Generated on Tue Mar 27 16:03:53 2007 for mcmc by  doxygen 1.5.1