Documentation of 'org.jlab.groot.math.StatNumber' Java class
StatNumber
org.jlab.groot.math

Class StatNumber



  • public class StatNumber
    extends java.lang.Object
    Creates a StatNumber object with a number and an error.
    • Constructor Summary

      Constructors 
      Constructor and Description
      StatNumber()
      Creates a default StatNumber object with a number and error set to 0.0.
      StatNumber(double num)
      Creates a StatNumber object with the specified number and calculates its error.
      StatNumber(double num, double err)
      Creates a StatNumber object with the specified number and error.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(StatNumber num)
      Adds two StatNumber objects.
      void divide(StatNumber num)
      Divides the current object by the parameter StatNumber
      double error() 
      void multiply(StatNumber num)
      Multiplies the parameter and the current StatNumber
      double number() 
      void set(double num, double err)
      Sets the number and error of the StatNumber object
      void subtract(StatNumber num)
      Subtracts the parameter from the current object
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StatNumber

        public StatNumber()
        Creates a default StatNumber object with a number and error set to 0.0.
      • StatNumber

        public StatNumber(double num,
                          double err)
        Creates a StatNumber object with the specified number and error.
        Parameters:
        num - The number
        err - The error
      • StatNumber

        public StatNumber(double num)
        Creates a StatNumber object with the specified number and calculates its error.
        Parameters:
        num - What number to store in the StatNumber object.
    • Method Detail

      • set

        public void set(double num,
                        double err)
        Sets the number and error of the StatNumber object
        Parameters:
        num - What to set the number to
        err - What to set the error to
      • number

        public double number()
        Returns:
        the number stored in the StatNumber object.
      • error

        public double error()
        Returns:
        the error stored in the StatNumber object.
      • add

        public void add(StatNumber num)
        Adds two StatNumber objects.
        Parameters:
        num - The StatNumber to add to this object.
      • divide

        public void divide(StatNumber num)
        Divides the current object by the parameter StatNumber
        Parameters:
        num - The StatNumber to divide this object by
      • multiply

        public void multiply(StatNumber num)
        Multiplies the parameter and the current StatNumber
        Parameters:
        num - The StatNumber object to multiply this object by
      • subtract

        public void subtract(StatNumber num)
        Subtracts the parameter from the current object
        Parameters:
        num - The StatNumber to subtract from the current StatNumber object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.