本文整理汇总了C++中pacc::xml::Streamer::openTag方法的典型用法代码示例。如果您正苦于以下问题:C++ Streamer::openTag方法的具体用法?C++ Streamer::openTag怎么用?C++ Streamer::openTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pacc::xml::Streamer
的用法示例。
在下文中一共展示了Streamer::openTag方法的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:
/*!
* \brief Write an MCC fitness object into a Beagle XML streamer.
* \param ioStreamer XML streamer to use to write the fitness values.
* \param inIndent Whether XML output should be indented.
*/
void GP::FitnessMCC::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("MCC", false);
ioStreamer.insertStringContent(dbl2str(mValue));
ioStreamer.closeTag();
ioStreamer.openTag("TruePositives", false);
ioStreamer.insertStringContent(dbl2str(mTruePositives));
ioStreamer.closeTag();
ioStreamer.openTag("FalsePositives", false);
ioStreamer.insertStringContent(dbl2str(mFalsePositives));
ioStreamer.closeTag();
ioStreamer.openTag("TrueNegatives", false);
ioStreamer.insertStringContent(dbl2str(mTrueNegatives));
ioStreamer.closeTag();
ioStreamer.openTag("FalseNegatives", false);
ioStreamer.insertStringContent(uint2str(mFalseNegatives));
ioStreamer.closeTag();
ioStreamer.openTag("TruePositivesRel", false);
ioStreamer.insertStringContent(dbl2str(mTruePositivesRel));
ioStreamer.closeTag();
ioStreamer.openTag("FalsePositivesRel", false);
ioStreamer.insertStringContent(dbl2str(mFalsePositivesRel));
ioStreamer.closeTag();
ioStreamer.openTag("TrueNegativesRel", false);
ioStreamer.insertStringContent(dbl2str(mTrueNegativesRel));
ioStreamer.closeTag();
ioStreamer.openTag("FalseNegativesRel", false);
ioStreamer.insertStringContent(dbl2str(mFalseNegativesRel));
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::FitnessMCC::writeContent(PACC::XML::Streamer&, bool) const");
}
示例3: 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");
}
示例4: write
/*!
* \brief Write bag of individuals into XML streamer.
* \param ioStreamer XML streamer.
* \param inIndent Whether XML output should be indented.
*/
void IndividualBag::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("IndividualBag", inIndent);
for(unsigned int i=0; i<size(); ++i) {
if((*this)[i] == NULL) {
ioStreamer.openTag("NullHandle");
ioStreamer.closeTag();
} else {
(*this)[i]->write(ioStreamer, inIndent);
}
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例5:
/*!
* \brief Write switch type operator into an XML stream.
* \param ioStreamer XML stream in which the operator is written.
* \param inIndent Whether XML output should be indented.
*/
void HPC::SwitchTypeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
for(OperatorSetMap::const_iterator lIterMap = mOperatorSetMap.begin(); lIterMap != mOperatorSetMap.end(); ++lIterMap){
ioStreamer.openTag(lIterMap->first, inIndent);
for(Operator::Bag::const_iterator lIterBag = lIterMap->second.begin(); lIterBag != lIterMap->second.end(); ++lIterBag){
Operator::Handle lOp = castHandleT<Operator>(*lIterBag);
lOp->write(ioStreamer, inIndent);
}
ioStreamer.closeTag();
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例6: 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");
}
示例7:
/*!
* \brief Write a primitive super set into a Beagle XML stream.
* \param ioStreamer XMl streamer to write the super set into.
* \param inIndent Whether XML output should be indented.
*/
void GP::PrimitiveSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("GP-PrimitiveSuperSet", inIndent);
for(unsigned int i=0; i<mPrimitSets.size(); i++) mPrimitSets[i]->write(ioStreamer, inIndent);
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::PrimitiveSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例8:
/*!
* \brief Write an instruction super set into a Beagle XML stream.
* \param ioStreamer XMl streamer to write the super set into.
* \param inIndent Whether XML output should be indented.
*/
void LinGP::InstructionSuperSet::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
ioStreamer.openTag("InstructionSuperSet", inIndent);
for(unsigned int i=0; i<mInstructionSets.size(); i++) {
mInstructionSets[i]->write(ioStreamer);
}
ioStreamer.closeTag();
}
示例9: write
/*!
* \brief Write a genotype into a XML streamer.
* \param ioStreamer XML streamer to use.
* \param inIndent Whether XML output should be indented.
*/
void Genotype::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Genotype", inIndent);
ioStreamer.insertAttribute("type", getType());
writeContent(ioStreamer, inIndent);
ioStreamer.closeTag();
Beagle_StackTraceEndM("void Genotype::write(PACC::XML::Streamer&,bool) const");
}
示例10:
/*!
* \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");
}
示例11: 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();
}
示例12: write
/*!
* \brief Write concept map of the factory into a XML streamer.
* \param ioStreamer XML streamer to write factory concept map into.
* \param inIndent Whether XML output should be indented.
*/
void Factory::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Factory", inIndent);
std::map< std::string, std::string > lSortedMap;
for(Factory::ConceptMap::const_iterator lIter=mConceptMap.begin();
lIter!=mConceptMap.end(); ++lIter) {
lSortedMap[lIter->first] = lIter->second;
}
for(std::map< std::string, std::string >::const_iterator lIterSM=lSortedMap.begin();
lIterSM!=lSortedMap.end(); ++lIterSM) {
ioStreamer.openTag("Concept", false);
ioStreamer.insertAttribute("name", lIterSM->first);
ioStreamer.insertAttribute("type", lIterSM->second);
ioStreamer.closeTag();
}
ioStreamer.closeTag();
Beagle_StackTraceEndM();
}
示例13:
/*!
* \brief Write a Koza's fitness into a Beagle XML streamer.
* \param ioStreamer XML streamer to use to write the fitness values.
* \param inIndent Whether XML output should be indented.
*/
void GP::FitnessKoza::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag("Normalized", false);
ioStreamer.insertStringContent(dbl2str(mValue));
ioStreamer.closeTag();
ioStreamer.openTag("Adjusted", false);
ioStreamer.insertStringContent(dbl2str(mAdjustedFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Standardized", false);
ioStreamer.insertStringContent(dbl2str(mStandardizedFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Raw", false);
ioStreamer.insertStringContent(dbl2str(mRawFitness));
ioStreamer.closeTag();
ioStreamer.openTag("Hits", false);
ioStreamer.insertStringContent(uint2str(mHits));
ioStreamer.closeTag();
Beagle_StackTraceEndM("void GP::FitnessKoza::writeContent(PACC::XML::Streamer&, bool) const");
}
示例14: write
/*!
* \brief Write OversizeOp operator into XML streamer.
* \param ioStreamer XML streamer to write OversizeOp operator into.
* \param inIndent Whether XML output should be indented.
*/
void OversizeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.openTag(getName(), inIndent);
ioStreamer.insertAttribute("ratio_name", mOversizeRatioName);
for(BreederNode::Handle lNode=getRootNode(); lNode!=NULL; lNode=lNode->getNextSibling()) {
lNode->write(ioStreamer, inIndent);
}
ioStreamer.closeTag();
Beagle_StackTraceEndM("void OversizeOp::write(PACC::XML::Streamer& ioStreamer, bool inIndent) const");
}
示例15: writeContent
/*!
* \brief Write a multiobjective fitness into an XML streamer.
* \param ioStreamer XML streamer to use to write the fitness value.
* \param inIndent Whether XML output should be indented.
*/
void FitnessMultiObj::writeContent(PACC::XML::Streamer& ioStreamer, bool inIndent) const
{
Beagle_StackTraceBeginM();
ioStreamer.insertAttribute("size", uint2str(size()));
for(unsigned int i=0; i<size(); ++i) {
ioStreamer.openTag("Obj", false);
ioStreamer.insertStringContent(dbl2str((*this)[i]));
ioStreamer.closeTag();
}
Beagle_StackTraceEndM();
}