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


C++ Streamer::insertAttribute方法代码示例

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


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

示例1: write

/*!
 *  \brief Write a history entry into a XML streamer.
 *  \param ioStreamer XML streamer to use.
 *  \param inIndent Whether XML output should be indented.
 */
void HistoryEntry::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();

	ioStreamer.openTag("Entry", inIndent);
	ioStreamer.insertAttribute("var", uint2str(mIndividualVar));
	ioStreamer.insertAttribute("generation", uint2str(mGeneration));

	for(unsigned int i=0; i<mParents.size(); ++i) {
		ioStreamer.openTag("Parent", inIndent);
		ioStreamer.insertAttribute("id", uint2str(mParents[i].getID()));
		ioStreamer.insertAttribute("var", uint2str(mParents[i].getVar()));
		ioStreamer.closeTag();
	}

	for(unsigned int i=0; i<mOpNames.size(); ++i) {
		ioStreamer.openTag("Operations", inIndent);
		ioStreamer.insertAttribute("action", mActions[i]);
		ioStreamer.insertAttribute("opname", mOpNames[i]);
		ioStreamer.closeTag();
	}

	ioStreamer.closeTag();

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

示例2: writeContent

/*!
 *  \brief Write recombination operator content into XML streamer.
 *  \param ioStreamer XML streamer to write recombination operator into.
 *  \param inIndent Whether output should be indented.
 */
void RecombinationOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	ioStreamer.insertAttribute("recombpb", mRecombProbaName);
	ioStreamer.insertAttribute("nbrindrecomb", mNumberRecombName);
	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:12,代码来源:RecombinationOp.cpp

示例3:

/*!
 *  \brief Write an max hits termination operator into a XML stream.
 *  \param ioStreamer XML streamer in which the operator is written.
 *  \param inIndent Whether XML output should be indented.
 */
