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.
-
CF_IO
- the values for the cost dimensions
-
CF_M
- the values for the cost dimensions
-
CF_T
- the values for the cost dimensions
-
cost_IO
- the tradeoff parameters for the cost dimensions
-
cost_M
- the tradeoff parameters for the cost dimensions
-
cost_T
- the tradeoff parameters for the cost dimensions
-
DD_attr
-
the degrees of divergence
-
DD_ext
-
the degrees of divergence
-
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
-
rho_attr
- the trade-off parameters for the degrees of divergence
-
rho_cost
- the tradeoff parameters for the two dimensions
-
rho_ext
- the trade-off parameters for the degrees of divergence
-
rho_quality
- the tradeoff parameters for the two dimensions
-
QC()
- This is the testing constructor.
-
QC(double, double)
- This constructor takes the preset values for the tradeoff
factors.
-
QC(double, double, double, double, double)
- This constructor takes the preset values for the tradeoff
factors including the cost tradeoff factors ("unit
costs").
-
computeOtherValues()
-
This method computes rho_cost and rho_ext from the other two
tradeoff values
-
getCFIO()
- returns the Number of I/O-Operations
-
getCFM()
- returns the Number of Messages
-
getCFT()
- returns the Number of Bytes Transferred
-
getCost()
-
gets the total cost by multiplying the costs with their cost
factors and adding them.
-
getCostIO()
- returns the tradeoff parameter ("unit cost") for the Number of
I/O-Operations
-
getCostM()
- returns the tradeoff parameter ("unit cost") for the Number of
Messages
-
getCostT()
- returns the tradeoff parameter ("unit cost") for the Number of
Bytes Transferred
-
getDDattr()
- returns the Degree of Divergence of the Attributes
-
getDDext()
- returns the Degree of Divergence of the Extent
-
getQCValue()
- compute the total QC-Value from the base values.
-
getQuality()
-
gets the total quality by multiplying the degrees of divergence
with their tradeoff factors and adding them
-
getRhoAttr()
- returns the tradeoff-parameter for the Degree of Divergence of
the Attributes
-
getRhoCost()
- returns the tradeoff-parameter for the total Cost
-
getRhoExt()
- returns the tradeoff-parameter for the Degree of Divergence of
the Extent
-
getRhoQuality()
- returns the tradeoff-parameter for the total Degree of
Divergence (Quality)
-
isQCValid()
- checks if the tradeoff parameters are valid (i.e., the pairs
add up to one)
-
resetMaxCost()
- resets the max.cost.
-
setCF(long, long, long)
- sets the three cost factors at once.
-
setDD(double, double)
- sets the two Degrees of Divergence at once
-
setRandomValues()
-
private method during testing to set some random QC-Values
-
toString()
- returns a string representation of the whole QC-object for
testing purposes.
DD_attr
private double DD_attr
- the degrees of divergence
DD_ext
private double DD_ext
- the degrees of divergence
rho_attr
private double rho_attr
- the trade-off parameters for the degrees of divergence
rho_ext
private double rho_ext
- the trade-off parameters for the degrees of divergence
CF_T
private long CF_T
- the values for the cost dimensions
CF_M
private long CF_M
- the values for the cost dimensions
CF_IO
private long CF_IO
- the values for the cost dimensions
cost_T
private double cost_T
- the tradeoff parameters for the cost dimensions
cost_M
private double cost_M
- the tradeoff parameters for the cost dimensions
cost_IO
private double cost_IO
- the tradeoff parameters for the cost dimensions
rho_quality
private double rho_quality
- the tradeoff parameters for the two dimensions
rho_cost
private double rho_cost
- the tradeoff parameters for the two dimensions
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
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.
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.
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)
computeOtherValues
private void computeOtherValues()
- This method computes rho_cost and rho_ext from the other two
tradeoff values
setRandomValues
private void setRandomValues()
- private method during testing to set some random QC-Values
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.
getDDattr
public double getDDattr()
- returns the Degree of Divergence of the Attributes
getDDext
public double getDDext()
- returns the Degree of Divergence of the Extent
setDD
public boolean setDD(double myDD_attr,
double myDD_ext)
- sets the two Degrees of Divergence at once
- Returns:
- QC-Validity check bit
getRhoAttr
public double getRhoAttr()
- returns the tradeoff-parameter for the Degree of Divergence of
the Attributes
getRhoExt
public double getRhoExt()
- returns the tradeoff-parameter for the Degree of Divergence of
the Extent
getCFM
public long getCFM()
- returns the Number of Messages
getCFT
public long getCFT()
- returns the Number of Bytes Transferred
getCFIO
public long getCFIO()
- returns the Number of I/O-Operations
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
getCostM
public double getCostM()
- returns the tradeoff parameter ("unit cost") for the Number of
Messages
getCostT
public double getCostT()
- returns the tradeoff parameter ("unit cost") for the Number of
Bytes Transferred
getCostIO
public double getCostIO()
- returns the tradeoff parameter ("unit cost") for the Number of
I/O-Operations
getRhoQuality
public double getRhoQuality()
- returns the tradeoff-parameter for the total Degree of
Divergence (Quality)
getRhoCost
public double getRhoCost()
- returns the tradeoff-parameter for the total Cost
getCost
public double getCost()
- gets the total cost by multiplying the costs with their cost
factors and adding them. normalizes with maxCost
getQuality
public double getQuality()
- gets the total quality by multiplying the degrees of divergence
with their tradeoff factors and adding them
isQCValid
protected boolean isQCValid()
- checks if the tradeoff parameters are valid (i.e., the pairs
add up to one)
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
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