Alternaria
fit cylinders and ellipsoids to fungus
Apical_structure Class Reference

An Alternaria structure element either postioned apically along another Apical_structure element or as a root element. More...

#include <structure.h>

Inheritance diagram for Apical_structure:
Collaboration diagram for Apical_structure:

List of all members.

Public Member Functions

 Apical_structure (float centroid_x, float centroid_y, float centroid_z, float length, float width, float base_theta, float base_psi, float theta, float psi, float opacity, size_t level, const class Apical_structure_density *density) throw (jwscxx::base::Arg_error)
 Creates a parent-less Apical_structure positioned w.r.t. a centroid.
 Apical_structure (Structure *parent, float length, float width, float base_theta, float base_psi, float theta, float psi, float opacity, const class Apical_structure_density *density) throw (jwscxx::base::Arg_error, Apical_error)
 Creates an Apical_structure and attaches it to a parent.
 Apical_structure (Structure *parent, float centroid_x, float centroid_y, float centroid_z, float length, float width, float base_theta, float base_psi, float opacity, const class Apical_structure_density *density) throw (jwscxx::base::Arg_error, Apical_error)
 Creates an Apical_structure and attaches it to a parent.
 Apical_structure (const Apical_structure &s)
 Constructs an Apical_structure by copying another.
virtual Apical_structureclone () const =0
 Clones this Apical_structure.
virtual Apical_structurerecursively_clone () const
 Recursively clones this Apical_structure and all its descendents.
virtual Apical_structureoperator= (const Apical_structure &s)
 Copies an Apical_structure into this Apical_structure.
virtual ~Apical_structure ()
 Deletes this Apical_structure.
void set_position (float centroid_x, float centroid_y, float centroid_z) throw (jwscxx::base::Arg_error)
 Sets the centroid position.
virtual Apical_structuresplit_into_apical (const Apical_structure *rvals_1, const Apical_structure *rvals_2) throw (jwscxx::base::Arg_error)
 Stochastically splits this Structure into this and another Structure.
virtual Apical_structuremerge_with_apical (const Apical_structure *rvals) throw (jwscxx::base::Arg_error)
 Stochastically merges this Structure with its Structure::apical.
virtual Lateral_structuresplit_into_lateral (const Apical_structure *rvals_1, const Lateral_structure *rvals_2) throw (jwscxx::base::Arg_error)
 Stochastically splits this Structure into this and another Lateral_structure.
virtual Lateral_structuremerge_with_lateral (Lateral_structure *lateral, const Apical_structure *rvals) throw (jwscxx::base::Arg_error)
 Stochastically merges this Structure with one of its Structure::laterals.
virtual void replace (Apical_structure *s) throw (jwscxx::base::Arg_error)
 Replaces this Apical_structure with another.

Protected Member Functions

void update_from_parent_end_pt () throw (jwscxx::base::Arg_error)
 Updates the Apical_structure to reflect the parent's Structure::end_pt.
virtual void update_log_prob ()
 Updates Structure::log_prob.
void check_centroid () const throw (jwscxx::base::Arg_error)
 Checks the centroid of this Apical_structure against its density range.

Protected Attributes

class Apical_structure_densitydensity
 Parameters for density functions over an Apical_structure.

Friends

class Structure
class Lateral_structure

Detailed Description

An Alternaria structure element either postioned apically along another Apical_structure element or as a root element.

Abstract class providing some basic functionality for all Alternaria lateral structure elements.

Definition at line 974 of file structure.h.


Constructor & Destructor Documentation

Apical_structure::Apical_structure ( float  centroid_x,
float  centroid_y,
float  centroid_z,
float  length,
float  width,
float  base_theta,
float  base_psi,
float  theta,
float  psi,
float  opacity,
size_t  level,
const class Apical_structure_density density 
) throw (jwscxx::base::Arg_error)

Creates a parent-less Apical_structure positioned w.r.t. a centroid.

