MCPcopy Create free account
hub / github.com/OctoMap/octomap / getMeanChildLogOdds

Method getMeanChildLogOdds

octomap/src/OcTreeNode.cpp:58–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 1

getOccupancyMethod · 0.80

Tested by

no test coverage detected