evalgo.algorithms
Class ClusterAlgorithm

java.lang.Object
  extended byevalgo.algorithms.AbstractAlgorithm
      extended byevalgo.algorithms.ClusterAlgorithm

public class ClusterAlgorithm
extends AbstractAlgorithm


Field Summary
(package private)  double avgMemPerComp
           
(package private)  double avgMemPerHost
           
 double compFreqFactor
           
 double compMemFactor
           
 double hostMemFactor
           
(package private)  double[] hostRelAvgs
           
 double hostRelFactor
           
(package private)  int[] hostsLeader
           
(package private)  double[][] logicalRel
           
(package private)  int numOfMappedComps
           
(package private)  int numOfMappedHosts
           
 
Fields inherited from class evalgo.algorithms.AbstractAlgorithm
avail, id, idealAvail, optimalMapping
 
Constructor Summary
ClusterAlgorithm(int en, int ka)
           
ClusterAlgorithm(int en, int ka, double a, double b, double d, double e)
           
 
Method Summary
 double calculateAvailability(int[] currMapping)
           
 AlgorithmResult execute()
           
 int findMax(double[] a, int length)
           
 double findMaxFreqOfComps()
           
 double findMaxFreqOfUnmappedComps(int[] currentlyMapped)
           
 double findMaxMemOfUnmappedComps(int[] currentlyMapped)
           
 double findMaxMemOfUnmappedHosts(int[] currentlyMappedHosts)
           
 double findMaxRelOfHosts()
           
 double findMaxRelOfUnmappedHosts(int[] currentlyMappedHosts)
           
 int findMin(double[] a, int length)
           
private  int findNextBestComp(int[] currentlyMapped, double maxMem, int currentHost)
           
private  int findNextBestHost(int[] currentlyMappedHosts)
           
 
Methods inherited from class evalgo.algorithms.AbstractAlgorithm
calculateAvgCompMem, calculateAvgHostMem, calculateAvgRelBetweenHosts, estimateOptimal, estimateRedeploymentTime, ideal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hostRelFactor

public double hostRelFactor

hostMemFactor

public double hostMemFactor

compFreqFactor

public double compFreqFactor

compMemFactor

public double compMemFactor

numOfMappedHosts

int numOfMappedHosts

numOfMappedComps

int numOfMappedComps

avgMemPerComp

double avgMemPerComp

avgMemPerHost

double avgMemPerHost

hostRelAvgs

double[] hostRelAvgs

hostsLeader

int[] hostsLeader

logicalRel

double[][] logicalRel
Constructor Detail

ClusterAlgorithm

public ClusterAlgorithm(int en,
                        int ka)

ClusterAlgorithm

public ClusterAlgorithm(int en,
                        int ka,
                        double a,
                        double b,
                        double d,
                        double e)
Method Detail

execute

public AlgorithmResult execute()
Specified by:
execute in class AbstractAlgorithm

findNextBestComp

private int findNextBestComp(int[] currentlyMapped,
                             double maxMem,
                             int currentHost)

findNextBestHost

private int findNextBestHost(int[] currentlyMappedHosts)

findMaxFreqOfComps

public double findMaxFreqOfComps()

findMaxRelOfHosts

public double findMaxRelOfHosts()

findMaxFreqOfUnmappedComps

public double findMaxFreqOfUnmappedComps(int[] currentlyMapped)

findMaxMemOfUnmappedComps

public double findMaxMemOfUnmappedComps(int[] currentlyMapped)

findMaxRelOfUnmappedHosts

public double findMaxRelOfUnmappedHosts(int[] currentlyMappedHosts)

findMaxMemOfUnmappedHosts

public double findMaxMemOfUnmappedHosts(int[] currentlyMappedHosts)

findMax

public int findMax(double[] a,
                   int length)

findMin

public int findMin(double[] a,
                   int length)

calculateAvailability

public double calculateAvailability(int[] currMapping)
Overrides:
calculateAvailability in class AbstractAlgorithm