本文整理汇总了C++中MemberRules类的典型用法代码示例。如果您正苦于以下问题:C++ MemberRules类的具体用法?C++ MemberRules怎么用?C++ MemberRules使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MemberRules类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ArgumentRule
/** Return member rules (no members) */
const MemberRules& ParallelMcmcmc::getMemberRules(void) const {
static MemberRules memberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
memberRules.push_back( new ArgumentRule("model", true, Model::getClassTypeSpec() ) );
memberRules.push_back( new ArgumentRule("monitors", true, WorkspaceVector<Monitor>::getClassTypeSpec() ) );
memberRules.push_back( new ArgumentRule("moves", true, WorkspaceVector<Move>::getClassTypeSpec() ) );
memberRules.push_back( new ArgumentRule("numChains", true, Natural::getClassTypeSpec(), new Natural(4) ) );
memberRules.push_back( new ArgumentRule("numProcessors", true, Natural::getClassTypeSpec(), new Natural(4) ) );
memberRules.push_back( new ArgumentRule("swapInterval", true, Natural::getClassTypeSpec(), new Natural(100)) );
memberRules.push_back( new ArgumentRule("deltaHeat", true, Real::getClassTypeSpec(), new Real(0.2) ) );
memberRules.push_back( new ArgumentRule("sigmaHeat", true, Real::getClassTypeSpec(), new Real(1.0) ) );
memberRules.push_back( new ArgumentRule("startHeat", true, Real::getClassTypeSpec(), new Real(1.0)) );
std::vector<RlString> options;
options.push_back( RlString("sequential") );
options.push_back( RlString("random") );
options.push_back( RlString("single") );
memberRules.push_back( new OptionRule( "moveschedule", new RlString( "random" ), options ) );
rulesSet = true;
}
return memberRules;
}
示例2: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the diversity-dependent pure-birth process are:
* (1) the initial speciation rate lambda which must be a positive real.
* (2) the carrying capacity that must be a natural number.
* (3) all member rules specified by BirthDeathProcess.
*
* \return The member rules.
*/
const MemberRules& Dist_divDepYuleProcess::getMemberRules(void) const
{
static MemberRules distcBirthDeathMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distcBirthDeathMemberRules.push_back( new ArgumentRule( "lambda" , true, RealPos::getClassTypeSpec() ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "capacity", true, Natural::getClassTypeSpec() ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "origin", true, RealPos::getClassTypeSpec() ) );
std::vector<RlString> optionsCondition;
optionsCondition.push_back( RlString("time") );
optionsCondition.push_back( RlString("survival") );
optionsCondition.push_back( RlString("nTaxa") );
distcBirthDeathMemberRules.push_back( new OptionRule( "condition", new RlString("survival"), optionsCondition ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "nTaxa" , true, Natural::getClassTypeSpec() ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "names" , true, ModelVector<RlString>::getClassTypeSpec() ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "constraints" , true, ModelVector<Clade>::getClassTypeSpec(), new ModelVector<Clade>() ) );
// add the rules from the base class
const MemberRules &parentRules = TypedDistribution<TimeTree>::getMemberRules();
distcBirthDeathMemberRules.insert(distcBirthDeathMemberRules.end(), parentRules.begin(), parentRules.end());
rulesSet = true;
}
return distcBirthDeathMemberRules;
}
示例3: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_offsetExponential::getMemberRules(void) const {
static MemberRules distExpMemberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
distExpMemberRules.push_back( new ArgumentRule( "lambda", true, RealPos::getClassTypeSpec() , new RealPos(1.0) ) );
distExpMemberRules.push_back( new ArgumentRule( "offset", true, Real::getClassTypeSpec() ) );
rulesSet = true;
}
return distExpMemberRules;
}
示例4: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the scale move are:
* (1) the variable which must be a positive real.
* (2) the tuning parameter lambda that defines the size of the proposal (positive real)
* (3) a flag whether auto-tuning should be used.
*
* \return The member rules.
*/
const MemberRules& Move_NodeCharacterHistoryRejectionSample::getMemberRules(void) const
{
static MemberRules nodeChrsMoveMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
nodeChrsMoveMemberRules.push_back( new ArgumentRule( "ctmc", false, AbstractDiscreteCharacterData::getClassTypeSpec() ) );
nodeChrsMoveMemberRules.push_back( new ArgumentRule( "qmap", false, RateMap::getClassTypeSpec() ) );
nodeChrsMoveMemberRules.push_back( new ArgumentRule( "tree", false, TimeTree::getClassTypeSpec() ) );
nodeChrsMoveMemberRules.push_back( new ArgumentRule( "lambda", true, Probability::getClassTypeSpec() , new Probability(1.0) ) );
// nodeChrsMoveMemberRules.push_back( new ArgumentRule( "type", true, RlString::getClassTypeSpec(), new RlString("std") ) );
std::vector<RlString> options;
options.push_back( RlString("std") );
options.push_back( RlString("biogeo") );
nodeChrsMoveMemberRules.push_back( new OptionRule( "type", new RlString("std"), options ) );
/* Inherit weight from Move, put it after variable */
const MemberRules& inheritedRules = Move::getMemberRules();
nodeChrsMoveMemberRules.insert( nodeChrsMoveMemberRules.end(), inheritedRules.begin(), inheritedRules.end() );
rulesSet = true;
}
return nodeChrsMoveMemberRules;
}
示例5: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Clade::getParameterRules(void) const {
static MemberRules modelMemberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
modelMemberRules.push_back( new ArgumentRule("taxonName", RlString::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
modelMemberRules.push_back( new Ellipsis(RlString::getClassTypeSpec() ) );
rulesSet = true;
}
return modelMemberRules;
}
示例6: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_bernoulli::getParameterRules(void) const {
static MemberRules distBernMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distBernMemberRules.push_back( new ArgumentRule( "p", Probability::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
rulesSet = true;
}
return distBernMemberRules;
}
示例7: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_mvtnorm::getMemberRules(void) const {
static MemberRules distExpMemberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
distExpMemberRules.push_back( new ArgumentRule( "mean", true, ModelVector<Real>::getClassTypeSpec() ) );
distExpMemberRules.push_back( new ArgumentRule( "precision", true, RealSymmetricMatrix::getClassTypeSpec() ) );
rulesSet = true;
}
return distExpMemberRules;
}
示例8: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_exponentialOffset::getParameterRules(void) const {
static MemberRules distExpMemberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
distExpMemberRules.push_back( new ArgumentRule( "lambda", RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
distExpMemberRules.push_back( new ArgumentRule( "offset", Real::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
rulesSet = true;
}
return distExpMemberRules;
}
示例9: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the homogeneous birth-death process are:
* (1) time of the process since the origin.
* (2) time of the process since the rootAge.
* (3) the sampling probability.
* (4) the sampling strategy.
* (5) the condition.
* (6) the number of taxa.
* (7) the taxon names.
* (8) the clade constraints.
*
* \return The member rules.
*/
const MemberRules& BirthDeathProcess::getMemberRules(void) const
{
static MemberRules distcBirthDeathMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distcBirthDeathMemberRules.push_back( new ArgumentRule( "origin" , RealPos::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, NULL ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "rootAge", RealPos::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, NULL ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "rho" , Probability::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, new Probability(1.0) ) );
std::vector<std::string> optionsStrategy;
optionsStrategy.push_back( "uniform" );
optionsStrategy.push_back( "diversified" );
distcBirthDeathMemberRules.push_back( new OptionRule( "samplingStrategy", new RlString("uniform"), optionsStrategy ) );
std::vector<std::string> optionsCondition;
optionsCondition.push_back( "time" );
optionsCondition.push_back( "survival" );
optionsCondition.push_back( "nTaxa" );
distcBirthDeathMemberRules.push_back( new OptionRule( "condition", new RlString("survival"), optionsCondition ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "nTaxa" , Natural::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "names" , ModelVector<RlString>::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "constraints", ModelVector<Clade>::getClassTypeSpec(), ArgumentRule::BY_VALUE, ArgumentRule::ANY, new ModelVector<Clade>() ) );
rulesSet = true;
}
return distcBirthDeathMemberRules;
}
示例10: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Taxon::getMemberRules(void) const {
static MemberRules modelMemberRules;
static bool rulesSet = false;
if ( !rulesSet ) {
modelMemberRules.push_back( new ArgumentRule("taxonName", true, RlString::getClassTypeSpec() ) );
modelMemberRules.push_back( new ArgumentRule("speciesName", true, RlString::getClassTypeSpec() ) );
// modelMemberRules.push_back( new ArgumentRule("date", true, RlDate::getClassTypeSpec() ) );
rulesSet = true;
}
return modelMemberRules;
}
示例11: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the Poisson distribution are:
* (1) the rate lambda which must be a positive real between 0 and 1 (= a probability).
*
* \return The member rules.
*/
const MemberRules& Dist_poisson::getParameterRules(void) const
{
static MemberRules distPoisMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distPoisMemberRules.push_back( new ArgumentRule( "lambda", RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
rulesSet = true;
}
return distPoisMemberRules;
}
示例12: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_dirichlet::getParameterRules(void) const
{
static MemberRules memberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
memberRules.push_back( new ArgumentRule( "alpha", ModelVector<RealPos>::getClassTypeSpec(), "The concentration parameter.", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
rulesSet = true;
}
return memberRules;
}
示例13: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the geometric distribution are:
* (1) the rate lambda which must be a positive real between 0 and 1 (= a probability).
*
* \return The member rules.
*/
const MemberRules& Dist_geom::getMemberRules(void) const
{
static MemberRules distGeomMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distGeomMemberRules.push_back( new ArgumentRule( "p", true, Probability::getClassTypeSpec() ) );
rulesSet = true;
}
return distGeomMemberRules;
}
示例14: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the Multispecies Coalescent process are:
* (1) Species tree rooted triplet distribution.
* (2) Whether we use species names or taxons.
*
* \return The member rules.
*/
const MemberRules& Dist_MPEST::getMemberRules(void) const
{
static MemberRules MPESTMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
MPESTMemberRules.push_back( new ArgumentRule( "speciesTree", RootedTripletDistribution::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
//MPESTMemberRules.push_back( new ArgumentRule( "geneTrees", RootedTripletDistribution::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
MPESTMemberRules.push_back( new ArgumentRule( "useSpecies", RlBoolean::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
rulesSet = true;
}
return MPESTMemberRules;
}
示例15: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_offsetLnorm::getMemberRules(void) const {
static MemberRules distLnormMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distLnormMemberRules.push_back( new ArgumentRule( "mean", true, Real::getClassTypeSpec(), new Real(0.0) ) );
distLnormMemberRules.push_back( new ArgumentRule( "sd" , true, RealPos::getClassTypeSpec(), new RealPos(1.0) ) );
distLnormMemberRules.push_back( new ArgumentRule( "offset", true, Real::getClassTypeSpec() ) );
rulesSet = true;
}
return distLnormMemberRules;
}