public void restoreXml(XmlPullParser parser) {
		XmlElement el = parser.start("weightfactory");
		scale = Double.parseDouble(el.getAttribute("scale"));
		addend = Double.parseDouble(el.getAttribute("addend"));
		double scale_sqrt = Math.sqrt(scale);
		for(int i=0;i<idfweight.length;++i) {
			parser.start("idf");
			double val = Double.parseDouble(parser.end().getText());
			idfweight[i] = val * scale_sqrt;
		}
		for(int i=0;i<tfweight.length;++i) {
			parser.start("tf");
			double val = Double.parseDouble(parser.end().getText());
			tfweight[i] = val;
		}
		parser.start("weightnorm");
		weightnorm = Double.parseDouble(parser.end().getText());
		weightnorm /= scale;
		parser.start("probflip0");
		probflip0 = Double.parseDouble(parser.end().getText());
		parser.start("probflip1");
		probflip1 = Double.parseDouble(parser.end().getText());
		parser.start("probdiff0");
		probdiff0 = Double.parseDouble(parser.end().getText());
		parser.start("probdiff1");
		probdiff1 = Double.parseDouble(parser.end().getText());
		
		parser.end(el);
		updateNorms();
	}
Build (deserialize) this object from an XML stream
@param parser is the XML parser
Ghidra/Framework/Generic/src/main/java/generic/lsh/vector/WeightFactory.java