* @param fromStart
* @param fromEnd
* @param fromRatio2
- * @return
+ * @return series of from,to intervals from from first position of starting region to final position of ending region inclusive
*/
private int[] getIntervals(Vector fromShifts2, int[] fromStart, int[] fromEnd, int fromRatio2)
{
- // TODO: correct for word boundary w.r.t. fromStart->fromEnd direction for startpos and endpos.
- // test is (1,8,12,17) to (1,5) and features on to : 2,2; 3,3; 4,3; 3,4; 4,4; 5,3; 3,5; 2,4; 4,2;
- // correct for word direction for start and end :
- int startpos = fromStart[0]+fromStart[2]*(fromRatio2-1); // Math.min(fromStart[0], .. );
- int endpos = fromEnd[0]+fromEnd[2]*(fromRatio2-1); // Math.max(fromEnd[0],);
+ int startpos,endpos;
+ startpos = fromStart[0]; // first position in fromStart
+ endpos = fromEnd[0]+fromEnd[2]*(fromRatio2-1); // last position in fromEnd
int intv=0,intvSize= fromShifts2.size();
int iv[],i=0,fs=-1,fe=-1; // containing intervals
while (intv<intvSize && (fs==-1 || fe==-1)) {