当前位置: 首页>>代码示例>>C++>>正文


C++ System::getRegister方法代码示例

本文整理汇总了C++中beagle::System::getRegister方法的典型用法代码示例。如果您正苦于以下问题:C++ System::getRegister方法的具体用法?C++ System::getRegister怎么用?C++ System::getRegister使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在beagle::System的用法示例。


在下文中一共展示了System::getRegister方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: lDescription

/*!
 *  \brief Register the parameters of the GP expand operator for evolutionary module acquisition.
 *  \param ioSystem Evolutionary system.
 */
void GP::ModuleExpandOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	Beagle::Operator::registerParams(ioSystem);
	{
		Register::Description lDescription(
		    "Module primitive name for EMA",
		    "String",
		    "MODULE",
		    "Name of the GP primitive to use as module reference in the GP trees"
		);
		mModulePrimitName = castHandleT<String>(
		                        ioSystem.getRegister().insertEntry("gp.ema.modulename", new String("MODULE"), lDescription));
	}
	{
		std::ostringstream lOSS;
		lOSS << "Probability of an individual being expanded. Expansion randomly selects a ";
		lOSS << "module primitive and inserts it back into the tree.";
		Register::Description lDescription(
		    "Probability of an individual being expanded",
		    "Float",
		    "0.2",
		    lOSS.str()
		);
		mExpandProba = castHandleT<Float>(
		                   ioSystem.getRegister().insertEntry("gp.ema.expandpb", new Float(0.2f), lDescription));
	}
	Beagle_StackTraceEndM();
}
开发者ID:GhostGambler,项目名称:beagle,代码行数:33,代码来源:ModuleExpandOp.cpp

示例2: lDescription

void Beagle::GP::MutationEphemeralOpT<T>::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();

	{
		std::ostringstream lOSS;
		lOSS << "Ephemeral mutation probability for an individual. ";
		lOSS << "A ephemeral mutation change the value of a specific primitive.";
		Register::Description lDescription(
		    "Ephemeral mutation probability",
		    "Double",
		    "0.05",
		    lOSS.str()
		);
		mMutationProba = castHandleT<Double>(
		                     ioSystem.getRegister().insertEntry(mMutationPbName, new Double(0.05f), lDescription));
	}
	Beagle::MutationOp::registerParams(ioSystem);
	{
		std::ostringstream lOSS;
		lOSS << "Name of the ephemeral primitive for which the values are modified ";
		lOSS << "by the ephemeral mutation operator.";
		Register::Description lDescription(
		    "Ephemeral primitive name",
		    "String",
		    "E",
		    lOSS.str()
		);
		mEphemeralName = castHandleT<String>(
		                     ioSystem.getRegister().insertEntry(mEphemeralNameParamName, new String("E"), lDescription));
	}
	Beagle_StackTraceEndM("void Beagle::GP::MutationEphemeralOpT<T>::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:33,代码来源:MutationEphemeralOpT.hpp

示例3: lDescription

/*!
 *  \brief register the parameters of this logger.
 *  \param ioSystem Reference to the system to use for initialization.
 *
 *  This method registers the following parameter:
 *   - hpc.node.nbevolver
 */
void HPC::MPICommunication::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	{
		Register::Description lDescription(
		"Number of Evolver nodes.",
		"UInt",
		"1",
		"Determine the number of evolver nodes that will be used. This number must be between 1 and the number of demes."
		);
		mNbEvolvers = castHandleT<UInt>(
		ioSystem.getRegister().insertEntry("hpc.evolver.nb", new UInt(1), lDescription));
	}
#ifdef BEAGLE_HAVE_LIBZ
	{
		std::ostringstream lOSS;
		lOSS << "Determine the zlib compression level of every messages. 0 = no compression, 9 = max. compression.";
		Register::Description lDescription(
		  "Compression level of messages.",
		  "UInt",
		  "0",
		  lOSS.str()
		);
		mCompressionLevel = castHandleT<UInt>(
		ioSystem.getRegister().insertEntry("hpc.compression.level", new UInt(0), lDescription));
	}
#endif //BEAGLE_HAVE_LIBZ
	Beagle_HPC_StackTraceEndM("void HPC::MPICommunication::registerParams(System& ioSystem)");
}
开发者ID:GhostGambler,项目名称:beagle,代码行数:36,代码来源:MPICommunication.cpp

示例4: lDescription

/*!
 *  \brief Register the parameters of the GP crossover operator.
 *  \param ioSystem System of the evolution.
 */
