diff --git a/feta/objectmodels/components/DegreeModelComponent.java b/feta/objectmodels/components/DegreeModelComponent.java index ee701ea..2ed1de6 100644 --- a/feta/objectmodels/components/DegreeModelComponent.java +++ b/feta/objectmodels/components/DegreeModelComponent.java @@ -57,6 +57,20 @@ public void updateNormalisation(UndirectedNetwork net, HashSet availabl } } + public void updateNormalisation(DirectedNetwork net, HashSet availableNodes, int chosenNode) { + if (!random_) { + if (useInDegree_) { + tempConstant_ -= net.getInDegree(chosenNode); + } else { + tempConstant_ -= net.getOutDegree(chosenNode); + } + } + if (random_ || tempConstant_==0) { + random_=true; + tempConstant_=availableNodes.size(); + } + } + public void calcNormalisation(UndirectedNetwork network, int [] removed) { int degSum = 0; for (int j : removed) {