8 #include <xercesc/dom/DOM.hpp> 31 virtual ~ProcOptional();
33 virtual void configure(DOMElement *
elem)
override;
37 std::vector<double> neutrals;
42 ProcOptional::ProcOptional(
const char *
name,
const AtomicId *
id,
48 ProcOptional::~ProcOptional()
52 void ProcOptional::configure(DOMElement *
elem)
54 for(DOMNode *node = elem->getFirstChild();
55 node; node = node->getNextSibling()) {
56 if (node->getNodeType() != DOMNode::ELEMENT_NODE)
62 <<
"Expected neutral tag in config section." 64 elem =
static_cast<DOMElement*
>(node);
67 XMLDocument::readAttribute<double>(
elem,
"pos");
69 neutrals.push_back(neutral);
74 if (neutrals.size() != getInputs().size())
76 <<
"Got " << neutrals.size()
77 <<
" neutral pos values for " 78 << getInputs().size() <<
" input variables." 86 std::copy(neutrals.begin(), neutrals.end(),
MVATrainerComputer * calib
def elem(elemtype, innerHTML='', html_class='', kwargs)