void GP::CrossoverOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	{
		Register::Description lDescription(
		    "Individual crossover probability",
		    "Double",
		    "0.8",
		    "Individual crossover probability at each generation."
		);
		mMatingProba = castHandleT<Double>(
		                   ioSystem.getRegister().insertEntry(mMatingProbaName, new Double(0.8f), lDescription));
	}
	Beagle::CrossoverOp::registerParams(ioSystem);
	{
		std::ostringstream lOSS;
		lOSS << "Probability that a crossover point is a branch ";
		lOSS << "(node with sub-trees). Value of 1.0 means that all crossover points are ";
		lOSS << "branches, and value of 0.0 means that all crossover points are leaves.";
		Register::Description lDescription(
		    "Crossover distribution prob.",
		    "Float",
		    "0.9",
		    lOSS.str()
		);
		mDistributionProba = castHandleT<Float>(
		                         ioSystem.getRegister().insertEntry(mDistribPbName, new Float(0.9f), lDescription));
	}
	{
		Register::Description lDescription(
		    "Maximum tree depth",
		    "UInt",
		    "17",
		    "Maximum allowed depth for the trees."
		);
		mMaxTreeDepth = castHandleT<UInt>(
		                    ioSystem.getRegister().insertEntry("gp.tree.maxdepth", new UInt(17), lDescription));
	}
	{
		std::ostringstream lOSS;
		lOSS << "Maximum number of attempts to modify a GP tree in a genetic ";
		lOSS << "operation. As there is topological constraints on GP trees (i.e. tree ";
		lOSS << "depth limit), it is often necessary to try a genetic operation several times.";
		Register::Description lDescription(
		    "Max number of attempts",
		    "UInt",
		    "2",
		    lOSS.str()
		);
		mNumberAttempts = castHandleT<UInt>(
		                      ioSystem.getRegister().insertEntry("gp.try", new UInt(2), lDescription));
	}
	Beagle_StackTraceEndM("void GP::CrossoverOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:58,代码来源:CrossoverOp.cpp

示例5: initialize

void LogIndividualDataOp::initialize(Beagle::System& ioSystem) {
	LogIndividualOp::initialize(ioSystem);
	
	if(ioSystem.getRegister().isRegistered("log.individual.keepdata")) {
		mKeepData = castHandleT<Bool>(ioSystem.getRegister().getEntry("log.individual.keepdata"));
	} else {
		mKeepData = new Bool(1);
		std::string lLongDescrip("Keep data associated to the individual when logging. ");
		Register::Description lDescription(
										   "Keep individual data",
										   "Bool",
										   mNumberIndividualPerDem->serialize(),
										   lLongDescrip
										   );
		ioSystem.getRegister().addEntry("log.individual.keepdata", mKeepData, lDescription);
	}
}
开发者ID:ComputationalIntelligenceAndMechatronics,项目名称:HBGGP,代码行数:17,代码来源:LogIndividualDataOp.cpp

示例6: registerParams

/*!
 *
 */
void SharedLibEvalOp::registerParams(Beagle::System& ioSystem)
{
    Beagle_StackTraceBeginM();

    Beagle::GP::EvaluationOp::registerParams(ioSystem);

    if (!ioSystem.getRegister().isRegistered("icu.trainingset.size"))
    {
        // 'icu.trainingset.size', training set size.
        Register::Description lDescription(
            "Training set size",
            "Integer",
            "30000",
            "The number of rows in the training set."
        );
        ioSystem.getRegister().insertEntry("icu.trainingset.size", new Int(30000), lDescription);
    }
    mTrainingSetSize= castHandleT<Int>(ioSystem.getRegister()["icu.trainingset.size"])->getWrappedValue();
    
    Beagle_StackTraceEndM("void SharedLibEvalOp::registerParams(System&)");
}
开发者ID:emigdioz,项目名称:open-beagle-fast-gp,代码行数:24,代码来源:SharedLibEvalOp.cpp

示例7: lDescription

/*!
 *  \brief Register the parameters of the GP "full" intialization operator.
 *  \param ioSystem System of the evolution.
 */
void GP::InitFullConstrainedOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	InitFullOp::registerParams(ioSystem);
	std::ostringstream lOSS;
	lOSS << "Maximum number of attempts to modify a GP tree in a genetic ";
	lOSS << "operation. As there is topological constraints on GP trees (i.e. tree ";
	lOSS << "depth limit), it is often necessary to try a genetic operation several times.";
	Register::Description lDescription("Max number of attempts", "UInt", "2", lOSS.str());
	mNumberAttempts =
	    castHandleT<UInt>(ioSystem.getRegister().insertEntry("gp.try", new UInt(2), lDescription));
	Beagle_StackTraceEndM("void GP::InitFullConstrainedOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:17,代码来源:InitFullConstrainedOp.cpp

示例8: registerParams

/*!
 *  \brief Register the parameters of this operator.
 *  \param ioSystem Evolutionary system.
 */
void TSPEvalOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	Beagle::HPC::EvaluationOp::registerParams(ioSystem);
	Register::Description lDescription(
		"Initial integer vectors sizes",
		"UInt",
		"0",
		"Integer vector size of initialized individuals."
	);
	mIntVectorSize = castHandleT<UInt>(
	    ioSystem.getRegister().insertEntry("ga.init.vectorsize", new UInt(0), lDescription));
	Beagle_StackTraceEndM("void TSPEvalOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:18,代码来源:TSPEvalOp.cpp

示例9: registerParams

/*!
 *
 */
void SharedLibCompileOp::registerParams(Beagle::System& ioSystem)
{
    Beagle_StackTraceBeginM();

    Beagle::Operator::registerParams(ioSystem);

    // 'icu.compiler.tmp-directory', place all files generated during compiling in this directory.
    {
		std::ostringstream lOSS;
		lOSS << "Place all files generated during compilation in this directory, ";
		lOSS << "e.g. C source files (*.c) and shared libraries (*.so).";
		Register::Description lDescription(
		    "Directory for temporary files",
		    "String",
		    "./tmp",
		    lOSS.str()
		);
        ioSystem.getRegister().insertEntry("icu.compiler.tmp-directory", new String("./tmp"), lDescription);
    }

    // 'icu.compiler.lib-path', register an entry updated with the path of the shared library after each compilation.
    {
		std::ostringstream lOSS;
		lOSS << "Path to the shared library to use for fitness evaluation. ";
		lOSS << "After each compilation step, this paramter will contain the ";
		lOSS << "path to the shared library for the current generation and deme.";
		Register::Description lDescription(
		    "Path to shared library for current generation and deme",
		    "String",
		    "",
		    lOSS.str()
		);
        ioSystem.getRegister().insertEntry("icu.compiler.lib-path", new String(""), lDescription);
    }
        
    Beagle_StackTraceEndM("void SharedLibCompileOp::registerParams(System&)");
}
开发者ID:emigdioz,项目名称:open-beagle-fast-gp,代码行数:40,代码来源:SharedLibCompileOp.cpp

示例10: lDescription

/*!
 *  \brief Register the parameters of this operator.
 *  \param ioSystem System of the evolution.
 */
void GP::MutationSwapOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();

	{
		std::ostringstream lOSS;
		lOSS << "Swap mutation probability for an individual. ";
		lOSS << "Swap mutation consists in exchanging the primitive associated to a ";
		lOSS << "node by one having the same number of arguments.";
		Register::Description lDescription(
		    "Individual swap mutation prob.",
		    "Double",
		    "0.05",
		    lOSS.str()
		);
		mMutationProba = castHandleT<Double>(
		                     ioSystem.getRegister().insertEntry(mMutationPbName, new Double(0.05f), lDescription));
	}
	Beagle::MutationOp::registerParams(ioSystem);
	{
		std::ostringstream lOSS;
		lOSS << "Probability that a swap mutation point is a branch (node with sub-trees). ";
		lOSS << "Value of 1.0 means that all swap mutation points are branches, ";
		lOSS << "and value of 0.0 means that all swap mutation points are leaves. ";
		lOSS << "Swap mutation consists in exchanging the primitive associated to a ";
		lOSS << "node by one having the same number of arguments.";
		Register::Description lDescription(
		    "Swap mutation distrib. prob.",
		    "Float",
		    "0.5",
		    lOSS.str()
		);
		mDistributionProba = castHandleT<Float>(
		                         ioSystem.getRegister().insertEntry(mDistribPbName, new Float(0.5f), lDescription));
	}
	Beagle_StackTraceEndM("void GP::MutationSwapOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:41,代码来源:MutationSwapOp.cpp

示例11: lDescription

/*!
 *  \brief Register parameters of the linear GP mutation operator.
 *  \param ioSystem System of the evolution.
 */
void LinGP::MutationOp::registerParams(Beagle::System& ioSystem)
{
	{
		Register::Description lDescription(
		    "Individual linear GP mutation prob.",
		    "Float",
		    "1.0",
		    "Linear GP mutation probability for each individual."
		);
		mMutationProba = castHandleT<Double>(
		                     ioSystem.getRegister().insertEntry(mMutationPbName, new Double(1.0f), lDescription));
	}
	EC::MutationOp::registerParams(ioSystem);
	{
		Register::Description lDescription(
		    "Instruction mutation probability",
		    "Float",
		    "0.05",
		    "Probability for each instruction inverted by mutation, when an individual is mutated."
		);
		mInstructMutateProba = castHandleT<Float>(
		                           ioSystem.getRegister().insertEntry(mInstructMutatePbName, new Float(0.05f), lDescription));
	}
}
开发者ID:GhostGambler,项目名称:beagle,代码行数:28,代码来源:MutationOp.cpp

示例12: lDescription

/*!
 *  \brief Register the parameters of the GA partialy matched crossover operator.
 *  \param ioSystem System of the evolution.
 */
void Beagle::GA::CrossoverPMXOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	{
		Register::Description lDescription(
										   "Individual partialy matched crossover pb.",
										   "Double",
										   "0.3",
										   "GA partialy matched crossover probability of a single individual."
										   );
		mMatingProba = castHandleT<Double>(ioSystem.getRegister().insertEntry(mMatingProbaName, new Double(0.3f), lDescription));
	}
	CrossoverOp::registerParams(ioSystem);
	Beagle_StackTraceEndM("void GA::CrossoverPMXOp::registerParams(System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:19,代码来源:CrossoverPMXOp.cpp

示例13: registerParams

/*!
 *  \brief Register the parameters of this operator.
 *  \param ioSystem System to use to initialize the operator.
 */
void SelectWorstTournOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();

	Beagle::EC::SelectionOp::registerParams(ioSystem);
	Register::Description lDescription(
	    "Selection tournaments size",
	    "UInt",
	    "2",
	    "Number of participants for worst tournament selection."
	);
	mNumberParticipants =
	    castHandleT<UInt>(ioSystem.getRegister().insertEntry("ec.sel.worsttournsize", new UInt(2), lDescription));

	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:20,代码来源:SelectWorstTournOp.cpp

示例14: lDescription

/*!
 *  \brief Register the parameters of the constrained GP tree "grow" intialization operator.
 *  \param ioSystem System of the evolution.
 */
void GP::InitGrowOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	GP::InitializationOp::registerParams(ioSystem);
	{
		Register::Description lDescription(
		    "Flag for whether the 'grow' method works as defined by Koza",
		    "Bool",
		    "0",
		    "Set this flag if you wish to initialize individuals using the 'grow' method as defined by Koza in GPI (and as used in GPII, GPIII, and probably GPIV---although it is not made entirely clear).  If this flag is set to true then individuals are grown with a minimum depth of 2.  If this flag is set to false then the minimum depth of individuals is paired to the register variable 'gp.init.mindepth'.  Irrespective of this flag, maximum depth of individuals will range according to the values of 'gp.init.mindepth' and 'gp.init.maxdepth'; note that if you wish to entirely replicate Koza's method then mindepth and maxdepth should be set to the same value."
		);
		mKozaGrow = castHandleT<Bool>
		            (ioSystem.getRegister().insertEntry("gp.init.kozagrow", new Bool(false), lDescription));
	}

	Beagle_StackTraceEndM("void GP::InitGrowOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:21,代码来源:InitGrowOp.cpp

示例15: lDescription

/*!
 *  \brief Register the parameters of this operator.
 *  \param ioSystem System used to initialize the operator.
 */
void GP::TermMaxHitsOp::registerParams(Beagle::System& ioSystem)
{
	Beagle_StackTraceBeginM();
	TerminationOp::registerParams(ioSystem);
	std::ostringstream lOSS;
	lOSS << "Number of hits required in an individual ";
	lOSS << "in order for the evolution process to terminate. ";
	lOSS << "If 0, termination criteria is ignored.";
	Register::Description lDescription(
	    "Max hits term criterion",
	    "UInt",
	    uint2str(mMaxHitsDefault),
	    lOSS.str()
	);
	mMaxHits = castHandleT<UInt>(
	               ioSystem.getRegister().insertEntry("gp.term.maxhits", new UInt(mMaxHitsDefault), lDescription));
	Beagle_StackTraceEndM("void GP::TermMaxHitsOp::registerParams(Beagle::System&)");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:22,代码来源:TermMaxHitsOp.cpp


注:本文中的beagle::System::getRegister方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。