void GP::TermMaxHitsOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	ioStreamer.openTag(getName(), inIndent);
	if(mMaxHits != NULL) ioStreamer.insertAttribute("hits", uint2str(mMaxHits->getWrappedValue()));
	else ioStreamer.insertAttribute("hits", uint2str(mMaxHitsDefault));
	ioStreamer.closeTag();
	Beagle_StackTraceEndM("void GP::TermMaxHitsOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:14,代码来源:TermMaxHitsOp.cpp

示例4:

/*!
 *  \brief Write Gaussian mutation operator into XML streamer.
 *  \param ioStreamer XML streamer to write mutation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void FltVec::MutationGaussianOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	EC::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("mutfloatpb", mMutateFloatPbName);
	ioStreamer.insertAttribute("mutgaussmu", mMutateGaussMuName);
	ioStreamer.insertAttribute("mutgausssigma", mMutateGaussSigmaName);
	Beagle_StackTraceEndM();
}
开发者ID:GhostGambler,项目名称:beagle,代码行数:14,代码来源:MutationGaussianOp.cpp

示例5: write

/*!
 *  \brief Write a max fitness termination operator into a XML stream.
 *  \param ioStreamer XML stream in which the operator is written.
 *  \param inIndent Whether XML output should be indented.
 */
void TermMaxFitnessOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	ioStreamer.openTag(getName(), inIndent);
	if(mMaxFitness != NULL)
		ioStreamer.insertAttribute("fitness", dbl2str(mMaxFitness->getWrappedValue()));
	else ioStreamer.insertAttribute("fitness", dbl2str(mMaxFitnessDefault));
	ioStreamer.closeTag();
	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:15,代码来源:TermMaxFitnessOp.cpp

示例6: write

void FitnessNMSE::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
    Beagle_StackTraceBeginM();
    ioStreamer.openTag("FitnessNMSE", inIndent);
    ioStreamer.insertAttribute("NMSE", dbl2str(mNMSE));
    for(unsigned i=0; i<size(); ++i) {
        ioStreamer.openTag("y" + int2str(i), inIndent);
        ioStreamer.insertAttribute("NMSE", dbl2str((*this)[i].nmse));
        ioStreamer.insertAttribute("MSE", dbl2str((*this)[i].mse));
        ioStreamer.closeTag();
    }
    ioStreamer.closeTag();
    Beagle_StackTraceEndM("void FitnessSimple::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:gametack,项目名称:SinsGP,代码行数:14,代码来源:FitnessNMSE.cpp

示例7:

/*!
 *  \brief Write uniform mutation operator into XML streamer.
 *  \param ioStreamer XML streamer to write mutation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void GA::MutationUniformIntVecOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("mutintpb", mIntMutatePbName);
	Beagle_StackTraceEndM("void GA::MutationUniformIntVecOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:12,代码来源:MutationUniformIntVecOp.cpp

示例8:

/*!
 *  \brief Write ES mutation operator into XML streamer.
 *  \param ioStreamer XML streamer to write mutation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void GA::MutationESVecOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("minstrategy", mMinStrategyName);
	Beagle_StackTraceEndM("void GA::MutationESVecOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:12,代码来源:MutationESVecOp.cpp

示例9:

/*!
 *  \brief Write crossover operator into XML streamer.
 *  \param ioStreamer XML streamer to write crossover operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void GP::CrossoverOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::CrossoverOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("distrpb", mDistribPbName);
	Beagle_StackTraceEndM("void GP::CrossoverOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:12,代码来源:CrossoverOp.cpp

示例10:

/*!
 *  \brief Write sigma adaptation operator into XML streamer.
 *  \param ioStreamer XML streamer to write adaptation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void ES::AdaptOneFifthRuleOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::BreederOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("mutgausssigma", mMutateGaussSigmaName);
	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:12,代码来源:AdaptOneFifthRuleOp.cpp

示例11:

/*!
 *  \brief Write flip bit mutation operator into XML streamer.
 *  \param ioStreamer XML streamer to write mutation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void BitStr::MutationFlipBitOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	EC::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("mutbitpb", mBitMutatePbName);
	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:12,代码来源:MutationFlipBitOp.cpp

示例12:

/*!
 *  \brief Write mutation operator into XML streamer.
 *  \param ioStreamer XML streamer to write mutation operator into.
 *  \param inIndent Whether XML output should be indented.
 */
void GP::MutationSwapSubtreeOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("distrpb", mDistribPbName);
	Beagle_StackTraceEndM();
}
开发者ID:AngelGate,项目名称:beagle,代码行数:12,代码来源:MutationSwapSubtreeOp.cpp

示例13: writeContent

/*!
 *  \brief Write crossover operator content into XML streamer.
 *  \param ioStreamer XML streamer to write crossover operator into.
 *  \param inIndent Whether output should be indented.
 */
void CrossoverOp::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
	Beagle_StackTraceBeginM();

	ioStreamer.insertAttribute("matingpb", mMatingProbaName);

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

示例14: writeContent

void PopulationManager::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const {
	schnaps_StackTraceBeginM();
	// write generator
	mGenerator->write(ioStreamer, inIndent);

	// write population source
	ioStreamer.openTag("Population");
	for (PopulationManager::const_iterator lIt = this->begin(); lIt != this->end(); lIt++) {
		ioStreamer.openTag("SubPopulation");
		ioStreamer.insertAttribute("time", SCHNAPS::uint2str(lIt->first));
		ioStreamer.insertAttribute("profile", lIt->second.mProfile);
		ioStreamer.insertAttribute("size", SCHNAPS::uint2str(lIt->second.mSize));
		ioStreamer.closeTag();
	}
	ioStreamer.closeTag();
	schnaps_StackTraceEndM("void SCHNAPS::Simulation::PopulationManager::writeContent(PACC::XML::Streamer&, bool) const");
}
开发者ID:audurand,项目名称:schnaps,代码行数:17,代码来源:PopulationManager.cpp

示例15:

void Beagle::GP::MutationEphemeralOpT<T>::writeContent(PACC::XML::Streamer& ioStreamer,
        bool inIndent) const
{
	Beagle_StackTraceBeginM();
	Beagle::MutationOp::writeContent(ioStreamer, inIndent);
	ioStreamer.insertAttribute("primitname", mEphemeralNameParamName);
	Beagle_StackTraceEndM("void GP::MutationEphemeralOpT<T>::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
开发者ID:splodginald,项目名称:MPI-PACC-OpenBeagle,代码行数:8,代码来源:MutationEphemeralOpT.hpp


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