Alternaria
fit cylinders and ellipsoids to fungus
|
#include <sampler.h>
Public Member Functions | |
Sampler_jump_move (const char *name_1, const char *name_2, double prob_1, double prob_2) throw (jwscxx::base::Arg_error) | |
Constructs a Sampler_jump_move. | |
virtual | ~Sampler_jump_move () |
Deletes a Sampler_jump_move. | |
bool | run (Sampler_move_parameters *params) throw (jwscxx::base::Exception) |
Stochastically runs the 1st or 2nd balanced move and either accepts or rejects. | |
virtual bool | run_1 (Sampler_move_parameters *params)=0 throw (jwscxx::base::Exception) |
Runs the 1st balanced jump move and either accepts or rejects. | |
virtual bool | run_2 (Sampler_move_parameters *params)=0 throw (jwscxx::base::Exception) |
Runs the 2nd balanced jump move and either accepts or rejects. | |
virtual const std::ostringstream & | get_info (Sampler_move_parameters *params) |
Returns information about the current state of the most recent run of this move. | |
virtual const std::ostringstream & | get_proposal_info (Sampler_move_parameters *params) |
Returns information about the proposed state of the most recent run of this move. | |
double | get_prob () const |
Returns the summed probability of both balanced moves. | |
void | set_prob (double prob) throw (jwscxx::base::Arg_error) |
Sets the probability of both balanced moves. | |
double | get_prob_1 () const |
Returns the probability of the 1st balanced jump move. | |
const char * | get_name_1 () const |
Returns the name of the 1st balanced jump move. | |
void | set_prob_1 (double prob_1) throw (jwscxx::base::Arg_error) |
Sets the probability of the 1st balanced jump move. | |
double | get_prob_2 () const |
Returns the probability of the 2nd balanced jump move. | |
const char * | get_name_2 () const |
Returns the name of the 2nd balanced jump move. | |
void | set_prob_2 (double prob_2) throw (jwscxx::base::Arg_error) |
Sets the probability of the 2nd balanced jump move. | |
Protected Attributes | |
uint32_t | num_accepted_1 |
Number of times the 1st jump ran and accepted. | |
uint32_t | num_attempts_1 |
Number of times the 1st jump ran and accepted or rejected. | |
double | prob_1 |
Probability of the 1st balanced jump move in a Sampler. | |
const char * | name_1 |
Single word name of the 1st balanced jump move. | |
uint32_t | num_accepted_2 |
Number of times the 2nd jump ran and accepted. | |
uint32_t | num_attempts_2 |
Number of times the 2nd jump ran and accepted or rejected. | |
double | prob_2 |
Probability of the 2nd balanced jump move in a Sampler. | |
const char * | name_2 |
Single word name of the 2nd balanced jump move. |
MCMC Sampler move that modifies the number model parameter. Must be
Sampler_jump_move::Sampler_jump_move | ( | const char * | name_1, |
const char * | name_2, | ||
double | prob_1, | ||
double | prob_2 | ||
) | throw (jwscxx::base::Arg_error) |
Constructs a Sampler_jump_move.
name_1 | Name of the 1st balanced move. |
name_2 | Name of the 2nd balanced move. |
prob_1 | Probability of the 1st balanced move. |
prob_2 | Probability of the 2nd balanced move. |
jwscxx::base::Arg_error | Probability must be in [0,1]. |
Definition at line 190 of file sampler.cpp.
virtual Sampler_jump_move::~Sampler_jump_move | ( | ) | [inline, virtual] |
Deletes a Sampler_jump_move.
bool Sampler_jump_move::run | ( | Sampler_move_parameters * | params | ) | throw (jwscxx::base::Exception) [virtual] |
Stochastically runs the 1st or 2nd balanced move and either accepts or rejects.
params | Parameters for the move. |
Implements Sampler_move.
Definition at line 217 of file sampler.cpp.
virtual bool Sampler_jump_move::run_1 | ( | Sampler_move_parameters * | params | ) | throw (jwscxx::base::Exception) [pure virtual] |
Runs the 1st balanced jump move and either accepts or rejects.
Implemented in Apical_hypha_birth_death_move, Lateral_hypha_birth_death_move, Spore_birth_death_move, Spore_transition_apical_move, Spore_split_merge_2_apical_move, Spore_split_merge_spore_move, Apical_hypha_split_merge_apical_move, and Apical_hypha_split_merge_lateral_move.
virtual bool Sampler_jump_move::run_2 | ( | Sampler_move_parameters * | params | ) | throw (jwscxx::base::Exception) [pure virtual] |
Runs the 2nd balanced jump move and either accepts or rejects.
Implemented in Apical_hypha_birth_death_move, Lateral_hypha_birth_death_move, Spore_birth_death_move, Spore_transition_apical_move, Spore_split_merge_2_apical_move, Spore_split_merge_spore_move, Apical_hypha_split_merge_apical_move, and Apical_hypha_split_merge_lateral_move.
const std::ostringstream & Sampler_jump_move::get_info | ( | Sampler_move_parameters * | params | ) | [virtual] |
Returns information about the current state of the most recent run of this move.
params | Parameters for the move. |
Implements Sampler_move.
Definition at line 235 of file sampler.cpp.
const std::ostringstream & Sampler_jump_move::get_proposal_info | ( | Sampler_move_parameters * | params | ) | [virtual] |
Returns information about the proposed state of the most recent run of this move.
params | Parameters for the move. |
Implements Sampler_move.
Definition at line 259 of file sampler.cpp.
double Sampler_jump_move::get_prob | ( | ) | const [inline, virtual] |
Returns the summed probability of both balanced moves.
Implements Sampler_move.
void Sampler_jump_move::set_prob | ( | double | prob | ) | throw (jwscxx::base::Arg_error) [virtual] |
Sets the probability of both balanced moves.
prob | New probability of the balanced moves (evenly divided). |
jwscxx::base::Arg_error | Value must be in [0,1]. |
Implements Sampler_move.
Definition at line 282 of file sampler.cpp.
double Sampler_jump_move::get_prob_1 | ( | ) | const [inline] |
const char* Sampler_jump_move::get_name_1 | ( | ) | const [inline] |
void Sampler_jump_move::set_prob_1 | ( | double | prob_1 | ) | throw (jwscxx::base::Arg_error) |
Sets the probability of the 1st balanced jump move.
prob_1 | New probability of the 1st balanced move. |
jwscxx::base::Arg_error | Value must be in [0,1]. |
Definition at line 307 of file sampler.cpp.
double Sampler_jump_move::get_prob_2 | ( | ) | const [inline] |
const char* Sampler_jump_move::get_name_2 | ( | ) | const [inline] |
void Sampler_jump_move::set_prob_2 | ( | double | prob_2 | ) | throw (jwscxx::base::Arg_error) |
Sets the probability of the 2nd balanced jump move.
prob_2 | New probability of the 2nd balanced move. |
jwscxx::base::Arg_error | Value must be in [0,1]. |
Definition at line 323 of file sampler.cpp.
uint32_t Sampler_jump_move::num_accepted_1 [protected] |
uint32_t Sampler_jump_move::num_attempts_1 [protected] |
double Sampler_jump_move::prob_1 [protected] |
const char* Sampler_jump_move::name_1 [protected] |
uint32_t Sampler_jump_move::num_accepted_2 [protected] |
uint32_t Sampler_jump_move::num_attempts_2 [protected] |
double Sampler_jump_move::prob_2 [protected] |
const char* Sampler_jump_move::name_2 [protected] |