// this is the struct that will be returned after the BitExact Feature process is ended
Example #1
0
 public void setBitExact(BitExactRes bitExactRes)
 {
     _bitExactRes = new BitExactRes(bitExactRes.Matches);
 }
Example #2
0
        //function that check matches
        public void run()
        {
            float realRunStatus = 0;
            try
            {
                setPropotion(); // set propotion to images
                for (int i = 0; i < numImages - 1; i++)
                {
                    int equalToImage = 0;
                    if (checkedImages[i] || (propotions[i] == Propotion.pOther)) //if we founded match then don't check the image
                    {
                        continue;
                    }
                    for (int j = i + 1; j < numImages; j++)
                        if (propotions[i] == propotions[j] && (!checkedImages[j])) //check only images with similar propotions
                        {
                            if(equalImagesFast(i, j)) //equal is true if there is a match
                                equalToImage++;
                        }

                    realRunStatus += (float)(1 + equalToImage) / numImages;
                    runStatus = (int)(Math.Min(Math.Round(realRunStatus*100), 99));
                }
                runStatus = 100;
                // set results
                results = new BitExactRes(matches);
            }
            catch (ThreadAbortException)
            { // ResetAbout() handles and the exception and letting the thread
              // finish normally (reaching the end of the function)
                Thread.ResetAbort();
            }
        }
Example #3
0
 public void setBitExact(BitExactRes bitExactRes)
 {
     _bitExactRes = new BitExactRes(bitExactRes.Matches);
 }
Example #4
0
 public void TestResultsStructure()
 {
     Results res = new Results();
     List<List<string>> lst = new List<List<string>>(10);
     for (int i = 0; i < 10; i++)
     {
         lst.Add(new List<string>(10));
         for (int j = 0; j < 10; j++)
         {
             lst.Last().Add("afdasdasd");
         }
     }
     BitExactRes bRes = new BitExactRes(lst);
     res.setBitExact(bRes);
     foreach (List<string> ll in res.BitExact.Matches)
     {
         foreach (string str in ll)
             Debug.WriteLine(str + " ");
     }
     List<List<string>> l = res.BitExact.Matches;
 }