private void BuildEdgeHash() { for (var referenceMinutia = 0; referenceMinutia < Template.Minutiae.Count; ++referenceMinutia) { for (var neighborMinutia = 0; neighborMinutia < Template.Minutiae.Count; ++neighborMinutia) { if (referenceMinutia != neighborMinutia) { var edge = new IndexedEdge { Shape = new EdgeShape(Template, referenceMinutia, neighborMinutia), Reference = referenceMinutia, Neighbor = neighborMinutia }; foreach (var hash in GetShapeCoverage(edge.Shape)) { if (!EdgeHash.TryGetValue(hash, out var list)) { EdgeHash[hash] = list = new List <IndexedEdge>(); } list.Add(edge); } } } } }
void BuildEdgeHash() { for (int referenceMinutia = 0; referenceMinutia < Template.Minutiae.Count; ++referenceMinutia) for (int neighborMinutia = 0; neighborMinutia < Template.Minutiae.Count; ++neighborMinutia) if (referenceMinutia != neighborMinutia) { var edge = new IndexedEdge() { Shape = new EdgeShape(Template, referenceMinutia, neighborMinutia), Reference = referenceMinutia, Neighbor = neighborMinutia }; foreach (var hash in GetShapeCoverage(edge.Shape)) { List<IndexedEdge> list; if (!EdgeHash.TryGetValue(hash, out list)) EdgeHash[hash] = list = new List<IndexedEdge>(); list.Add(edge); } } }
public PolygonEdgePair(ConvexPolygon polygon, IndexedEdge edge) { Polygon = polygon; Edge = edge; }