A basic algorithm that trims both sides of a contiguous data string
if a condition is not satisfied, until the condition is met for the
first time.
- Parameters:
- g
Iter The outcome for each datapoint, qualified (=1) or not qualified (=0)
- Returns:
- first
int The trimmed first point of the array
- last
int The trimmed last point of the array