Penman/jni/words.cpp
void combineRects(vector<Rect> &rectangles) {
	bool change = true;
	while (change) {
		change = false;

		for (unsigned int i = 0; i < rectangles.size(); i++) {
			int result = inBox(i, rectangles);
			if(result != -1){
				rectangles.erase(rectangles.begin() + i);
				i--;
			}

		}
	}

}
// Combines the rectangles: if a rectangle is inside another rectangle, it
// is erased from the vector.
Combines the rectangles: if a rectangle is inside another rectangle, it
is erased from the vector.
Combines the rectangles : if a rectangle is inside another rectangle it is erased from the vector .
void combineRects(vector<Rect> &rectangles) {
	bool change = true;
	while (change) {
		change = false;
		for (unsigned int i = 0; i < rectangles.size(); i++) {
			int result = inBox(i, rectangles);
			if(result != -1){
				rectangles.erase(rectangles.begin() + i);
				i--;
			}
		}
	}
}
void combineRects ( vector < Rect > & rectangles ) { bool change = true ; while ( change ) { change = false ; for ( unsigned int i = 0 ; i < rectangles . size ( ) ; i ++ ) { int result = inBox ( i , rectangles ) ; if ( result != -1 ) { rectangles . erase ( rectangles . begin ( ) + i ) ; i -- ; } } } }
Combines the rectangles: if a rectangle is inside another rectangle, it
is erased from the vector.
Combines the rectangles : if a rectangle is inside another rectangle it is erased from the vector .