Smrf.NodeXL.Algorithms.ClusterCalculator.InitializeDeltaQs C# (CSharp) Méthode

InitializeDeltaQs() protected méthode

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

        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);
            }
        }
    }