jhplot.math
Class ValueErr
- java.lang.Object
 - 
- jhplot.math.ValueErr
 
 
- 
- All Implemented Interfaces:
 - java.io.Serializable
 
public class ValueErr extends java.lang.Object implements java.io.SerializableA value represented with the number (value) and associated error. This class contains methods useful for error propagation. You can enabled fast math calculation using- See Also:
 HParam, Serialized Form
 
- 
- 
Constructor Summary
Constructors Constructor and Description ValueErr()Initialize error propagationsValueErr(double value)Initialize with value and set error=0ValueErr(double value, double error)Initialize error propagation 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ValueErracos(ValueErr a)Inverse cosine of a value with errorValueErrasin(ValueErr a)Inverse sine of a value with errordoubleasinh(double a)Inverse hyperbolic sine of a double numberValueErrasinh(ValueErr a)Inverse hyperbolic sine of a value with errorValueErratan(ValueErr a)inverse tangent of a valueValueErratan2(ValueErr a, ValueErr b)Inverse tangent (atan2) of a value without correlationsValueErratan2(ValueErr a, ValueErr b, double rho)Inverse tangent (atan2) of a value with a correlationjava.lang.Objectclone()ValueErrcopy()Copy a single ValueErrstatic ValueErrcopy(ValueErr a)Copy valueValueErr[]copy(ValueErr[] a)ValueErr[][]copy(ValueErr[][] a)Deep copy a 2D array of ValueErr numbersValueErrcos(ValueErr a)Cosine of a value wth errorValueErrcosh(ValueErr a)Hyperbolic cosineValueErrdivide(double a)Division of this ValueErr number by a doubleValueErrdivide(double a, double b)Divide a double number by a double and return quotient as ValueErrValueErrdivide(double a, ValueErr b)Division of a double, a, by a ValueErr number, bValueErrdivide(ValueErr a)Division of this ValueErr number by a ValueErr number without correlationValueErrdivide(ValueErr a, double corrCoeff)Division of this ValueErr number by a ValueErr number.ValueErrdivide(ValueErr a, ValueErr b)Division of two ValueErr numbers a/b without correlationValueErrdivide(ValueErr a, ValueErr b, double corrCoeff)Division of two ValueErr numbers a/b with correlationvoiddivideEqual(double a)Division of this ValueErr number by a double and replace this by the quotientvoiddivideEqual(ValueErr b)Division of this ValueErr number by a ValueErr number and replace it by the quotient without correlationvoiddivideEqual(ValueErr b, double corrCoeff)Division of this ValueErr number by a ValueErr number and replace this by the quotientValueErrexp(ValueErr a)Get exponential functiondoublegetErr()Get current errordoublegetVal()Get current valueinthashCode()ValueErrhypot(ValueErr a, ValueErr b)Returns the length of the hypotenuse of a and b i.e.doublehypotenuse(double aa, double bb)Returns the length of the hypotenuse of a and b i.e.ValueErrhypotenuse(ValueErr a, ValueErr b, double corrCoeff)Returns the length of the hypotenuse of a and b i.e.doublehypWithCovariance(double a, double b, double r)Private methods.ValueErrinverse()Returns the inverse (1/a) of a ValueErr numberValueErrinverse(ValueErr a)Returns the reciprocal (1/a) of a ValueErr number (a)ValueErrlog(ValueErr a)Take natural logdoublelog10(double a)ValueErrlog10(ValueErr a)log to base 10ValueErrminus(double a)Subtract an error free double number from this ValueErr number.ValueErrminus(double a, double b)Subtract an error free double number b from an error free double a and return sum as ValueErrValueErrminus(double a, ValueErr b)Subtract a ValueErr number b from an error free doubleValueErrminus(ValueErr a)Subtract a ValueErr number from this ValueErr number without correlationValueErrminus(ValueErr a, double corrCoeff)Subtract an ValueErr number from this ValueErr number with correlationValueErrminus(ValueErr a, ValueErr b)Subtract ValueErr number b from ValueErr number without correlationValueErrminus(ValueErr a, ValueErr b, double corrCoeff)Subtract ValueErr number b from ValueErr number a with correlationvoidminusEquals(double a)Subtract a double number from this ValueErr number and replace this with the sumvoidminusEquals(ValueErr a)Subtract a ValueErr number from this ValueErr number and replace this with the sum with no correlationvoidminusEquals(ValueErr a, double corrCoeff)Subtract a ValueErr number to this ValueErr number and replace this with the sum with correlationValueErrnRoot(ValueErr a, int n)Take nth root from the value (n is above 1)ValueErr[]oneDarray(int n)Create a one dimensional array of ValueErr objects of length n.ValueErr[]oneDarray(int n, ValueErr constant)Create a one dimensional array of ValueErr objects of length n and mValueErrplus(double a)Add an error free double number to this ValueErr numberValueErrplus(double a, double b)Add an error free double number to an error free double and return sumValueErrplus(double a, ValueErr b)Add a ValueErr number to an error free doubleValueErrplus(ValueErr a)Add a ValueErr number to this ValueErr number without correlatonValueErrplus(ValueErr a, double corrCoeff)Add 2 values with correlationValueErrplus(ValueErr a, ValueErr b)Add two ValueErr numbers with no correlationValueErrplus(ValueErr a, ValueErr b, double corrCoeff)Adding 2 values with correlationvoidplusEquals(double a)Add double number to this ValueErr number and replace this with the sumvoidplusEquals(ValueErr a)Add a ValueErr number to this ValueErr number and replace this with the sum without correlationvoidplusEquals(ValueErr a, double corrCoeff)Add a ValueErr number to this ValueErr number and replace this with the sum using a correlationValueErrpow(double a, ValueErr b)returns an error free number raised to an ValueErr powerValueErrpow(ValueErr a, double b)returns an ValueErr number raised to an error free powerValueErrpow(ValueErr a, ValueErr b)ValueErr number raised to a ValueErr power with no correlationValueErrpow(ValueErr a, ValueErr b, double corrCoeff)returns a ValueErr number raised to a ValueErr power with correlationvoidreset(double value, double error)Set value and errors to 0doublesec(double a)Secantdoublesech(double a)Hyperbolic secantvoidsetErr(double error)Set errorvoidsetVal(double value)Set valuedoublesign(double x)Sign functionValueErrsin(ValueErr a)sine of an ValueErr number (trigonometric function)ValueErrsinh(ValueErr a)Hyperbolic sine of a value with errorValueErrsqrt(ValueErr a)Get square root valueValueErrsquare()Squaredoublesquare(double a)ValueErrsquare(ValueErr a)SquareValueErrtan(ValueErr a)Tangent of a value with errorValueErrtanh(ValueErr a)Hyperbolic tangent of value with errorValueErrtimes(double a)Multiply this ValueErr number by a double.ValueErrtimes(double a, double b)Multiply a double number by a double and return product as ValueErrValueErrtimes(double a, ValueErr b)Multiply a double by a ValueErr numberValueErrtimes(ValueErr a)Multiply this ValueErr number by a ValueErr number without correlationValueErrtimes(ValueErr a, double corrCoeff)Multiply two ValueErr numbers with correlationValueErrtimes(ValueErr a, ValueErr b)Multiply two ValueErr numbers without correlationValueErrtimes(ValueErr a, ValueErr b, double corrCoeff)Multiply two ValueErr numbers with correlationvoidtimesEquals(double a)Multiply this ValueErr number by a double and replace it by the productvoidtimesEquals(ValueErr a)Multiply this ValueErr number by an ValueErr number and replace this by the product with no correlationvoidtimesEquals(ValueErr a, double corrCoeff)Multiply this ValueErr number by an ValueErr number and replace this by the product with correlationjava.lang.StringtoString()Convert to a stringValueErr[][]twoDarray(int n, int m)Create a two dimensional array of ValueErr objects of dimensions n and m with zerosValueErrzero()Set value to zero 
 - 
 
