bpp-core3
3.0.0
|
Discrete Distribution I/O in BppO format. More...
#include <Bpp/Io/BppODiscreteDistributionFormat.h>
Public Member Functions | |
BppODiscreteDistributionFormat (bool verbose=true) | |
virtual | ~BppODiscreteDistributionFormat () |
const std::string | getFormatName () const |
Get the name of the file format. More... | |
const std::string | getFormatDescription () const |
Get a description of the file format. More... | |
std::unique_ptr< DiscreteDistributionInterface > | readDiscreteDistribution (const std::string &distDescription, bool parseArguments=true) |
Read a discrete distribution from a string. More... | |
const std::map< std::string, std::string > & | getUnparsedArguments () const |
void | writeDiscreteDistribution (const DiscreteDistributionInterface &dist, OutputStream &out, std::map< std::string, std::string > &globalAliases, std::vector< std::string > &writtenNames) const |
Write a discrete distribution to a stream. More... | |
virtual const std::string | getDataType () const |
Get the type of data this format deals with. More... | |
Protected Member Functions | |
void | initialize_ (DiscreteDistributionInterface &rDist) |
Set parameter initial values of a given distribution according to options. More... | |
Protected Attributes | |
bool | verbose_ |
std::map< std::string, std::string > | unparsedArguments_ |
Discrete Distribution I/O in BppO format.
Creates a new discrete distribution object according to distribution description syntax (see the Bio++ Progam Suite manual for a detailed description of this syntax).
Definition at line 21 of file BppODiscreteDistributionFormat.h.
|
inline |
Definition at line 30 of file BppODiscreteDistributionFormat.h.
|
inlinevirtual |
Definition at line 31 of file BppODiscreteDistributionFormat.h.
|
inlinevirtualinherited |
Get the type of data this format deals with.
Implements bpp::IOFormat.
Definition at line 27 of file IoDiscreteDistribution.h.
|
inlinevirtual |
Get a description of the file format.
Implements bpp::IOFormat.
Definition at line 36 of file BppODiscreteDistributionFormat.h.
References readDiscreteDistribution().
|
inlinevirtual |
Get the name of the file format.
Implements bpp::IOFormat.
Definition at line 34 of file BppODiscreteDistributionFormat.h.
|
inlinevirtual |
Implements bpp::IDiscreteDistribution.
Definition at line 40 of file BppODiscreteDistributionFormat.h.
References initialize_(), unparsedArguments_, and writeDiscreteDistribution().
Referenced by readDiscreteDistribution().
|
protected |
Set parameter initial values of a given distribution according to options.
Parameters actually depends on the distribution passed as argument.
rDist | The distribution to set up. |
Exception | if an error occured. |
Definition at line 392 of file BppODiscreteDistributionFormat.cpp.
References bpp::ApplicationTools::displayResult(), bpp::DiscreteDistributionInterface::getCategory(), bpp::ApplicationTools::getDoubleParameter(), bpp::ParameterAliasable::getIndependentParameters(), bpp::DiscreteDistributionInterface::getNumberOfCategories(), bpp::DiscreteDistributionInterface::getProbability(), bpp::Parametrizable::matchParametersValues(), bpp::AutoParameter::setMessageHandler(), bpp::ParameterList::setParameter(), bpp::ParameterList::size(), bpp::TextTools::toString(), and bpp::ApplicationTools::warning.
Referenced by getUnparsedArguments().
|
virtual |
Read a discrete distribution from a string.
distrDescription | A string describing the distribution in the format. |
parseArguments | Attempt to parse function arguments. If not, only store them and use default values instead. |
Exception | if an error occured. |
Implements bpp::IDiscreteDistribution.
Definition at line 32 of file BppODiscreteDistributionFormat.cpp.
References bpp::ApplicationTools::displayResult(), bpp::DiscreteDistributionInterface::getNumberOfCategories(), bpp::ParameterList::getParameterNames(), bpp::Parametrizable::getParameterNameWithoutNamespace(), bpp::Parametrizable::getParameters(), bpp::Parametrizable::getParameterValue(), getUnparsedArguments(), bpp::StringTokenizer::hasMoreToken(), bpp::TextTools::isEmpty(), bpp::StringTokenizer::nextToken(), bpp::KeyvalTools::parseProcedure(), readDiscreteDistribution(), bpp::DiscreteDistributionInterface::setMedian(), bpp::TextTools::toDouble(), bpp::TextTools::toInt(), and bpp::TextTools::toString().
Referenced by getFormatDescription(), and readDiscreteDistribution().
|
virtual |
Write a discrete distribution to a stream.
dist | A discrete distribution object; |
out | The output stream; |
globalAliases | parameters linked to global alias. |
writtenNames | is the vector of the written parameters so far [in, out]; |
Exception | if an error occured. |
Implements bpp::ODiscreteDistribution.
Definition at line 259 of file BppODiscreteDistributionFormat.cpp.
References bpp::ParameterAliasable::getIndependentParameters(), bpp::DiscreteDistributionInterface::getName(), bpp::DiscreteDistributionInterface::getNumberOfCategories(), bpp::AbstractDiscreteDistribution::getNumberOfCategories(), bpp::MixtureOfDiscreteDistributions::getNumberOfDistributions(), bpp::Parametrizable::getNumberOfParameters(), bpp::ParameterList::getParameterNames(), bpp::TextTools::toString(), bpp::InvariantMixedDiscreteDistribution::variableSubDistribution(), and bpp::BppOParametrizableFormat::write().
Referenced by getUnparsedArguments().
|
protected |
Definition at line 27 of file BppODiscreteDistributionFormat.h.
Referenced by getUnparsedArguments().
|
protected |
Definition at line 26 of file BppODiscreteDistributionFormat.h.