예제 #1
0
		public static void FindDuplicates(GedcomDatabase databaseA, GedcomDatabase databaseB, float matchThreshold, DuplicateFoundFunc foundFunc)
		{		
			int total = databaseA.Individuals.Count;	
			int potential = 0;
						
			foreach (GedcomIndividualRecord indi in databaseA.Individuals)
			{
				List<GedcomIndividualRecord> matches = FindDuplicates(indi, databaseB, matchThreshold);
			
				if (matches.Count > 0)
				{
                    if (potential == 0)
                    Console.WriteLine("Match in " + databaseA.Name + " to " + databaseB.Name);
					foundFunc(indi, matches);		
					potential ++;
				}
			}
		}
예제 #2
0
        /// <summary>
        /// Finds the duplicates.
        /// </summary>
        /// <param name="databaseA">The database a.</param>
        /// <param name="databaseB">The database b.</param>
        /// <param name="matchThreshold">The match threshold.</param>
        /// <param name="foundFunc">The found function.</param>
        public static void FindDuplicates(GedcomDatabase databaseA, GedcomDatabase databaseB, decimal matchThreshold, DuplicateFoundFunc foundFunc)
        {
            int total     = databaseA.Individuals.Count;
            int potential = 0;

            foreach (GedcomIndividualRecord indi in databaseA.Individuals)
            {
                List <GedcomIndividualRecord> matches = FindDuplicates(indi, databaseB, matchThreshold);

                if (matches.Count > 0)
                {
                    foundFunc(indi, matches);
                    potential++;
                }
            }
        }