Commit 8badec00 authored by Klaus Hamberger's avatar Klaus Hamberger
Browse files

Debugged differential census (row sums).

git-svn-id: svn+ssh://svn.code.sf.net/p/tip-puck/code/trunk@2319 fbf60bc9-78ff-467a-80f5-d9f1d8e511fc
parent 5a5ba9b9
......@@ -1709,7 +1709,7 @@ public class CircuitFinder {
//verify conditions for case of invariable relations!
for (Individual alter : alters) {
if (egoPos==0 && !closingRelationType.equals("OPEN") && (alter.getId()>ego.getId() || symmetry == SymmetryType.INVARIABLE) && !notInDomain(ego,alter) && !notInFamilyDomain(ego,alter)){
if (egoPos==0 && !closingRelationType.equals("OPEN") && !closingRelationType.equals("TOTAL") && (alter.getId()>ego.getId() || symmetry == SymmetryType.INVARIABLE) && !notInDomain(ego,alter) && !notInFamilyDomain(ego,alter)){
couplesConsidered++;
if (consideredCouples!=null){
consideredCouples.add(Chain.getCouple(ego, alter, crossSex, symmetry, firstGender));
......@@ -1926,8 +1926,15 @@ public class CircuitFinder {
} else {
findBases(ego, new Chain(ego), new HashSet<Individual>(), 2 * dim() - 1, 0);
}
}
if (closingRelationType.equals("TOTAL")){
couplesConsidered = targetDomain.size()*(targetDomain.size()-1);
if (symmetry==SymmetryType.INVERTIBLE){
couplesConsidered = couplesConsidered/2;
}
}
// circuits.getClusters().sort();
// end();
}
......@@ -3919,12 +3926,7 @@ public class CircuitFinder {
CircuitFinder finder = new CircuitFinder(domain,censusCriteria);
finder.findCircuits();
result.put(finder.getCircuits(), individualCluster.getValue());
int rowSum = individuals.size()*(individuals.size()-1);
if (censusCriteria.getSymmetryType()==SymmetryType.INVERTIBLE){
rowSum = rowSum/2;
}
result.putRowSum(individualCluster.getValue(), rowSum);
result.putRowSum(individualCluster.getValue(), finder.getCouplesConsidered());
}
}
......
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