Algorithmix.Reconstruction.Reconstructor.BuildQueue C# (CSharp) Метод

BuildQueue() публичный статический Метод

public static BuildQueue ( List shreds ) : double>.PriorityQueue
shreds List
Результат double>.PriorityQueue
        public static PriorityQueue<MatchData, double> BuildQueue(List<Shred> shreds)
        {
            PriorityQueue<MatchData, double> queue = new PriorityQueue<MatchData, double>(PriorityQueueType.Maximum);
            foreach (Shred shred in shreds)
            {
                foreach (Shred other in shreds)
                {
                    if (shred.Id == other.Id)
                    {
                        continue;
                    }

                    MatchData matchDataForwardsRegular = MatchData.CompareShred(shred, other,
                                                                 Direction.FromRight,
                                                                 Orientation.Regular,
                                                                 Direction.FromLeft,
                                                                 Orientation.Regular);
                    MatchData matchDataBackwardsRegular = MatchData.CompareShred(shred, other,
                                                                  Direction.FromLeft,
                                                                  Orientation.Regular,
                                                                  Direction.FromRight,
                                                                  Orientation.Regular);
                    MatchData matchDataForwardsReverse = MatchData.CompareShred(shred, other,
                                                                 Direction.FromRight,
                                                                 Orientation.Reversed,
                                                                 Direction.FromLeft,
                                                                 Orientation.Regular);
                    MatchData matchDataBackwardsReverse = MatchData.CompareShred(shred, other,
                                                                  Direction.FromLeft,
                                                                  Orientation.Reversed,
                                                                  Direction.FromRight,
                                                                  Orientation.Regular);

                    queue.Enqueue(matchDataForwardsRegular, matchDataForwardsRegular.ChamferSimilarity);
                    queue.Enqueue(matchDataBackwardsRegular, matchDataBackwardsRegular.ChamferSimilarity);
                    queue.Enqueue(matchDataForwardsReverse, matchDataForwardsReverse.ChamferSimilarity);
                    queue.Enqueue(matchDataBackwardsReverse, matchDataBackwardsReverse.ChamferSimilarity);
                }
            }
            return queue;
        }