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