Lines Matching refs:index1

461   Int index1, index2;
463 index1 = leftChain->findIndexBelowGen(v, leftChainStartIndex, leftChainEndIndex);
469 if(index1>leftChainEndIndex && index2 > rightChainEndIndex) /*no point below v on left chain or right chain*/
476 else if(index1>leftChainEndIndex ) /*index2 <= rightChainEndIndex*/
509 else if(index2> rightChainEndIndex) /*index1<=leftChainEndIndex*/
512 ret_leftCornerIndex = index1;
520 for(tempI = index1; tempI <= leftChainEndIndex; tempI++)
543 ret_rightCornerIndex = index1; //should use tempI???
558 else /*index1<=leftChainEndIndex and index2 <=rightChainEndIndex*/
560 if(leftChain->getVertex(index1)[1] >= rightChain->getVertex(index2)[1]) /*left point above right point*/
563 ret_leftCornerIndex = index1;
568 tempI = index1;
569 tempMax = leftChain->getVertex(index1)[0];
572 for(i=index1+1; i<= leftChainEndIndex; i++)
588 ret_rightCornerIndex = index1; //should use tempI???
615 /*find the minimum u for all the points on the right above the left poitn index1*/
618 if( rightChain->getVertex(i)[1] < leftChain->getVertex(index1)[1])
627 //we consider if we can use leftchain(index1) as left corner.
628 //we check if (leftChain(index1) intersects right chian or not
629 if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex, leftGridPoint, leftChain->getVertex(index1)))
634 else if(tempMin <= leftChain->getVertex(index1)[0] ||
643 ret_leftCornerIndex = index1;
676 Int index1, index2;
678 index1 = leftChain->findIndexFirstAboveEqualGen(v, leftChainStartIndex, leftChainEndIndex);
686 if(index1<leftChainStartIndex && index2 <rightChainStartIndex) /*no point above v on left chain or right chain*/
692 else if(index1<leftChainStartIndex ) /*index2 >= rightChainStartIndex*/
724 else if(index2< rightChainStartIndex) /*index1>=leftChainStartIndex*/
727 ret_leftCornerIndex = index1;
729 //find the maximum u on the left top section. either that or topvertex, or left[index1] is the right corner
730 Real tempMax = leftChain->getVertex(index1)[0];
731 Int tempI = index1;
733 for(i=index1-1; i>=leftChainStartIndex; i--){
749 ret_rightCornerIndex = index1;
759 else /*index1>=leftChainStartIndex and index2 >=rightChainStartIndex*/
761 if(leftChain->getVertex(index1)[1] <= rightChain->getVertex(index2)[1]) /*left point below right point*/
764 ret_leftCornerIndex = index1;
769 tempI = index1;
770 tempMax = leftChain->getVertex(index1)[0];
773 for(i=index1-1; i>= leftChainStartIndex; i--)
788 ret_rightCornerIndex = index1;
813 /*find the minimum u for all the points on the right below the left poitn index1*/
816 if( rightChain->getVertex(i)[1] > leftChain->getVertex(index1)[1])
824 //check whether (leftGRidPoint,left(index1)) interesect right chain
826 leftGridPoint, leftChain->getVertex(index1)))
831 else if(tempMin <= leftChain->getVertex(index1)[0] ||
840 ret_leftCornerIndex = index1;
1417 Int index1, index2; /*the first and last grid line of the first connected component*/
1432 /*find index1 so that left_uline_index <= right_uline_index, that is, this
1435 index1=i;
1437 while(index1 < leftGridChain->get_nVlines())
1439 if(leftGridChain->getUlineIndex(index1) <= rightGridChain->getUlineIndex(index1))
1442 index1++;
1447 if(index1 >= leftGridChain->get_nVlines()) /*no grid line exists which has inner point*/
1490 index2=index1+1;
1596 leftGridChain->get_v_value(index1),
1597 leftGridChain->get_u_value(index1),
1598 rightGridChain->get_u_value(index1),
1630 index1,
1650 index1, index2,
1741 * index1.
1742 *and sampleLeftOneGridStep(leftchain, topLeftIndex, index1, leftGridChain,
1744 * index1 could be equal to topLeftIndex.
1748 Int index1 = topLeftIndex;
1749 while(leftChain->getVertex(index1)[1] > secondGridChainV)
1750 index1++;
1751 index1--;
1753 sampleLeftOneGridStep(leftChain, topLeftIndex, index1, leftGridChain, leftGridChainStartIndex, pStream);
1764 uppervert = leftChain->getVertex(index1);
1765 lowervert = leftChain->getVertex(index1+1);
1786 sampleLeftStripRec(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);
1829 * index1.
1834 Int index1 = topLeftIndex;
1836 while(leftChain->getVertex(index1)[1] > secondGridChainV){
1837 index1++;
1838 if(index1>botLeftIndex)
1844 *If equality holds, then we should include the vertex index1, otherwise we include only index1-1, to
1847 if(index1>botLeftIndex)
1848 index1--;
1849 else if(leftChain->getVertex(index1)[1] < secondGridChainV)
1850 index1--;
1852 /*now we have leftChain->getVertex(index1)[1] >= secondGridChainV, and
1853 * leftChain->getVertex(index1+1)[1] <= secondGridChainV
1857 sampleLeftOneGridStep(leftChain, topLeftIndex, index1, leftGridChain, leftGridChainStartIndex, pStream);
1860 /*if leftChain->getVertex(index1)[1] == secondGridChainV, then we can recursively do the rest.
1862 if(leftChain->getVertex(index1)[1] == secondGridChainV)
1865 sampleLeftStripRecF(leftChain, index1, botLeftIndex,leftGridChain, leftGridChainStartIndex+1, leftGridChainEndIndex, pStream);
1867 else if(index1 < botLeftIndex)
1870 /* Otherwise, we have leftChain->getVertex(index1)[1] > secondGridChainV,
1878 uppervert = leftChain->getVertex(index1);
1879 lowervert = leftChain->getVertex(index1+1); //okay since index1<botLeftIndex
1896 sampleLeftStripRecF(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);