- 
- 
Constructor Detail
- 
ValueErr
public ValueErr()
Initialize error propagations 
- 
ValueErr
public ValueErr(double value)
Initialize with value and set error=0- Parameters:
 value-
 
- 
ValueErr
public ValueErr(double value, double error)Initialize error propagation- Parameters:
 value- valueerror- its error
 
 - 
 
- 
Method Detail
- 
setVal
public void setVal(double value)
Set value- Parameters:
 value-
 
- 
setErr
public void setErr(double error)
Set error- Parameters:
 error-
 
- 
reset
public void reset(double value, double error)Set value and errors to 0- Parameters:
 value-error-
 
- 
getVal
public double getVal()
Get current value- Returns:
 - value
 
 
- 
getErr
public double getErr()
Get current error- Returns:
 - error
 
 
- 
toString
public java.lang.String toString()
Convert to a string- Overrides:
 toStringin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
oneDarray
public ValueErr[] oneDarray(int n)
Create a one dimensional array of ValueErr objects of length n. all values are zero 
- 
oneDarray
public ValueErr[] oneDarray(int n, ValueErr constant)
Create a one dimensional array of ValueErr objects of length n and m 
- 
twoDarray
public ValueErr[][] twoDarray(int n, int m)
Create a two dimensional array of ValueErr objects of dimensions n and m with zeros 
- 
copy
public ValueErr copy()
Copy a single ValueErr 
- 
clone
public java.lang.Object clone()
- Overrides:
 clonein classjava.lang.Object
 
