MinutiaMatcher DequeueMatcher(PreparedProbe probe) { MinutiaMatcher matcher = DequeueMatcher(); matcher.SelectProbe(probe.ProbeIndex); return(matcher); }
public PreparedProbe Prepare(Template probe) { PreparedProbe prepared = new PreparedProbe(); MinutiaMatcher matcher = DequeueMatcher(); try { matcher.BuildIndex(probe, prepared.ProbeIndex); } finally { EnqueueMatcher(matcher); } return(prepared); }
MinutiaMatcher DequeueMatcher() { MinutiaMatcher matcher = null; lock (Matchers) if (Matchers.Count > 0) { matcher = Matchers.Dequeue(); } if (matcher == null) { matcher = ParameterSet.ClonePrototype(MinutiaMatcher); } return(matcher); }
void EnqueueMatcher(MinutiaMatcher matcher) { lock (Matchers) Matchers.Enqueue(matcher); }