Alternaria
fit cylinders and ellipsoids to fungus
Alternaria Class Reference

Alternaria composed of Structure elements. More...

#include <alternaria_model.h>

Inheritance diagram for Alternaria:
Collaboration diagram for Alternaria:

List of all members.

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.
Alternariaclone () const
 Clones this Alternaria.
virtual Alternariaoperator= (const Alternaria &alternaria)
 Copies an Alternaria into this Alternaria.
Structureget_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_densityget_alt_d () const
 Returns the Alternaria_density used by this Alternaria.
const Spore_densityget_spore_d () const
 Returns the Spore_density used by this Alternaria.
const Apical_hypha_densityget_apical_hypha_d () const
 Returns the Apical_hypha_density used by this Alternaria.
const Lateral_hypha_densityget_lateral_hypha_1_d () const
 Returns the Lateral_hypha_density at level 1.
const Lateral_hypha_densityget_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.
Structureget_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_hyphaget_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_hyphaget_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.
Sporeget_random_spore (size_t level) const throw (jwscxx::base::Arg_error, jwscxx::base::Result_error)
 Returns a random Spore uniformly distributed from a level.
Structureget_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_hyphaget_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.
Sporeget_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_hyphaget_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

Structureroot
 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_densityalt_d
 Probabilities over this Alternaria.
const Spore_densityspore_d
 Parameters for density functions over Spore.
const Apical_hypha_densityapical_hypha_d
 Parameters for density functions over Apical_hypha.
const Lateral_hypha_densitylateral_hypha_1_d
 Parameters for density functions over Lateral_hypha on level 1.
const Lateral_hypha_densitylateral_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.

Detailed Description

Alternaria composed of Structure elements.

Definition at line 208 of file alternaria_model.h.


Constructor & Destructor Documentation

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.

Parameters:
c_1See Alternaria::c_1.
thetaEuler angle: base rotation about the x-axis.
psiEuler angle: base rotation about the z-axis.
base_levelBase level for all Structure.
alt_dAlternaria density probabilities.
spore_dSpore_density parameters.
apical_hypha_dApical_hypha_density parameters.
lateral_hypha_1_dLateral_hypha_density parameters at level 1.
lateral_hypha_n_dLateral_hypha_density parameters at level > 1.
Exceptions:
jwscxx::base::Arg_errorc_1 is not valid.

Definition at line 365 of file alternaria_model.cpp.

Alternaria::Alternaria ( const Alternaria alt)

Constructus an Alternaria by copying another.

Parameters:
altAlternaria 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.

Parameters:
fnameName of the file to read the Alternaria from.
alt_dAlternaria density probabilities.
spore_dSpore_density parameters.
apical_hypha_dApical_hypha_density parameters.
lateral_hypha_1_dLateral_hyph_density parameters at level 1.
lateral_hypha_n_dLateral_hyph_density parameters at level > 1.
Exceptions:
jwscxx::base::IO_errorCould not open fname or read from it.
jwscxx::base::Arg_errorImproper 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.


Member Function Documentation

Alternaria * Alternaria::clone ( ) const

Clones this Alternaria.

Returns:
A pointer to a cloned Alternaria.

Definition at line 591 of file alternaria_model.cpp.

Alternaria & Alternaria::operator= ( const Alternaria alternaria) [virtual]

Copies an Alternaria into this Alternaria.

Parameters:
alternariaAlternaria to copy.
Returns:
A reference to this Alternaria with alternaria copied into it.

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.

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.

Parameters:
outOutput 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.

Parameters:
fnameName of the file to print to.
Exceptions:
jwscxx::base::IO_errorCould 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.

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.

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.

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.

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.

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.

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.

Returns:
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.

Returns:
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.

Returns:
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.

Returns:
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.

Returns:
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.

Returns:
Returns a random 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.

Returns:
Returns a random 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.

Returns:
Returns a random 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.

Parameters:
hLateral_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.

Parameters:
hLateral_hypha to remove from this Alternaria.
Exceptions:
jwscxx::base::Arg_errorTried 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.

Parameters:
hApical_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.

Parameters:
hApical_hypha to remove from this Alternaria.
Exceptions:
jwscxx::base::Arg_errorTried 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.

Parameters:
hypha_1Apical_hypha to merge its apical in this Alternaria.
rvalsRandom values to use for the stochastic merge.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
hApical_hypha to split in this Alternaria.
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
hApical_hypha to merge in this Alternaria.
rvalsRandom values to use for the stochastic merge.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
hApical_hypha to split in this Alternaria.
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
hApical_hypha to merge in this Alternaria.
latLateral_hypha of h to merge.
rvalsRandom values to use for the stochastic merge.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
hyphaApical_hypha to replace in this Alternaria.
sporeSpore to use for replacement.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
sporeSpore to split in this Alternaria.
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
sSpore 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.

Parameters:
sSpore to remove from this Alternaria.
Exceptions:
jwscxx::base::Arg_errorTried 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.

Parameters:
sporeSpore to replace in this Alternaria.
hyphaApical_hypha to use for replacment.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
sSpore to split in this Alternaria.
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
sSpore to merge in this Alternaria.
rvalsRandom values to use for the stochastic merge.
Exceptions:
jwscxx::base::Arg_errorCannot 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.

Parameters:
inInput stream to read from.
Exceptions:
jwscxx::base::IO_errorCould not read from it the stream.
jwscxx::base::Arg_errorImproper 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.

Parameters:
sStructure to put in a level.
Note:
The levels begin with 0.

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.

Exceptions:
jwscxx::base::Arg_errorInvalid 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.

Parameters:
levelNumber 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.

Parameters:
sStructure to increment the level of.
old_levelPrevious level the structure was in.
Exceptions:
jwscxx::base::Arg_errorStructure not found at old_level.

Definition at line 2268 of file alternaria_model.cpp.


Member Data Documentation

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.

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.

Parameters for density functions over Apical_hypha.

Definition at line 601 of file alternaria_model.h.

Parameters for density functions over Lateral_hypha on level 1.

Definition at line 607 of file alternaria_model.h.

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.


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