Alternaria
fit cylinders and ellipsoids to fungus
|
Alternaria composed of Structure elements. More...
#include <alternaria_model.h>
Public Member Functions | |
Alternaria (float c_1, float theta, float psi, size_t base_level, const Alternaria_density *alt_d, const Spore_density *spore_d, const Apical_hypha_density *apical_hypha_d, const Lateral_hypha_density *lateral_hypha_1_d, const Lateral_hypha_density *lateral_hypha_n_d) throw (jwscxx::base::Arg_error) | |
Constructs an Alternaria. | |
Alternaria (const Alternaria &alt) | |
Constructus an Alternaria by copying another. | |
Alternaria (const char *fname, const Alternaria_density *alt_d, const Spore_density *spore_d, const Apical_hypha_density *apical_hypha_d, const Lateral_hypha_density *lateral_hypha_1_d, const Lateral_hypha_density *lateral_hypha_n_d) throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) | |
Constructs an Alternaria by reading values from a file. | |
virtual | ~Alternaria () |
Deletes this Alternaria. | |
Alternaria * | clone () const |
Clones this Alternaria. | |
virtual Alternaria & | operator= (const Alternaria &alternaria) |
Copies an Alternaria into this Alternaria. | |
Structure * | get_root () const |
Returns the root Structure. | |
const float | get_theta () const |
Returns the theta angle used by this Alternaria. | |
const float | get_psi () const |
Returns the psi angle used by this Alternaria. | |
const size_t | get_base_level () const |
Returns the base level used by this Alternaria. | |
const Alternaria_density * | get_alt_d () const |
Returns the Alternaria_density used by this Alternaria. | |
const Spore_density * | get_spore_d () const |
Returns the Spore_density used by this Alternaria. | |
const Apical_hypha_density * | get_apical_hypha_d () const |
Returns the Apical_hypha_density used by this Alternaria. | |
const Lateral_hypha_density * | get_lateral_hypha_1_d () const |
Returns the Lateral_hypha_density at level 1. | |
const Lateral_hypha_density * | get_lateral_hypha_n_d () const |
Returns the Lateral_hypha_density at level > 1. | |
double | get_log_prob () const |
Returns the log probability of this Alternaria. | |
float | get_c_1 () const |
Returns the C_1 of this Alternaria_model. | |
void | set_root (Structure *root) throw (jwscxx::base::Arg_error) |
Sets the root Structure. | |
void | set_c_1 (float c_1) throw (jwscxx::base::Arg_error) |
Sets the C_1 of this Alternaria_model. | |
virtual void | print (std::ostream &out=std::cout) const |
Prints this Alternaria to an output stream. | |
virtual void | print (const char *fname) const throw (jwscxx::base::IO_error) |
Prints this Alternaria to a file. | |
size_t | get_num_levels () const |
Returns the number of levels in this Alternaria. | |
size_t | get_num_structures () const |
Returns the number of structures in this Alternaria. | |
size_t | get_num_apical_hypha () const |
Returns the number of Apical_hypha in this Alternaria. | |
size_t | get_num_lateral_hypha () const |
Returns the number of Lateral hypha in this Alternaria. | |
size_t | get_num_spores () const |
Returns the number of Spore in this Alternaria. | |
size_t | get_uniform_random_level () const throw (jwscxx::base::Result_error) |
Returns a random level index uniformly distributed. | |
size_t | get_geometric_random_level () const throw (jwscxx::base::Result_error) |
Returns a random level index geometric distributed. | |
Structure * | get_random_structure (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Structure uniformly distributed from a level. | |
Lateral_hypha * | get_random_lateral_hypha (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Lateral_hypha uniformly distributed from a level. | |
Apical_hypha * | get_random_apical_hypha (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Apical_hypha uniformly distributed from a level. | |
Spore * | get_random_spore (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Spore uniformly distributed from a level. | |
Structure * | get_random_terminal (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Structure uniformly distributed from a level. | |
Apical_hypha * | get_random_terminal_apical_hypha (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Apical_hypha uniformly distributed from a level. | |
Spore * | get_random_terminal_spore (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Spore uniformly distributed from a level. | |
Lateral_hypha * | get_random_terminal_lateral_hypha (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Lateral_hypha uniformly distributed from a level. | |
void | add_lateral_hypha (Lateral_hypha *h) throw (jwscxx::base::Arg_error) |
Adds a Lateral_hypha to this Alternaria. | |
void | remove_lateral_hypha (Lateral_hypha *h) throw (jwscxx::base::Arg_error) |
Removes a Lateral_hypha from this Alternaria. | |
void | add_apical_hypha (Apical_hypha *h) throw (jwscxx::base::Arg_error) |
Adds an Apical_hypha to this Alternaria. | |
void | remove_apical_hypha (Apical_hypha *h) throw (jwscxx::base::Arg_error) |
Removes an Apical_hypha from this Alternaria. | |
void | merge_2_apical_with_spore (Apical_hypha *hypha_1, const Spore *rvals) throw (jwscxx::base::Arg_error) |
Merges 2 Apical_hypha into a Spore. | |
void | split_apical_hypha_into_apical (Apical_hypha *h, const Apical_hypha *rvals_1, const Apical_hypha *rvals_2) throw (jwscxx::base::Arg_error) |
Splits an Apical_hypha from this Alternaria into its apical. | |
void | merge_apical_hypha_with_apical (Apical_hypha *h, const Apical_hypha *rvals) throw (jwscxx::base::Arg_error) |
Merges an Apical_hypha from this Alternaria with its apical. | |
void | split_apical_hypha_into_lateral (Apical_hypha *h, const Apical_hypha *rvals_1, const Lateral_hypha *rvals_2) throw (jwscxx::base::Arg_error) |
Splits an Apical_hypha from this Alternaria into a lateral. | |
void | merge_apical_hypha_with_lateral (Apical_hypha *h, Lateral_hypha *lat, const Apical_hypha *rvals) throw (jwscxx::base::Arg_error) |
Merges an Apical_hypha from this Alternaria with one of its laterals. | |
void | replace_apical_hypha_with_spore (Apical_hypha *hypha, Spore *spore) throw (jwscxx::base::Arg_error) |
Replaces a Spore with an Apical_hypha with. | |
void | split_spore_into_2_apical (Spore *spore, const Apical_hypha *rvals_1, const Apical_hypha *rvals_2) throw (jwscxx::base::Arg_error) |
Splits a Spore into 2 Apical_hypha. | |
void | add_spore (Spore *s) throw (jwscxx::base::Arg_error) |
Adds a Spore to this Alternaria. | |
void | remove_spore (Spore *s) throw (jwscxx::base::Arg_error) |
Removes a Spore from this Alternaria. | |
void | replace_spore_with_apical_hypha (Spore *spore, Apical_hypha *hypha) throw (jwscxx::base::Arg_error) |
Replaces an Apical_hypha with a Spore. | |
void | split_spore_into_spore (Spore *s, const Spore *rvals_1, const Spore *rvals_2) throw (jwscxx::base::Arg_error) |
Splits a Spore from this Alternaria into its apical. | |
void | merge_spore_with_spore (Spore *s, const Spore *rvals) throw (jwscxx::base::Arg_error) |
Merges a Spore from this Alternaria with its apical. | |
Protected Member Functions | |
void | read (std::istream &in) throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) |
Reads a printed Alternaria from an input stream. | |
void | build_levels (Structure *s) |
Build up the levels with Structure. | |
void | check_levels () |
Used to verify that the levels are consistent. | |
void | check_c_1 () const throw (jwscxx::base::Arg_error) |
Checks the constant C_1 of this Alternaria_model against its valid range. | |
void | ensure_level_space (size_t level) |
Ensures the levels vectors have the requested space. | |
void | recursively_update_level (Structure *s, size_t old_level) throw (jwscxx::base::Arg_error) |
Recursively updates the Structure to its current level. | |
Protected Attributes | |
Structure * | root |
Alternaria Structure elements represented as a directed acyclic graph. | |
float | theta |
Euler angle: base rotation about the x-axis for the root. | |
float | psi |
Euler angle: base rotation about the z-axis for the root. | |
size_t | base_level |
The base level for all Structure in this Alternaria. | |
const Alternaria_density * | alt_d |
Probabilities over this Alternaria. | |
const Spore_density * | spore_d |
Parameters for density functions over Spore. | |
const Apical_hypha_density * | apical_hypha_d |
Parameters for density functions over Apical_hypha. | |
const Lateral_hypha_density * | lateral_hypha_1_d |
Parameters for density functions over Lateral_hypha on level 1. | |
const Lateral_hypha_density * | lateral_hypha_n_d |
Parameters for density functions over Lateral_hypha on levels > 1. | |
std::vector< std::vector < Structure * > * > | level_structs |
Vector of Structure levels in the Alternaria. | |
std::vector< std::vector < Apical_hypha * > * > | level_apical_hypha |
Vector of Apical_hypha levels in the Alternaria. | |
std::vector< std::vector < Lateral_hypha * > * > | level_lateral_hypha |
Vector of Lateral_hypha levels in the Alternaria. | |
std::vector< std::vector < Spore * > * > | level_spores |
Vector of Spore levels in the Alternaria. | |
std::vector< std::vector < Structure * > * > | level_terminals |
Vector of terminal apical Structure at each level. | |
double | log_prob |
Log probability of this Alternaria. | |
float | c_1 |
Scale for the structure intensity variance. |
Alternaria composed of Structure elements.
Definition at line 208 of file alternaria_model.h.
Alternaria::Alternaria | ( | float | c_1, |
float | theta, | ||
float | psi, | ||
size_t | base_level, | ||
const Alternaria_density * | alt_d, | ||
const Spore_density * | spore_d, | ||
const Apical_hypha_density * | apical_hypha_d, | ||
const Lateral_hypha_density * | lateral_hypha_1_d, | ||
const Lateral_hypha_density * | lateral_hypha_n_d | ||
) | throw (jwscxx::base::Arg_error) |
Constructs an Alternaria.
c_1 | See Alternaria::c_1. |
theta | Euler angle: base rotation about the x-axis. |
psi | Euler angle: base rotation about the z-axis. |
base_level | Base level for all Structure. |
alt_d | Alternaria density probabilities. |
spore_d | Spore_density parameters. |
apical_hypha_d | Apical_hypha_density parameters. |
lateral_hypha_1_d | Lateral_hypha_density parameters at level 1. |
lateral_hypha_n_d | Lateral_hypha_density parameters at level > 1. |
jwscxx::base::Arg_error | c_1 is not valid. |
Definition at line 365 of file alternaria_model.cpp.
Alternaria::Alternaria | ( | const Alternaria & | alt | ) |
Constructus an Alternaria by copying another.
alt | Alternaria to construct another from. |
Definition at line 401 of file alternaria_model.cpp.
Alternaria::Alternaria | ( | const char * | fname, |
const Alternaria_density * | alt_d, | ||
const Spore_density * | spore_d, | ||
const Apical_hypha_density * | apical_hypha_d, | ||
const Lateral_hypha_density * | lateral_hypha_1_d, | ||
const Lateral_hypha_density * | lateral_hypha_n_d | ||
) | throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) |
Constructs an Alternaria by reading values from a file.
fname | Name of the file to read the Alternaria from. |
alt_d | Alternaria density probabilities. |
spore_d | Spore_density parameters. |
apical_hypha_d | Apical_hypha_density parameters. |
lateral_hypha_1_d | Lateral_hyph_density parameters at level 1. |
lateral_hypha_n_d | Lateral_hyph_density parameters at level > 1. |
jwscxx::base::IO_error | Could not open fname or read from it. |
jwscxx::base::Arg_error | Improper format or unknown type of Structure in fname. No root Structure in the file. |
Definition at line 444 of file alternaria_model.cpp.
Alternaria::~Alternaria | ( | ) | [virtual] |
Deletes this Alternaria.
Frees all dynamically allocated members.
Definition at line 576 of file alternaria_model.cpp.
Alternaria * Alternaria::clone | ( | ) | const |
Clones this Alternaria.
Definition at line 591 of file alternaria_model.cpp.
Alternaria & Alternaria::operator= | ( | const Alternaria & | alternaria | ) | [virtual] |
Copies an Alternaria into this Alternaria.
alternaria | Alternaria to copy. |
Definition at line 602 of file alternaria_model.cpp.
Structure* Alternaria::get_root | ( | ) | const [inline] |
Returns the root Structure.
Definition at line 258 of file alternaria_model.h.
const float Alternaria::get_theta | ( | ) | const [inline] |
Returns the theta angle used by this Alternaria.
Definition at line 262 of file alternaria_model.h.
const float Alternaria::get_psi | ( | ) | const [inline] |
Returns the psi angle used by this Alternaria.
Definition at line 266 of file alternaria_model.h.
const size_t Alternaria::get_base_level | ( | ) | const [inline] |
Returns the base level used by this Alternaria.
Definition at line 270 of file alternaria_model.h.
const Alternaria_density* Alternaria::get_alt_d | ( | ) | const [inline] |
Returns the Alternaria_density used by this Alternaria.
Definition at line 274 of file alternaria_model.h.
const Spore_density* Alternaria::get_spore_d | ( | ) | const [inline] |
Returns the Spore_density used by this Alternaria.
Definition at line 278 of file alternaria_model.h.
const Apical_hypha_density* Alternaria::get_apical_hypha_d | ( | ) | const [inline] |
Returns the Apical_hypha_density used by this Alternaria.
Definition at line 282 of file alternaria_model.h.
const Lateral_hypha_density* Alternaria::get_lateral_hypha_1_d | ( | ) | const [inline] |
Returns the Lateral_hypha_density at level 1.
Definition at line 287 of file alternaria_model.h.
const Lateral_hypha_density* Alternaria::get_lateral_hypha_n_d | ( | ) | const [inline] |
Returns the Lateral_hypha_density at level > 1.
Definition at line 292 of file alternaria_model.h.
double Alternaria::get_log_prob | ( | ) | const |
Returns the log probability of this Alternaria.
Definition at line 650 of file alternaria_model.cpp.
float Alternaria::get_c_1 | ( | ) | const [inline] |
Returns the C_1 of this Alternaria_model.
Definition at line 301 of file alternaria_model.h.
void Alternaria::set_root | ( | Structure * | root | ) | throw (jwscxx::base::Arg_error) |
Sets the root Structure.
TODO this is a temporary function.
Definition at line 669 of file alternaria_model.cpp.
void Alternaria::set_c_1 | ( | float | c_1 | ) | throw (jwscxx::base::Arg_error) |
Sets the C_1 of this Alternaria_model.
Definition at line 679 of file alternaria_model.cpp.
void Alternaria::print | ( | std::ostream & | out = std::cout | ) | const [virtual] |
Prints this Alternaria to an output stream.
The format is as follows
C_1: Theta: Psi: Level: Log Prob: log prob ...Structures...
See Structure::print() for details.
out | Output stream to print to. |
Implements Printable.
Definition at line 754 of file alternaria_model.cpp.
void Alternaria::print | ( | const char * | fname | ) | const throw (jwscxx::base::IO_error) [virtual] |
Prints this Alternaria to a file.
The format is as follows
C_1: Theta: Psi: Level: Log Prob: log prob ...Structures...
See Structure::print() for details.
fname | Name of the file to print to. |
jwscxx::base::IO_error | Could not open fname to write to. |
Definition at line 714 of file alternaria_model.cpp.
size_t Alternaria::get_num_levels | ( | ) | const [inline] |
Returns the number of levels in this Alternaria.
Definition at line 322 of file alternaria_model.h.
size_t Alternaria::get_num_structures | ( | ) | const |
Returns the number of structures in this Alternaria.
Definition at line 770 of file alternaria_model.cpp.
size_t Alternaria::get_num_apical_hypha | ( | ) | const |
Returns the number of Apical_hypha in this Alternaria.
Definition at line 784 of file alternaria_model.cpp.
size_t Alternaria::get_num_lateral_hypha | ( | ) | const |
Returns the number of Lateral hypha in this Alternaria.
Definition at line 798 of file alternaria_model.cpp.
size_t Alternaria::get_num_spores | ( | ) | const |
Returns the number of Spore in this Alternaria.
Definition at line 812 of file alternaria_model.cpp.
size_t Alternaria::get_uniform_random_level | ( | ) | const throw (jwscxx::base::Result_error) |
Returns a random level index uniformly distributed.
Definition at line 826 of file alternaria_model.cpp.
size_t Alternaria::get_geometric_random_level | ( | ) | const throw (jwscxx::base::Result_error) |
Returns a random level index geometric distributed.
Definition at line 841 of file alternaria_model.cpp.
Structure * Alternaria::get_random_structure | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Structure uniformly distributed from a level.
Definition at line 862 of file alternaria_model.cpp.
Lateral_hypha * Alternaria::get_random_lateral_hypha | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Lateral_hypha uniformly distributed from a level.
Definition at line 920 of file alternaria_model.cpp.
Apical_hypha * Alternaria::get_random_apical_hypha | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Apical_hypha uniformly distributed from a level.
Definition at line 891 of file alternaria_model.cpp.
Spore * Alternaria::get_random_spore | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random Spore uniformly distributed from a level.
Definition at line 948 of file alternaria_model.cpp.
Structure * Alternaria::get_random_terminal | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Structure uniformly distributed from a level.
Definition at line 977 of file alternaria_model.cpp.
Apical_hypha * Alternaria::get_random_terminal_apical_hypha | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Apical_hypha uniformly distributed from a level.
Definition at line 1006 of file alternaria_model.cpp.
Spore * Alternaria::get_random_terminal_spore | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Spore uniformly distributed from a level.
Definition at line 1057 of file alternaria_model.cpp.
Lateral_hypha * Alternaria::get_random_terminal_lateral_hypha | ( | size_t | level | ) | const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error) |
Returns a random apical terminal Lateral_hypha uniformly distributed from a level.
Definition at line 1109 of file alternaria_model.cpp.
void Alternaria::add_lateral_hypha | ( | Lateral_hypha * | h | ) | throw (jwscxx::base::Arg_error) |
Adds a Lateral_hypha to this Alternaria.
h | Lateral_hypha to add to this Alternaria. |
Definition at line 1158 of file alternaria_model.cpp.
void Alternaria::remove_lateral_hypha | ( | Lateral_hypha * | h | ) | throw (jwscxx::base::Arg_error) |
Removes a Lateral_hypha from this Alternaria.
h | Lateral_hypha to remove from this Alternaria. |
jwscxx::base::Arg_error | Tried to remove a non-terminal Lateral_hypha. |
Definition at line 1206 of file alternaria_model.cpp.
void Alternaria::add_apical_hypha | ( | Apical_hypha * | h | ) | throw (jwscxx::base::Arg_error) |
Adds an Apical_hypha to this Alternaria.
h | Apical_hypha to add to this Alternaria. |
Definition at line 1270 of file alternaria_model.cpp.
void Alternaria::remove_apical_hypha | ( | Apical_hypha * | h | ) | throw (jwscxx::base::Arg_error) |
Removes an Apical_hypha from this Alternaria.
h | Apical_hypha to remove from this Alternaria. |
jwscxx::base::Arg_error | Tried to remove a non-terminal Apical_hypha. |
Definition at line 1303 of file alternaria_model.cpp.
void Alternaria::merge_2_apical_with_spore | ( | Apical_hypha * | hypha_1, |
const Spore * | rvals | ||
) | throw (jwscxx::base::Arg_error) |
Merges 2 Apical_hypha into a Spore.
hypha_1 | Apical_hypha to merge its apical in this Alternaria. |
rvals | Random values to use for the stochastic merge. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to merge, h does not have an apical, or the apical for is not an Apical_hypha. |
Definition at line 1357 of file alternaria_model.cpp.
void Alternaria::split_apical_hypha_into_apical | ( | Apical_hypha * | h, |
const Apical_hypha * | rvals_1, | ||
const Apical_hypha * | rvals_2 | ||
) | throw (jwscxx::base::Arg_error) |
Splits an Apical_hypha from this Alternaria into its apical.
h | Apical_hypha to split in this Alternaria. |
rvals_1 | Random values to use for the stochastic split. |
rvals_2 | Random values to use for the stochastic split. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to split. |
Definition at line 1426 of file alternaria_model.cpp.
void Alternaria::merge_apical_hypha_with_apical | ( | Apical_hypha * | h, |
const Apical_hypha * | rvals | ||
) | throw (jwscxx::base::Arg_error) |
Merges an Apical_hypha from this Alternaria with its apical.
h | Apical_hypha to merge in this Alternaria. |
rvals | Random values to use for the stochastic merge. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to merge, h does not have an apical, or the apical for is not an Apical_hypha. |
Definition at line 1470 of file alternaria_model.cpp.
void Alternaria::split_apical_hypha_into_lateral | ( | Apical_hypha * | h, |
const Apical_hypha * | rvals_1, | ||
const Lateral_hypha * | rvals_2 | ||
) | throw (jwscxx::base::Arg_error) |
Splits an Apical_hypha from this Alternaria into a lateral.
h | Apical_hypha to split in this Alternaria. |
rvals_1 | Random values to use for the stochastic split. |
rvals_2 | Random values to use for the stochastic split. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to split. |
Definition at line 1518 of file alternaria_model.cpp.
void Alternaria::merge_apical_hypha_with_lateral | ( | Apical_hypha * | h, |
Lateral_hypha * | lat, | ||
const Apical_hypha * | rvals | ||
) | throw (jwscxx::base::Arg_error) |
Merges an Apical_hypha from this Alternaria with one of its laterals.
h | Apical_hypha to merge in this Alternaria. |
lat | Lateral_hypha of h to merge. |
rvals | Random values to use for the stochastic merge. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to merge, h does not have an apical, or the apical for is not an Apical_hypha. |
Definition at line 1593 of file alternaria_model.cpp.
void Alternaria::replace_apical_hypha_with_spore | ( | Apical_hypha * | hypha, |
Spore * | spore | ||
) | throw (jwscxx::base::Arg_error) |
Replaces a Spore with an Apical_hypha with.
hypha | Apical_hypha to replace in this Alternaria. |
spore | Spore to use for replacement. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to replace. |
Definition at line 1684 of file alternaria_model.cpp.
void Alternaria::split_spore_into_2_apical | ( | Spore * | spore, |
const Apical_hypha * | rvals_1, | ||
const Apical_hypha * | rvals_2 | ||
) | throw (jwscxx::base::Arg_error) |
Splits a Spore into 2 Apical_hypha.
spore | Spore to split in this Alternaria. |
rvals_1 | Random values to use for the stochastic split. |
rvals_2 | Random values to use for the stochastic split. |
jwscxx::base::Arg_error | Cannot find Apical_hypha to split. |
Definition at line 1879 of file alternaria_model.cpp.
void Alternaria::add_spore | ( | Spore * | s | ) | throw (jwscxx::base::Arg_error) |
Adds a Spore to this Alternaria.
s | Spore to add to this Alternaria. |
Definition at line 1736 of file alternaria_model.cpp.
void Alternaria::remove_spore | ( | Spore * | s | ) | throw (jwscxx::base::Arg_error) |
Removes a Spore from this Alternaria.
s | Spore to remove from this Alternaria. |
jwscxx::base::Arg_error | Tried to remove a non-terminal Spore. |
Definition at line 1768 of file alternaria_model.cpp.
void Alternaria::replace_spore_with_apical_hypha | ( | Spore * | spore, |
Apical_hypha * | hypha | ||
) | throw (jwscxx::base::Arg_error) |
Replaces an Apical_hypha with a Spore.
spore | Spore to replace in this Alternaria. |
hypha | Apical_hypha to use for replacment. |
jwscxx::base::Arg_error | Cannot find Spore to replace. |
Definition at line 1820 of file alternaria_model.cpp.
void Alternaria::split_spore_into_spore | ( | Spore * | s, |
const Spore * | rvals_1, | ||
const Spore * | rvals_2 | ||
) | throw (jwscxx::base::Arg_error) |
Splits a Spore from this Alternaria into its apical.
s | Spore to split in this Alternaria. |
rvals_1 | Random values to use for the stochastic split. |
rvals_2 | Random values to use for the stochastic split. |
jwscxx::base::Arg_error | Cannot find Spore to split. |
Definition at line 1944 of file alternaria_model.cpp.
void Alternaria::merge_spore_with_spore | ( | Spore * | s, |
const Spore * | rvals | ||
) | throw (jwscxx::base::Arg_error) |
Merges a Spore from this Alternaria with its apical.
s | Spore to merge in this Alternaria. |
rvals | Random values to use for the stochastic merge. |
jwscxx::base::Arg_error | Cannot find Spore to merge, s does not have an apical, or the apical for is not an Spore. |
Definition at line 1988 of file alternaria_model.cpp.
void Alternaria::read | ( | std::istream & | in | ) | throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) [protected] |
Reads a printed Alternaria from an input stream.
in | Input stream to read from. |
jwscxx::base::IO_error | Could not read from it the stream. |
jwscxx::base::Arg_error | Improper format or unknown type of Structure on the stream. No root Structure was read. |
Definition at line 2036 of file alternaria_model.cpp.
void Alternaria::build_levels | ( | Structure * | s | ) | [protected] |
Build up the levels with Structure.
Recusively builds-up the levels.
s | Structure to put in a level. |
Definition at line 2155 of file alternaria_model.cpp.
void Alternaria::check_levels | ( | ) | [protected] |
Used to verify that the levels are consistent.
Used for debugging.
Definition at line 2198 of file alternaria_model.cpp.
void Alternaria::check_c_1 | ( | ) | const throw (jwscxx::base::Arg_error) [protected] |
Checks the constant C_1 of this Alternaria_model against its valid range.
jwscxx::base::Arg_error | Invalid C_1. |
Definition at line 2225 of file alternaria_model.cpp.
void Alternaria::ensure_level_space | ( | size_t | level | ) | [protected] |
Ensures the levels vectors have the requested space.
level | Number of levels to ensure there is space for. |
Definition at line 2235 of file alternaria_model.cpp.
void Alternaria::recursively_update_level | ( | Structure * | s, |
size_t | old_level | ||
) | throw (jwscxx::base::Arg_error) [protected] |
Recursively updates the Structure to its current level.
s | Structure to increment the level of. |
old_level | Previous level the structure was in. |
jwscxx::base::Arg_error | Structure not found at old_level. |
Definition at line 2268 of file alternaria_model.cpp.
Structure* Alternaria::root [protected] |
Alternaria Structure elements represented as a directed acyclic graph.
Definition at line 583 of file alternaria_model.h.
float Alternaria::theta [protected] |
Euler angle: base rotation about the x-axis for the root.
Definition at line 586 of file alternaria_model.h.
float Alternaria::psi [protected] |
Euler angle: base rotation about the z-axis for the root.
Definition at line 589 of file alternaria_model.h.
size_t Alternaria::base_level [protected] |
The base level for all Structure in this Alternaria.
Definition at line 592 of file alternaria_model.h.
const Alternaria_density* Alternaria::alt_d [protected] |
Probabilities over this Alternaria.
Definition at line 595 of file alternaria_model.h.
const Spore_density* Alternaria::spore_d [protected] |
Parameters for density functions over Spore.
Definition at line 598 of file alternaria_model.h.
const Apical_hypha_density* Alternaria::apical_hypha_d [protected] |
Parameters for density functions over Apical_hypha.
Definition at line 601 of file alternaria_model.h.
const Lateral_hypha_density* Alternaria::lateral_hypha_1_d [protected] |
Parameters for density functions over Lateral_hypha on level 1.
Definition at line 607 of file alternaria_model.h.
const Lateral_hypha_density* Alternaria::lateral_hypha_n_d [protected] |
Parameters for density functions over Lateral_hypha on levels > 1.
Definition at line 613 of file alternaria_model.h.
std::vector< std::vector<Structure*>* > Alternaria::level_structs [protected] |
Vector of Structure levels in the Alternaria.
Definition at line 616 of file alternaria_model.h.
std::vector< std::vector<Apical_hypha*>* > Alternaria::level_apical_hypha [protected] |
Vector of Apical_hypha levels in the Alternaria.
Definition at line 619 of file alternaria_model.h.
std::vector< std::vector<Lateral_hypha*>* > Alternaria::level_lateral_hypha [protected] |
Vector of Lateral_hypha levels in the Alternaria.
Definition at line 622 of file alternaria_model.h.
std::vector< std::vector<Spore*>* > Alternaria::level_spores [protected] |
Vector of Spore levels in the Alternaria.
Definition at line 625 of file alternaria_model.h.
std::vector< std::vector<Structure*>* > Alternaria::level_terminals [protected] |
Vector of terminal apical Structure at each level.
Definition at line 628 of file alternaria_model.h.
double Alternaria::log_prob [protected] |
Log probability of this Alternaria.
Definition at line 631 of file alternaria_model.h.
float Alternaria::c_1 [protected] |
Scale for the structure intensity variance.
Must be >= 0.
The intensity of structure is generally not uniform. This scales the difference between structure intensity and background intensity. It is used in conjunction with Imaging_model::c_2 to calculate the variance for each pixel in the model scene.
A large value indicates that structures with high intensity have more variance in their intensity than those with a lower intensity.
It can also be interpreted as a way to penalize pixels in the model scene that are set as part of the Alternaria, when in fact in the observed image data they are closer to being background.
Definition at line 650 of file alternaria_model.h.