All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class DSRG.VKB.QC

java.lang.Object
   |
   +----DSRG.VKB.QC

public class QC
extends Object
this class is needed to support the QC-Model. It contains the basic values to compute a QC-Value and the function to actually compute it. Currently the base values are hardcoded, that is soon to change.


Variable Index

 o CF_IO
the values for the cost dimensions
 o CF_M
the values for the cost dimensions
 o CF_T
the values for the cost dimensions
 o cost_IO
the tradeoff parameters for the cost dimensions
 o cost_M
the tradeoff parameters for the cost dimensions
 o cost_T
the tradeoff parameters for the cost dimensions
 o DD_attr
the degrees of divergence
 o DD_ext
the degrees of divergence
 o maxCost
for normalization of the cost, I'll keep a maximum cost that is used in the computation of the complete value and is global for all QC-instances
 o rho_attr
the trade-off parameters for the degrees of divergence
 o rho_cost
the tradeoff parameters for the two dimensions
 o rho_ext
the trade-off parameters for the degrees of divergence
 o rho_quality
the tradeoff parameters for the two dimensions

Constructor Index

 o QC()
This is the testing constructor.
 o QC(double, double)
This constructor takes the preset values for the tradeoff factors.
 o QC(double, double, double, double, double)
This constructor takes the preset values for the tradeoff factors including the cost tradeoff factors ("unit costs").

Method Index

 o computeOtherValues()
This method computes rho_cost and rho_ext from the other two tradeoff values
 o getCFIO()
returns the Number of I/O-Operations
 o getCFM()
returns the Number of Messages
 o getCFT()
returns the Number of Bytes Transferred
 o getCost()
gets the total cost by multiplying the costs with their cost factors and adding them.
 o getCostIO()
returns the tradeoff parameter ("unit cost") for the Number of I/O-Operations
 o getCostM()
returns the tradeoff parameter ("unit cost") for the Number of Messages
 o getCostT()
returns the tradeoff parameter ("unit cost") for the Number of Bytes Transferred
 o getDDattr()
returns the Degree of Divergence of the Attributes
 o getDDext()
returns the Degree of Divergence of the Extent
 o getQCValue()
compute the total QC-Value from the base values.
 o getQuality()
gets the total quality by multiplying the degrees of divergence with their tradeoff factors and adding them
 o getRhoAttr()
returns the tradeoff-parameter for the Degree of Divergence of the Attributes
 o getRhoCost()
returns the tradeoff-parameter for the total Cost
 o getRhoExt()
returns the tradeoff-parameter for the Degree of Divergence of the Extent
 o getRhoQuality()
returns the tradeoff-parameter for the total Degree of Divergence (Quality)
 o isQCValid()
checks if the tradeoff parameters are valid (i.e., the pairs add up to one)
 o resetMaxCost()
resets the max.cost.
 o setCF(long, long, long)
sets the three cost factors at once.
 o setDD(double, double)
sets the two Degrees of Divergence at once
 o setRandomValues()
private method during testing to set some random QC-Values
 o toString()
returns a string representation of the whole QC-object for testing purposes.

Variables

 o DD_attr
 private double DD_attr
the degrees of divergence

 o DD_ext
 private double DD_ext
the degrees of divergence

 o rho_attr
 private double rho_attr
the trade-off parameters for the degrees of divergence

 o rho_ext
 private double rho_ext
the trade-off parameters for the degrees of divergence

 o CF_T
 private long CF_T
the values for the cost dimensions

 o CF_M
 private long CF_M
the values for the cost dimensions

 o CF_IO
 private long CF_IO
the values for the cost dimensions

 o cost_T
 private double cost_T
the tradeoff parameters for the cost dimensions

 o cost_M
 private double cost_M
the tradeoff parameters for the cost dimensions

 o cost_IO
 private double cost_IO
the tradeoff parameters for the cost dimensions

 o rho_quality
 private double rho_quality
the tradeoff parameters for the two dimensions

 o rho_cost
 private double rho_cost
the tradeoff parameters for the two dimensions

 o maxCost
 private static double maxCost