Parameters:
centroid_xX-coord of the Structure::centroid.
centroid_yY-coord of the Structure::centroid.
centroid_zZ-coord of the Structure::centroid.
lengthLength from the Structure::begin_pt to Structure::end_pt.
widthWidth of the Structure.
base_thetaEuler angle: base rotation about the x-axis.
base_psiEuler angle: base rotation about the z-axis.
thetaEuler angle: rotation about the x-axis.
psiEuler angle: rotation about the z-axis.
opacityOpacity of the Spore.
levelLevel of the Spore.
densityStructure_density parameters for probabilities.
Exceptions:
jwscxx::base::Arg_errorApical_structure values are not in the density parameter ranges.

Definition at line 2082 of file structure.cpp.

Apical_structure::Apical_structure ( Structure parent,
float  length,
float  width,
float  base_theta,
float  base_psi,
float  theta,
float  psi,
float  opacity,
const class Apical_structure_density density 
) throw (jwscxx::base::Arg_error, Apical_error)

Creates an Apical_structure and attaches it to a parent.

Parameters:
parentParent Structure to add this Apical_structure to.
lengthLength from the Structure::begin_pt to Structure::end_pt.
widthWidth of the Structure.
base_thetaEuler angle: rotation about the x-axis.
base_psiEuler angle: rotation about the z-axis.
thetaEuler angle: rotation about the x-axis.
psiEuler angle: rotation about the z-axis.
opacityOpacity of the Spore.
densityStructure_density parameters for probabilities.
Exceptions:
jwscxx::base::Arg_errorApical_structure values are not in the density parameter range.
Apical_errorThe parent already has an apical growth.

Definition at line 2132 of file structure.cpp.

Apical_structure::Apical_structure ( Structure parent,
float  centroid_x,
float  centroid_y,
float  centroid_z,
float  length,
float  width,
float  base_theta,
float  base_psi,
float  opacity,
const class Apical_structure_density density 
) throw (jwscxx::base::Arg_error, Apical_error)

Creates an Apical_structure and attaches it to a parent.

Parameters:
parentParent Structure to add this Apical_structure to.
centroid_xX-coord of the Structure::centroid.
centroid_yY-coord of the Structure::centroid.
centroid_zZ-coord of the Structure::centroid.
lengthLength from the Structure::begin_pt to Structure::end_pt.
widthWidth of the Structure.
base_thetaEuler angle: rotation about the x-axis.
base_psiEuler angle: rotation about the z-axis.
opacityOpacity of the Spore.
densityStructure_density parameters for probabilities.
Exceptions:
jwscxx::base::Arg_errorApical_structure values are not in the density parameter range.
Apical_errorThe parent already has an apical growth.

Definition at line 2183 of file structure.cpp.

Apical_structure::Apical_structure ( const Apical_structure s)

Constructs an Apical_structure by copying another.

Parameters:
sApical_structure to construct a new one from.

Definition at line 2227 of file structure.cpp.

virtual Apical_structure::~Apical_structure ( ) [inline, virtual]

Deletes this Apical_structure.

Definition at line 1053 of file structure.h.


Member Function Documentation

virtual Apical_structure* Apical_structure::clone ( ) const [pure virtual]

Clones this Apical_structure.

Implements Structure.

Implemented in Apical_hypha, and Spore.

Apical_structure * Apical_structure::recursively_clone ( ) const [virtual]

Recursively clones this Apical_structure and all its descendents.

Returns:
A pointer to a cloned Apical_structure and all its descendants.

Implements Structure.

Definition at line 2234 of file structure.cpp.

Apical_structure & Apical_structure::operator= ( const Apical_structure s) [virtual]

Copies an Apical_structure into this Apical_structure.

Parameters:
sApical_structure to copy.
Returns:
A reference to this Apical_structure with s copied into it.

Definition at line 2263 of file structure.cpp.

void Apical_structure::set_position ( float  centroid_x,
float  centroid_y,
float  centroid_z 
) throw (jwscxx::base::Arg_error)

Sets the centroid position.

Parameters:
centroid_xNew x-posn of the centroid.
centroid_yNew y-posn of the centroid.
centroid_zNew z-posn of the centroid.
Exceptions:
jwscxx::base::Arg_errorThe change would result in a Structure parameter that is not consistent with the parameter density functions.

