本文整理汇总了C++中MemberRules::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ MemberRules::push_back方法的具体用法?C++ MemberRules::push_back怎么用?C++ MemberRules::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberRules
的用法示例。
在下文中一共展示了MemberRules::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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_serialBDP::getParameterRules(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( "lambda" , RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "mu" , RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, new RealPos(0.0) ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "psi" , RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, new RealPos(0.0) ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "rho" , Probability::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, new Probability(1.0) ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "timeSinceLastSample", RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY, new RealPos(0.0) ) );
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( "names" , ModelVector<RlString>::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
distcBirthDeathMemberRules.push_back( new ArgumentRule( "constraints", ModelVector<Clade>::getClassTypeSpec(), ArgumentRule::BY_VALUE, ArgumentRule::ANY, new ModelVector<Clade>() ) );
// add the rules from the base class
const MemberRules &parentRules = TypedDistribution<TimeTree>::getParameterRules();
distcBirthDeathMemberRules.insert(distcBirthDeathMemberRules.end(), parentRules.begin(), parentRules.end());
rulesSet = true;
}
return distcBirthDeathMemberRules;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: ArgumentRule
/**
* Get the member rules used to create the constructor of this object.
*
* The member rules of the uniform topology distribution are:
* (1) the number of taxa.
* (2) the names of the taxa.
*
* \return The member rules.
*/
const MemberRules& Dist_uniformTopology::getMemberRules(void) const
{
static MemberRules distUniformTopologyMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distUniformTopologyMemberRules.push_back( new ArgumentRule( "nTaxa" , true, Natural::getClassTypeSpec() ) );
distUniformTopologyMemberRules.push_back( new ArgumentRule( "names" , true, ModelVector<RlString>::getClassTypeSpec() ) );
rulesSet = true;
}
return distUniformTopologyMemberRules;
}
示例11: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Model::getParameterRules(void) const
{
static MemberRules modelMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
modelMemberRules.push_back( new ArgumentRule("x", RevObject::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
modelMemberRules.push_back( new Ellipsis( RevObject::getClassTypeSpec() ) );
rulesSet = true;
}
return modelMemberRules;
}
示例12: 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_cppNormal::getParameterRules(void) const
{
static MemberRules distPoisMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
distPoisMemberRules.push_back( new ArgumentRule( "lambda", RealPos::getClassTypeSpec(), "The rate of the Poisson distribution.", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
distPoisMemberRules.push_back( new ArgumentRule( "mu", Real::getClassTypeSpec(), "The mean of the normal distribution", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
distPoisMemberRules.push_back( new ArgumentRule( "sigma", RealPos::getClassTypeSpec(), "The standard deviation of the normal distribution", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
rulesSet = true;
}
return distPoisMemberRules;
}
示例13: ArgumentRule
/** Return member rules (no members) */
const MemberRules& Dist_ornsteinUhlenbeck::getMemberRules(void) const {
static MemberRules dist;
static bool rulesSet = false;
if ( !rulesSet )
{
dist.push_back( new ArgumentRule( "tree" , TimeTree::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
dist.push_back( new ArgumentRule( "sigma", RealPos::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE ) );
dist.push_back( new ArgumentRule( "mean" , Real::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE ) );
dist.push_back( new ArgumentRule( "phi" , RealPos::getClassTypeSpec() , ArgumentRule::BY_CONSTANT_REFERENCE ) );
rulesSet = true;
}
return dist;
}
示例14: ArgumentRule
/** Return member rules (no members) */
const MemberRules& SteppingStoneSampler::getMemberRules(void) const {
static MemberRules samplerMemberRules;
static bool rulesSet = false;
if ( !rulesSet )
{
samplerMemberRules.push_back( new ArgumentRule("filename", true, RlString::getClassTypeSpec() ) );
samplerMemberRules.push_back( new ArgumentRule("powerColumnName", true, RlString::getClassTypeSpec() ) );
samplerMemberRules.push_back( new ArgumentRule("likelihoodColumnName", true, RlString::getClassTypeSpec() ) );
samplerMemberRules.push_back( new ArgumentRule("delimiter", true, RlString::getClassTypeSpec(), new RlString( "\t" ) ) );
rulesSet = true;
}
return samplerMemberRules;
}
示例15: 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;
}