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);
                 }
             }
         }
     }
 }
        static Dictionary <int, List <IndexedEdge> > BuildEdgeHash(FingerprintTemplate template)
        {
            var map = new Dictionary <int, List <IndexedEdge> >();

            for (int reference = 0; reference < template.Minutiae.Length; ++reference)
            {
                for (int neighbor = 0; neighbor < template.Minutiae.Length; ++neighbor)
                {
                    if (reference != neighbor)
                    {
                        var edge = new IndexedEdge(template.Minutiae, reference, neighbor);
                        foreach (int hash in ShapeCoverage(edge))
                        {
                            List <IndexedEdge> list;
                            if (!map.TryGetValue(hash, out list))
                            {
                                map[hash] = list = new List <IndexedEdge>();
                            }
                            list.Add(edge);
                        }
                    }
                }
            }
            // https://sourceafis.machinezoo.com/transparency/edge-hash
            FingerprintTransparency.Current.LogEdgeHash(map);
            return(map);
        }