xc
|
A LoadBalancer is an object used to balance a PartitionedDomain. More...
#include <LoadBalancer.h>
Public Member Functions | |
LoadBalancer (void) | |
Default constructor. | |
LoadBalancer (double factGreater, int releases, bool disallowDisconnected=true) | |
Constructor. More... | |
virtual void | setLinks (DomainPartitioner &thePartitioner) |
Sets the pointer to the DomainPartitioner object associated with the LoadBalancer to point to thePartitioner . More... | |
virtual int | balance (Graph &theWeightedGraph)=0 |
Each subclass must provide an implementation of this method. More... | |
Protected Member Functions | |
DomainPartitioner * | getDomainPartitioner (void) |
Returns a pointer to the DomainPartitioner. More... | |
Protected Attributes | |
int | numReleases |
double | factorGreater |
number of releases. | |
bool | disallowDisconnectedGraphs |
A LoadBalancer is an object used to balance a PartitionedDomain.
The LoadBalancer does this by invoking methods in the DomainPartitioner object with which it is associated.
XC::LoadBalancer::LoadBalancer | ( | double | factGreater, |
int | releases, | ||
bool | disallowDisconnected = true |
||
) |
Constructor.
Sets the parameters used in the balance() method.
factGreater | factor greater. |
releases | number of releases. |
|
pure virtual |
Each subclass must provide an implementation of this method.
This method is invoked to balance the PartitionedDomain. The Graph {theWeightedGraph} is a weighted graph in which the vertices represent the Subdomains, the edges Subdomains sharing common boundary nodes and the weight the cost of the previous Subdomain calculations (determined by invoking getCost() on the Subdomains).
Implemented in XC::SwapHeavierToLighterNeighbours, XC::ReleaseHeavierToLighterNeighbours, and XC::ShedHeaviest.
|
protected |
Returns a pointer to the DomainPartitioner.
If no DomainPartitioner has been set, a warning message is printed and \(0\) returned.
|
virtual |
Sets the pointer to the DomainPartitioner object associated with the LoadBalancer to point to thePartitioner
.