| 56 | // ============================================================ |
| 57 | |
| 58 | double OcTreeNode::getMeanChildLogOdds() const{ |
| 59 | double mean = 0; |
| 60 | uint8_t c = 0; |
| 61 | if (children !=NULL){ |
| 62 | for (unsigned int i=0; i<8; i++) { |
| 63 | if (children[i] != NULL) { |
| 64 | mean += static_cast<OcTreeNode*>(children[i])->getOccupancy(); // TODO check if works generally |
| 65 | ++c; |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | if (c > 0) |
| 71 | mean /= (double) c; |
| 72 | |
| 73 | return log(mean/(1-mean)); |
| 74 | } |
| 75 | |
| 76 | float OcTreeNode::getMaxChildLogOdds() const{ |
| 77 | float max = -std::numeric_limits<float>::max(); |
nothing calls this directly
no test coverage detected