MCPcopy Create free account
hub / github.com/Gecode/gecode / computeBoundingBox

Method computeBoundingBox

gecode/gist/visualnode.hpp:109–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 forceinline void
110 Shape::computeBoundingBox(void) {
111 int lastLeft = 0;
112 int lastRight = 0;
113 bb.left = 0;
114 bb.right = 0;
115 for (int i=0; i<depth(); i++) {
116 lastLeft = lastLeft + (*this)[i].l;
117 lastRight = lastRight + (*this)[i].r;
118 bb.left = std::min(bb.left,lastLeft);
119 bb.right = std::max(bb.right,lastRight);
120 }
121 }
122
123 forceinline const BoundingBox&
124 Shape::getBoundingBox(void) const {

Callers 2

ShapeAllocatorMethod · 0.80
setShapeMethod · 0.80

Calls 2

minFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected