public void saveXml(Writer fwrite) throws IOException {
		fwrite.append("<weightfactory scale=\"");
		fwrite.append(Double.toString(scale));
		fwrite.append("\" addend=\"");
		fwrite.append(Double.toString(addend));
		fwrite.append("\">\n");
		double scale_sqrt = Math.sqrt(scale);
		for (double element : idfweight) {
			fwrite.append(" <idf>");
			fwrite.append(Double.toString(element / scale_sqrt));
			fwrite.append("</idf>\n");
		}
		for (double element : tfweight) {
			fwrite.append(" <tf>");
			fwrite.append(Double.toString(element));
			fwrite.append("</tf>\n");
		}
		fwrite.append(" <weightnorm>").append(Double.toString(weightnorm * scale)).append("</weightnorm>\n");
		fwrite.append(" <probflip0>").append(Double.toString(probflip0)).append("</probflip0>\n");
		fwrite.append(" <probflip1>").append(Double.toString(probflip1)).append("</probflip1>\n");
		fwrite.append(" <probdiff0>").append(Double.toString(probdiff0)).append("</probdiff0>\n");
		fwrite.append(" <probdiff1>").append(Double.toString(probdiff1)).append("</probdiff1>\n");
		fwrite.append("<weightfactory>\n");
	}
Serialize this object as XML to a Writer
@param fwrite is the Writer
@throws IOException
Ghidra/Framework/Generic/src/main/java/generic/lsh/vector/WeightFactory.java