本文整理汇总了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();
}
示例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();
}
示例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");
}
示例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();
}
示例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();
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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");
}
示例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");
}