本文整理汇总了C++中ArgumentRules::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ ArgumentRules::push_back方法的具体用法?C++ ArgumentRules::push_back怎么用?C++ ArgumentRules::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArgumentRules
的用法示例。
在下文中一共展示了ArgumentRules::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ArgumentRules
/* Get argument rules */
const ArgumentRules& Func_Mcmc::getArgumentRules( void ) const
{
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet )
{
argumentRules.push_back( new ArgumentRule("model" , Model::getClassTypeSpec() , ArgumentRule::BY_VALUE ) );
argumentRules.push_back( new ArgumentRule("monitors", WorkspaceVector<Monitor>::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
argumentRules.push_back( new ArgumentRule("moves" , WorkspaceVector<Move>::getClassTypeSpec() , ArgumentRule::BY_VALUE ) );
std::vector<std::string> options;
options.push_back( "sequential" );
options.push_back( "random" );
options.push_back( "single" );
argumentRules.push_back( new OptionRule( "moveschedule", new RlString( "random" ), options ) );
argumentRules.push_back( new ArgumentRule("nruns" , Natural::getClassTypeSpec() , ArgumentRule::BY_VALUE, ArgumentRule::ANY, new Natural(1) ) );
rulesSet = true;
}
return argumentRules;
}
示例2: ArgumentRules
/** Get argument rules */
const ArgumentRules& Func_convertToPhylowood::getArgumentRules( void ) const
{
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if (!rulesSet)
{
argumentRules.push_back( new ArgumentRule( "statefile", RlString::getClassTypeSpec() , "", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
argumentRules.push_back( new ArgumentRule( "treefile", RlString::getClassTypeSpec() , "", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
argumentRules.push_back( new ArgumentRule( "geofile", RlString::getClassTypeSpec() , "", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
argumentRules.push_back( new ArgumentRule( "outfile", RlString::getClassTypeSpec() , "", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
argumentRules.push_back( new ArgumentRule( "burnin", Probability::getClassTypeSpec() , "", ArgumentRule::BY_VALUE, ArgumentRule::ANY, new Integer(-1) ) );
std::vector<std::string> options;
options.push_back( "NaturalNumbers" );
options.push_back( "Standard" );
argumentRules.push_back( new OptionRule( "chartype", new RlString("NaturalNumbers"), options, "" ) );
std::vector<std::string> options2;
options2.push_back( "Range" );
options2.push_back( "Area" );
argumentRules.push_back( new OptionRule( "bgtype", new RlString("Area"), options2, "" ) );
rulesSet = true;
}
return argumentRules;
}
示例3: MethodTable
/* Get method specifications */
const RevLanguage::MethodTable& RealNodeValTree::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false )
{
ArgumentRules* meanArgRules = new ArgumentRules();
methods.addFunction("mean", new MemberFunction<RealNodeValTree,Real>( this, meanArgRules ) );
ArgumentRules* tipmeanArgRules = new ArgumentRules();
methods.addFunction("tipMean", new MemberFunction<RealNodeValTree,Real>( this, tipmeanArgRules ) );
ArgumentRules* stdevArgRules = new ArgumentRules();
methods.addFunction("stdev", new MemberFunction<RealNodeValTree,RealPos>( this, stdevArgRules ) );
ArgumentRules* rootArgRules = new ArgumentRules();
methods.addFunction("rootVal", new MemberProcedure(Real::getClassTypeSpec(), rootArgRules ) );
ArgumentRules* clampArgRules = new ArgumentRules();
clampArgRules->push_back(new ArgumentRule("data", false, AbstractCharacterData::getClassTypeSpec()));
clampArgRules->push_back(new ArgumentRule("dataIndex", false, Natural::getClassTypeSpec()));
methods.addFunction("clampAt", new MemberProcedure(RealNodeValTree::getClassTypeSpec(), clampArgRules ) );
// necessary call for proper inheritance
methods.setParentTable( &ModelObject<RevBayesCore::RealNodeContainer>::getMethods() );
methodsSet = true;
}
return methods;
}
示例4: MethodTable
/* Get method specifications */
const MethodTable& ParallelMcmcmc::getMethods(void) const {
static MethodTable methods = MethodTable();
static bool methodsSet = false;
if ( methodsSet == false ) {
ArgumentRules* runArgRules = new ArgumentRules();
runArgRules->push_back( new ArgumentRule("generations", true, Natural::getClassTypeSpec()) );
methods.addFunction("run", new MemberProcedure( RlUtils::Void, runArgRules) );
ArgumentRules* burninArgRules = new ArgumentRules();
burninArgRules->push_back( new ArgumentRule("generations", true, Natural::getClassTypeSpec()) );
burninArgRules->push_back( new ArgumentRule("tuningInterval", true, Natural::getClassTypeSpec()) );
methods.addFunction("burnin", new MemberProcedure( RlUtils::Void, burninArgRules) );
ArgumentRules* operatorSummaryArgRules = new ArgumentRules();
methods.addFunction("operatorSummary", new MemberProcedure( RlUtils::Void, operatorSummaryArgRules) );
// necessary call for proper inheritance
methods.setParentTable( &RevObject::getMethods() );
methodsSet = true;
}
return methods;
}
示例5: ArgumentRules
Model::Model() : WorkspaceToCoreWrapperObject<RevBayesCore::Model>()
{
ArgumentRules* dotArgRules = new ArgumentRules();
dotArgRules->push_back( new ArgumentRule("file", RlString::getClassTypeSpec() , ArgumentRule::BY_VALUE ) );
dotArgRules->push_back( new ArgumentRule("verbose", RlBoolean::getClassTypeSpec(), ArgumentRule::BY_VALUE, ArgumentRule::ANY, new RlBoolean(false) ) );
dotArgRules->push_back( new ArgumentRule("bg", RlString::getClassTypeSpec(), ArgumentRule::BY_VALUE, ArgumentRule::ANY, new RlString("lavenderblush2") ) );
methods.addFunction("graph", new MemberProcedure( RlUtils::Void, dotArgRules) );
}
示例6: ArgumentRules
TraceTree::TraceTree(const RevBayesCore::TraceTree &m) : WorkspaceToCoreWrapperObject<RevBayesCore::TraceTree>( new RevBayesCore::TraceTree( m ) )
{
ArgumentRules* summarizeArgRules = new ArgumentRules();
summarizeArgRules->push_back( new ArgumentRule("burninFraction", Probability::getClassTypeSpec(), "The fraction of samples to disregard as burnin.", ArgumentRule::BY_VALUE, ArgumentRule::ANY, new Probability(0.1)) );
summarizeArgRules->push_back( new ArgumentRule("credibleTreeSetSize", Probability::getClassTypeSpec(), "The size of the credible set to print.", ArgumentRule::BY_VALUE, ArgumentRule::ANY, new Probability(0.95)) );
summarizeArgRules->push_back( new ArgumentRule("minCladeProbability", Probability::getClassTypeSpec(), "The minimum clade probability used when printing.", ArgumentRule::BY_VALUE, ArgumentRule::ANY, new Probability(0.05)) );
this->methods.addFunction( new MemberProcedure( "summarize", RlUtils::Void, summarizeArgRules) );
}
示例7: ArgumentRules
/** Get argument rules */
const ArgumentRules& Func_readCharacterDataUniversal::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if (!rulesSet)
{
argumentRules.push_back( new ArgumentRule( "file", RlString::getClassTypeSpec(), ArgumentRule::BY_VALUE ) );
argumentRules.push_back( new ArgumentRule( "alwaysReturnAsVector", RlBoolean::getClassTypeSpec(), ArgumentRule::BY_VALUE, ArgumentRule::ANY, new RlBoolean(false) ) );
rulesSet = true;
}
return argumentRules;
}
示例8: ArgumentRules
PowerPosteriorAnalysis::PowerPosteriorAnalysis() : WorkspaceToCoreWrapperObject<RevBayesCore::PowerPosteriorAnalysis>()
{
ArgumentRules* runArgRules = new ArgumentRules();
runArgRules->push_back( new ArgumentRule("generations", Natural::getClassTypeSpec(), "The number of generations to run.", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
methods.addFunction( new MemberProcedure( "run", RlUtils::Void, runArgRules) );
ArgumentRules* burninArgRules = new ArgumentRules();
burninArgRules->push_back( new ArgumentRule("generations" , Natural::getClassTypeSpec(), "The number of generations to run.", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
burninArgRules->push_back( new ArgumentRule("tuningInterval", Natural::getClassTypeSpec(), "The frequency when the moves are tuned (usually between 50 and 1000).", ArgumentRule::BY_VALUE, ArgumentRule::ANY ) );
methods.addFunction( new MemberProcedure( "burnin", RlUtils::Void, burninArgRules) );
}
示例9: ArgumentRules
/* Get argument rules */
const ArgumentRules& Func_varianceCovarianceMatrix::getArgumentRules( void ) const
{
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet )
{
argumentRules.push_back( new ArgumentRule( "standardDeviations" , ModelVector<RealPos>::getClassTypeSpec(), "The vector of standard deviations.", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
argumentRules.push_back( new ArgumentRule( "correlationCoefficients", ModelVector<Real>::getClassTypeSpec(), "The correlation coefficients.", ArgumentRule::BY_CONSTANT_REFERENCE, ArgumentRule::ANY ) );
rulesSet = true;
}
return argumentRules;
}
示例10: ArgumentRules
/** Get argument rules */
const ArgumentRules& Func_simplex::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet ) {
argumentRules.push_back( new ArgumentRule( "", true, RealPos::getClassTypeSpec() ) );
argumentRules.push_back( new Ellipsis ( RealPos::getClassTypeSpec() ) );
rulesSet = true;
}
return argumentRules;
}
示例11: ArgumentRules
/** Get argument rules */
const ArgumentRules& Func_source::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet ) {
argumentRules.push_back( new ArgumentRule( "file", true, RlString::getClassTypeSpec() ) );
argumentRules.push_back( new ArgumentRule( "echo.on", true, RlBoolean::getClassTypeSpec(), new RlBoolean(false) ) );
rulesSet = true;
}
return argumentRules;
}
示例12: ArgumentRules
/* Get argument rules */
const ArgumentRules& Func_dppMeanFromConc::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet ) {
argumentRules.push_back( new ArgumentRule( "concentration", true, RealPos::getClassTypeSpec() ) );
argumentRules.push_back( new ArgumentRule( "num_elements", true, RealPos::getClassTypeSpec() ) );
rulesSet = true;
}
return argumentRules;
}
示例13: ArgumentRules
/** Get argument rules */
const ArgumentRules& Func_simplex::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet )
{
argumentRules.push_back( new ArgumentRule( "x1", RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
argumentRules.push_back( new ArgumentRule( "x2", RealPos::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
argumentRules.push_back( new Ellipsis ( RealPos::getClassTypeSpec() ) );
rulesSet = true;
}
return argumentRules;
}
示例14: ArgumentRules
/* Get argument rules */
const ArgumentRules& Func_epoch::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet )
{
argumentRules.push_back( new ArgumentRule( "Q" , ModelVector<RateGenerator>::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
argumentRules.push_back( new ArgumentRule( "times" , ModelVector<RealPos>::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
argumentRules.push_back( new ArgumentRule( "rates" , ModelVector<RealPos>::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
rulesSet = true;
}
return argumentRules;
}
示例15: ArgumentRules
/* Get argument rules */
const ArgumentRules& Func_mrcaIndex::getArgumentRules( void ) const {
static ArgumentRules argumentRules = ArgumentRules();
static bool rulesSet = false;
if ( !rulesSet ) {
argumentRules.push_back( new ArgumentRule( "tree" , TimeTree::getClassTypeSpec(), ArgumentRule::BY_CONSTANT_REFERENCE ) );
argumentRules.push_back( new ArgumentRule( "clade", Clade::getClassTypeSpec() , ArgumentRule::BY_VALUE ) );
rulesSet = true;
}
return argumentRules;
}