- 
minus
public ValueErr minus(ValueErr a, double corrCoeff)
Subtract an ValueErr number from this ValueErr number with correlation 
- 
minus
public ValueErr minus(ValueErr a, ValueErr b, double corrCoeff)
Subtract ValueErr number b from ValueErr number a with correlation 
- 
minus
public ValueErr minus(ValueErr a)
Subtract a ValueErr number from this ValueErr number without correlation 
- 
minus
public ValueErr minus(ValueErr a, ValueErr b)
Subtract ValueErr number b from ValueErr number without correlation 
- 
minus
public ValueErr minus(double a)
Subtract an error free double number from this ValueErr number. 
- 
minus
public ValueErr minus(double a, ValueErr b)
Subtract a ValueErr number b from an error free double 
- 
minus
public ValueErr minus(double a, double b)
Subtract an error free double number b from an error free double a and return sum as ValueErr 
- 
minusEquals
public void minusEquals(ValueErr a, double corrCoeff)
Subtract a ValueErr number to this ValueErr number and replace this with the sum with correlation 
- 
minusEquals
public void minusEquals(ValueErr a)
Subtract a ValueErr number from this ValueErr number and replace this with the sum with no correlation 
- 
minusEquals
public void minusEquals(double a)
Subtract a double number from this ValueErr number and replace this with the sum 
- 
plus
public ValueErr plus(ValueErr a, ValueErr b, double corrCoeff)
Adding 2 values with correlation 
- 
plus
public ValueErr plus(ValueErr a)
Add a ValueErr number to this ValueErr number without correlaton 
- 
plus
public ValueErr plus(double a)
Add an error free double number to this ValueErr number 
- 
plus
public ValueErr plus(double a, double b)
Add an error free double number to an error free double and return sum 
- 
plusEquals
public void plusEquals(ValueErr a, double corrCoeff)
Add a ValueErr number to this ValueErr number and replace this with the sum using a correlation 
- 
plusEquals
public void plusEquals(ValueErr a)
Add a ValueErr number to this ValueErr number and replace this with the sum without correlation 
- 
plusEquals
public void plusEquals(double a)
Add double number to this ValueErr number and replace this with the sum 
- 
times
public ValueErr times(ValueErr a, double corrCoeff)
Multiply two ValueErr numbers with correlation 
- 
times
public ValueErr times(ValueErr a)
Multiply this ValueErr number by a ValueErr number without correlation 
- 
times
public ValueErr times(double a)
Multiply this ValueErr number by a double. ValueErr number remains unaltered 
- 
times
public ValueErr times(ValueErr a, ValueErr b, double corrCoeff)
Multiply two ValueErr numbers with correlation 
- 
times
public ValueErr times(ValueErr a, ValueErr b)
Multiply two ValueErr numbers without correlation 
- 
times
public ValueErr times(double a, double b)
Multiply a double number by a double and return product as ValueErr 
- 
timesEquals
public void timesEquals(ValueErr a, double corrCoeff)
Multiply this ValueErr number by an ValueErr number and replace this by the product with correlation 
- 
timesEquals
public void timesEquals(ValueErr a)
Multiply this ValueErr number by an ValueErr number and replace this by the product with no correlation 
- 
timesEquals
public void timesEquals(double a)
Multiply this ValueErr number by a double and replace it by the product 
- 
divide
public ValueErr divide(ValueErr a, double corrCoeff)
Division of this ValueErr number by a ValueErr number. 
- 
divide
public ValueErr divide(ValueErr a, ValueErr b, double corrCoeff)
Division of two ValueErr numbers a/b with correlation 
- 
divide
public ValueErr divide(ValueErr a)
Division of this ValueErr number by a ValueErr number without correlation 
- 
divide
public ValueErr divide(ValueErr a, ValueErr b)
Division of two ValueErr numbers a/b without correlation 
- 
divide
public ValueErr divide(double a)
Division of this ValueErr number by a double 
- 
divide
public ValueErr divide(double a, ValueErr b)
Division of a double, a, by a ValueErr number, b 
- 
divide
public ValueErr divide(double a, double b)
Divide a double number by a double and return quotient as ValueErr 
- 
divideEqual
public void divideEqual(ValueErr b)
Division of this ValueErr number by a ValueErr number and replace it by the quotient without correlation 
- 
divideEqual
public void divideEqual(ValueErr b, double corrCoeff)
Division of this ValueErr number by a ValueErr number and replace this by the quotient 
- 
divideEqual
public void divideEqual(double a)
Division of this ValueErr number by a double and replace this by the quotient 
- 
inverse
public ValueErr inverse()
Returns the inverse (1/a) of a ValueErr number 
- 
hypotenuse
public ValueErr hypotenuse(ValueErr a, ValueErr b, double corrCoeff)
Returns the length of the hypotenuse of a and b i.e. sqrt(a*a + b*b) where a and b are ValueErr 
- 
hypotenuse
public double hypotenuse(double aa, double bb)Returns the length of the hypotenuse of a and b i.e. sqrt(a*a+b*b) 
- 
hypot
public ValueErr hypot(ValueErr a, ValueErr b)
Returns the length of the hypotenuse of a and b i.e. sqrt(a*a + b*b) where a and b are ValueErr 
- 
log10
public double log10(double a)
 
