Analyzer.WakitaTsurumiClusterDetector.InitializeDeltaQs C# (CSharp) Method

InitializeDeltaQs() protected method

protected InitializeDeltaQs ( LinkedList oCommunities, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph ) : void
oCommunities LinkedList
oDeltaQMaxHeap DeltaQMaxHeap
iEdgesInGraph System.Int32
return void
        protected void InitializeDeltaQs
            (LinkedList<Community> oCommunities, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph)
        {
            Debug.Assert(oCommunities != null);
            Debug.Assert(oDeltaQMaxHeap != null);
            Debug.Assert(iEdgesInGraph > 0);

            foreach (Community oCommunity in oCommunities)
            {
                // Initialize the delta Q values for the community.

                oCommunity.InitializeDeltaQs(oCommunities, iEdgesInGraph);

                Single fMaximumDeltaQ = oCommunity.MaximumDeltaQ;

                if (fMaximumDeltaQ != Community.DeltaQNotSet)
                {
                    // Store the community's maximum delta Q on the max heap.

                    oDeltaQMaxHeap.Add(oCommunity, fMaximumDeltaQ);
                }
            }
        }