Definition at line 2283 of file structure.cpp.

Apical_structure * Apical_structure::split_into_apical ( const Apical_structure rvals_1,
const Apical_structure rvals_2 
) throw (jwscxx::base::Arg_error) [virtual]

Stochastically splits this Structure into this and another Structure.

Parameters:
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Returns:
The Structure that was split into this Structure::apical.
Exceptions:
jwscxx::base::Arg_errorThe change would result in a Structure parameter that is not consistent with the parameter density functions.

Definition at line 2388 of file structure.cpp.

Apical_structure * Apical_structure::merge_with_apical ( const Apical_structure rvals) throw (jwscxx::base::Arg_error) [virtual]

Stochastically merges this Structure with its Structure::apical.

Parameters:
rvalsRandom values to use for the stochastic merge.
Returns:
The Structure::apical that was merged with this Structure.
Note:
The apical and laterals from this Structure::apical are removed and merged into this Structure. So the returned Apical_structure is safe to delete.
Exceptions:
jwscxx::base::Arg_errorThe change would result in a Structure parameter that is not consistent with the parameter density functions or there is no apical to merge with.

Definition at line 2534 of file structure.cpp.

Lateral_structure * Apical_structure::split_into_lateral ( const Apical_structure rvals_1,
const Lateral_structure rvals_2 
) throw (jwscxx::base::Arg_error) [virtual]

Stochastically splits this Structure into this and another Lateral_structure.

Parameters:
rvals_1Random values to use for the stochastic split.
rvals_2Random values to use for the stochastic split.
Returns:
The Structure that was split into this Structure::apical.
Exceptions:
jwscxx::base::Arg_errorThe change would result in a Structure parameter that is not consistent with the parameter density functions.

Definition at line 2680 of file structure.cpp.

Lateral_structure * Apical_structure::merge_with_lateral ( Lateral_structure lateral,
const Apical_structure rvals 
) throw (jwscxx::base::Arg_error) [virtual]

Stochastically merges this Structure with one of its Structure::laterals.

Parameters:
rvalsRandom values to use for the stochastic merge.
Returns:
The Structure::apical that was merged with this Structure.
Note:
The apical and laterals from this Structure::apical are removed and merged into this Structure. So the returned Apical_structure is safe to delete.
Exceptions:
jwscxx::base::Arg_errorThe change would result in a Structure parameter that is not consistent with the parameter density functions or there is no apical to merge with.

Definition at line 2824 of file structure.cpp.

void Apical_structure::replace ( Apical_structure s) throw (jwscxx::base::Arg_error) [virtual]

Replaces this Apical_structure with another.

Parameters:
sApical_structure to use for replacement.
Note:
This Apical_structure is safe to delete upon return.

Definition at line 2985 of file structure.cpp.

void Apical_structure::update_from_parent_end_pt ( ) throw (jwscxx::base::Arg_error) [protected]

Updates the Apical_structure to reflect the parent's Structure::end_pt.

Definition at line 3045 of file structure.cpp.

void Apical_structure::update_log_prob ( ) [protected, virtual]

Updates Structure::log_prob.

Updated from the Structure and its apical and laterals.

Reimplemented from Structure.

Reimplemented in Apical_hypha, and Spore.

Definition at line 3066 of file structure.cpp.

void Apical_structure::check_centroid ( ) const throw (jwscxx::base::Arg_error) [protected, virtual]

Checks the centroid of this Apical_structure against its density range.

Exceptions:
jwscxx::base::Arg_errorApical_structure centroid is not in its density range.

Implements Structure.

Definition at line 3097 of file structure.cpp.


Friends And Related Function Documentation

friend class Structure [friend]

Definition at line 1137 of file structure.h.

friend class Lateral_structure [friend]

Reimplemented from Structure.

Definition at line 1138 of file structure.h.


Member Data Documentation

Parameters for density functions over an Apical_structure.

Reimplemented from Structure.

Reimplemented in Apical_hypha, and Spore.

Definition at line 1134 of file structure.h.


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