Commit c7415b7d authored by Klaus Hamberger's avatar Klaus Hamberger
Browse files

Modified closure rate calculation (division by number of perspectives not by...

Modified closure rate calculation (division by number of perspectives not by order, since open chain search already avoids double counting of isomorphic chains).

git-svn-id: svn+ssh://svn.code.sf.net/p/tip-puck/code/trunk@2334 fbf60bc9-78ff-467a-80f5-d9f1d8e511fc
parent 52b89a5c
......@@ -2735,6 +2735,7 @@ public class CircuitFinder {
Double[] result;
int order = ChainMaker.getOrder(key);
int nrPerspectives = 1;
if (!openChainFrequencies){
result = null;
......@@ -2751,19 +2752,20 @@ public class CircuitFinder {
if (order==1){
openChainFrequency = getNrOpenChainsForKey(key);
} else {
// Set<Vector> checked = new HashSet<Vector>();
Set<Vector> checked = new HashSet<Vector>();
for (int i=0;i<2*order;i++){
Vector perspective = vector.transform(i);
// if (!checked.contains(perspective)){
if (!checked.contains(perspective)){
openChainFrequency += getNrOpenChainsForKey(new Value(perspective));
// checked.add(perspective);
// }
checked.add(perspective);
}
}
nrPerspectives = checked.size()/2;
}
}
result[0] = new Double(circuitFrequency);
result[1] = new Double(openChainFrequency);
result[2] = MathUtils.percent(result[0], result[1]/new Double(order));
result[2] = MathUtils.percent(result[0], result[1]/new Double(nrPerspectives));
}
//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment