edu.asu.cri.MirkE.dataStructures
Class MeasuredValue

java.lang.Object
  extended byedu.asu.cri.MirkE.dataStructures.UnitValue
      extended byedu.asu.cri.MirkE.dataStructures.MeasuredValue

public class MeasuredValue
extends UnitValue

A UnitValue along with a first statistical moment (standard deviation) TODO - add support to store and propagate arbitrary moments


Constructor Summary
MeasuredValue()
          default constructor
MeasuredValue(double value, double standardDeviation, Unit units)
          constructor
MeasuredValue(java.lang.Double value, java.lang.Double standardDeviation, Unit units)
          constructor
MeasuredValue(UnitValue unitValue)
          constructor
 
Method Summary
 MeasuredValue add(MeasuredValue measuredValue)
          add a MeasuredValue to this and return the sum (if it exists)
 MeasuredValue add(UnitValue unitValue)
          add a MeasuredValue to this and return the sum (if it exists)
 MeasuredValue divide(MeasuredValue measuredValue)
          divide this by a MeasuredValue and return the result
 boolean equals(java.lang.Object object)
           
 double getStandardDeviation()
           
 MeasuredValue multiply(double scalarMultiplier)
          multiply a double to this and return the product
 MeasuredValue multiply(MeasuredValue measuredValue)
          multiply a MeasuredValue to this and return the product
 MeasuredValue raiseToPower(double power)
          return the nth power of this MeasuredValue
 void setStandardDeviation(double standardDeviation)
           
 MeasuredValue subtract(MeasuredValue measuredValue)
          subtract a MeasuredValue from this and return the difference (if it exists)
 MeasuredValue subtract(UnitValue unitValue)
          add a MeasuredValue to this and return the sum (if it exists)
 java.lang.String toString()
           
 
Methods inherited from class edu.asu.cri.MirkE.dataStructures.UnitValue
getId, getUnits, getValue, isEditable, setEditable, setId, setUnits, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MeasuredValue

public MeasuredValue()
default constructor


MeasuredValue

public MeasuredValue(double value,
                     double standardDeviation,
                     Unit units)
constructor

Parameters:
value -
standardDeviation -
units -

MeasuredValue

public MeasuredValue(java.lang.Double value,
                     java.lang.Double standardDeviation,
                     Unit units)
constructor

Parameters:
value -
standardDeviation -
units -

MeasuredValue

public MeasuredValue(UnitValue unitValue)
constructor

Parameters:
unitValue -
Method Detail

add

public MeasuredValue add(MeasuredValue measuredValue)
add a MeasuredValue to this and return the sum (if it exists)

Parameters:
measuredValue -
Returns:
sum of this and measuredValue

add

public MeasuredValue add(UnitValue unitValue)
add a MeasuredValue to this and return the sum (if it exists)

Parameters:
unitValue -
Returns:
sum of this and unitValue

subtract

public MeasuredValue subtract(UnitValue unitValue)
add a MeasuredValue to this and return the sum (if it exists)

Parameters:
unitValue -
Returns:
sum of this and unitValue

subtract

public MeasuredValue subtract(MeasuredValue measuredValue)
subtract a MeasuredValue from this and return the difference (if it exists)

Parameters:
measuredValue -
Returns:
differenceMeasuredValue

multiply

public MeasuredValue multiply(double scalarMultiplier)
multiply a double to this and return the product

Parameters:
scalarMultiplier -
Returns:
productMeasuredValue

multiply

public MeasuredValue multiply(MeasuredValue measuredValue)
multiply a MeasuredValue to this and return the product

Parameters:
measuredValue -
Returns:
productMeasuredValue

divide

public MeasuredValue divide(MeasuredValue measuredValue)
divide this by a MeasuredValue and return the result

Parameters:
measuredValue -
Returns:
this / measuredValue

raiseToPower

public MeasuredValue raiseToPower(double power)
return the nth power of this MeasuredValue

Parameters:
power -
Returns:
powerOfMeasuredValue

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class UnitValue
See Also:
Object.equals(java.lang.Object)

setStandardDeviation

public void setStandardDeviation(double standardDeviation)
Parameters:
standardDeviation -

getStandardDeviation

public double getStandardDeviation()
Returns:
standardDeviation

toString

public java.lang.String toString()
Overrides:
toString in class UnitValue
Returns:
stringValue


Copyright © 2004-2005 Arizona State University - Cancer Research Institute - hosted by Sourceforge. All Rights Reserved.