public static CostPair[] createArray(int i_size)
 {
     CostPair[] r = new CostPair[i_size];
     for (int i = 0; i < i_size; i++)
     {
         r[i] = new CostPair();
     }
     return(r);
 }
        public RobustHomography(double cauchyScale, int maxNumHypotheses, int maxTrials, int chunkSize)
        {
            this.mHyp = new HomographyMat[maxNumHypotheses];
            for (int i = 0; i < this.mHyp.Length; i++)
            {
                this.mHyp[i] = new HomographyMat();
            }
            this.mHypCosts = CostPair.createArray(maxNumHypotheses);

            this.mCauchyScale      = cauchyScale;
            this.mMaxNumHypotheses = maxNumHypotheses;
            this.mMaxTrials        = maxTrials;
            this.mChunkSize        = chunkSize;
        }
 // test if_Left<_Right for pairs
 public static bool operator_lt(CostPair _Left, CostPair _Right)
 {
     return(_Left.first < _Right.first || (!(_Right.first < _Left.first) && _Left.second < _Right.second));
 }