示例#1
0
 public void SkipPaired(MinutiaPairing pairing)
 {
     while (Queue.Count > 0 && (pairing.IsProbePaired(Queue.Peek().Neighbor.Probe) ||
                                pairing.IsCandidatePaired(Queue.Peek().Neighbor.Candidate)))
     {
         EdgePair edge = Queue.Dequeue();
         if (pairing.IsProbePaired(edge.Neighbor.Probe) && pairing.GetByProbe(edge.Neighbor.Probe).Pair.Candidate == edge.Neighbor.Candidate)
         {
             pairing.AddSupportByProbe(edge.Reference.Probe);
             pairing.AddSupportByProbe(edge.Neighbor.Probe);
         }
     }
 }
示例#2
0
        void CollectEdges(Template candidate)
        {
            var reference         = Pairing.LastAdded.Pair;
            var probeNeighbors    = Probe.Edges.Table[reference.Probe];
            var candidateNeigbors = CandidateEdges.Table[reference.Candidate];
            var matches           = EdgeLookup.FindMatchingPairs(probeNeighbors, candidateNeigbors);

            foreach (var match in matches)
            {
                var neighbor = match.Pair;
                if (!Pairing.IsCandidatePaired(neighbor.Candidate) && !Pairing.IsProbePaired(neighbor.Probe))
                {
                    PairSelector.Enqueue(new EdgePair(reference, neighbor), match.Distance);
                }
                else if (Pairing.IsProbePaired(neighbor.Probe) && Pairing.GetByProbe(neighbor.Probe).Pair.Candidate == neighbor.Candidate)
                {
                    Pairing.AddSupportByProbe(reference.Probe);
                    Pairing.AddSupportByProbe(neighbor.Probe);
                }
            }
        }