// initial assertion
if (ssbn == null || algorithm == null) {
throw new SSBNNodeGeneralException(new NullPointerException(this.getClass() + ": SSBN == null; algorithm == null."));
}
if (algorithm instanceof DMPInference) {
DMPInference dmp = (DMPInference) algorithm;
// dmp needs a reset, because it uses static db and previous findings may still be in the system.
// TODO fix dmp so that it stops using static db
dmp.reset();
// findings of discrete nodes may be directly inserted to the network treated by the algorithm
Graph g = dmp.getNetwork(); // net to add findings
if (g == null) {
throw new SSBNNodeGeneralException(new IllegalStateException(ssbn + " and " + algorithm + " should be compiled before this method."));
}
if (g instanceof ProbabilisticNetwork) {
ProbabilisticNetwork net = (ProbabilisticNetwork) g;