code: int removeVertexInternal_(int vertex, boolean b_left_segment) {
  		int prev = getPrevVertex(vertex);
  		int next = getNextVertex(vertex);
  		if (prev != -1)
  			setNextVertex_(prev, next);
  
  		if (next != -1)
  			setPrevVertex_(next, prev);
  
  		if (prev != -1 && next != -1) {
  			int vindex_prev = getVertexIndex(prev);
  			int vindex_next = getVertexIndex(next);
  			if (b_left_segment) {
  				Segment seg = getSegmentFromIndex_(vindex_prev);
  				if (seg != null) {
  					Point2D pt = new Point2D();
  					m_vertices.getXY(vindex_next, pt);
  					seg.setEndXY(pt);
  				}
  			} else {
  				int vindex_erased = getVertexIndex(vertex);
  				Segment seg = getSegmentFromIndex_(vindex_erased);
  				setSegmentToIndex_(vindex_prev, seg);
  				if (seg != null) {
  					Point2D pt = new Point2D();
  					m_vertices.getXY(vindex_prev, pt);
  					seg.setStartXY(pt);
  				}
  			}
  		}
  		freeVertex_(vertex);
  		return next;
  	}
docs: void dbg_verify_vertex_counts();