- 
square
public ValueErr square()
Square 
- 
pow
public ValueErr pow(ValueErr a, double b)
returns an ValueErr number raised to an error free power 
- 
pow
public ValueErr pow(double a, ValueErr b)
returns an error free number raised to an ValueErr power 
- 
pow
public ValueErr pow(ValueErr a, ValueErr b, double corrCoeff)
returns a ValueErr number raised to a ValueErr power with correlation 
- 
pow
public ValueErr pow(ValueErr a, ValueErr b)
ValueErr number raised to a ValueErr power with no correlation 
- 
sec
public double sec(double a)
Secant- Parameters:
 a-- Returns:
 
 
- 
square
public double square(double a)
 
- 
sech
public double sech(double a)
Hyperbolic secant 
- 
atan2
public ValueErr atan2(ValueErr a, ValueErr b)
Inverse tangent (atan2) of a value without correlations 
- 
atan2
public ValueErr atan2(ValueErr a, ValueErr b, double rho)
Inverse tangent (atan2) of a value with a correlation 
- 
asinh
public double asinh(double a)
Inverse hyperbolic sine of a double number 
- 
zero
public ValueErr zero()
Set value to zero 
- 
sign
public double sign(double x)
Sign function 
- 
hypWithCovariance
public double hypWithCovariance(double a, double b, double r)Private methods. Calculation of sqrt(a*a + b*b + 2*r*a*b) (safe) 
 - 
 
 - 
 
DMelt 3.0 © DataMelt by jWork.ORG