particle-trap change

This commit is contained in:
2016-10-01 13:19:41 +02:00
parent 44f9b6ac80
commit 5b0e3bbeb3

View File

@@ -132,9 +132,10 @@ public:
//p.weight *= prob;//(prob > 0.01) ? (1.0) : (0.15); //p.weight *= prob;//(prob > 0.01) ? (1.0) : (0.15);
//p.weight = (prob > 0.01) ? (1.0) : (0.15); //p.weight = (prob > 0.01) ? (1.0) : (0.15);
//p.weight = prob; //p.weight = prob;
p.weight = 1.0; // reset //p.weight = 1.0; // reset
p.weight = std::pow(p.weight, 0.1); // make all particles a little more equal [less strict] //p.weight = std::pow(p.weight, 0.1); // make all particles a little more equal [less strict]
p.weight *= std::pow(prob, 0.1); // add grid-walk-probability //p.weight *= std::pow(prob, 0.1); // add grid-walk-probability
p.weight = prob; // grid-walk-probability
if (p.weight != p.weight) {throw Exception("nan");} if (p.weight != p.weight) {throw Exception("nan");}
} }