for normalization of the cost, I'll keep a maximum cost that is used in the computation of the complete value and is global for all QC-instances

Constructors

 o QC
 public QC()
This is the testing constructor. Values are hardcoded and random. The total QC-Value always adds up to something between zero and one.

 o QC
 public QC(double my_rho_attr,
           double my_rho_quality)
This constructor takes the preset values for the tradeoff factors. rho_cost and rho_ext are computed from rho_quality and rho_attr, respectively.

 o QC
 public QC(double my_rho_attr,
           double my_rho_quality,
           double my_cost_M,
           double my_cost_T,
           double my_cost_IO)
This constructor takes the preset values for the tradeoff factors including the cost tradeoff factors ("unit costs"). rho_cost and rho_ext are computed from rho_quality and rho_attr, respectively.
This is the final constructor, no random values are assigned here (everything comes from the Version class)

Methods

 o computeOtherValues
 private void computeOtherValues()
This method computes rho_cost and rho_ext from the other two tradeoff values

 o setRandomValues
 private void setRandomValues()
private method during testing to set some random QC-Values

 o getQCValue
 public double getQCValue()
compute the total QC-Value from the base values. simple mult-and-add. Test QC-Value (tradeoff parameters, base values) for plausibility.

Returns:
QC-Value. -1 if QC-Value is not valid.
 o getDDattr
 public double getDDattr()
returns the Degree of Divergence of the Attributes

 o getDDext
 public double getDDext()
returns the Degree of Divergence of the Extent

 o setDD
 public boolean setDD(double myDD_attr,
                      double myDD_ext)
sets the two Degrees of Divergence at once

Returns:
QC-Validity check bit
 o getRhoAttr
 public double getRhoAttr()
returns the tradeoff-parameter for the Degree of Divergence of the Attributes

 o getRhoExt
 public double getRhoExt()
returns the tradeoff-parameter for the Degree of Divergence of the Extent

 o getCFM
 public long getCFM()
returns the Number of Messages

 o getCFT
 public long getCFT()
returns the Number of Bytes Transferred

 o getCFIO
 public long getCFIO()
returns the Number of I/O-Operations

 o setCF
 public boolean setCF(long myCF_M,
                      long myCF_T,
                      long myCF_IO)
sets the three cost factors at once.

Returns:
QC-Validity check bit
 o getCostM
 public double getCostM()
returns the tradeoff parameter ("unit cost") for the Number of Messages

 o getCostT
 public double getCostT()
returns the tradeoff parameter ("unit cost") for the Number of Bytes Transferred

 o getCostIO
 public double getCostIO()
returns the tradeoff parameter ("unit cost") for the Number of I/O-Operations

 o getRhoQuality
 public double getRhoQuality()
returns the tradeoff-parameter for the total Degree of Divergence (Quality)

 o getRhoCost
 public double getRhoCost()
returns the tradeoff-parameter for the total Cost

 o getCost
 public double getCost()
gets the total cost by multiplying the costs with their cost factors and adding them. normalizes with maxCost

 o getQuality
 public double getQuality()
gets the total quality by multiplying the degrees of divergence with their tradeoff factors and adding them

 o isQCValid
 protected boolean isQCValid()
checks if the tradeoff parameters are valid (i.e., the pairs add up to one)

 o toString
 public String toString()
returns a string representation of the whole QC-object for testing purposes. The format is QC = 1- (0.3 * ( 0.4 * 0.85 + 0.6 * 0.9 ) + 0.7 * (0.0001 * 8000 + 0.0002 * 4000 + 0.0004 * 2500)) or QC = 1- (rho_quality * ( rho_attr * DD_attr + rho_ext * DD_ext ) + rho_cost * (cost_M * CF_M + cost_T * CF_T + cost_IO * CF_IO))

Overrides:
toString in class Object
 o resetMaxCost
 public static void resetMaxCost()
resets the max.cost. To be called before the creation of a new set of QC-Values


All Packages  Class Hierarchy  This Package  Previous  Next  Index