scalation.math

ProbNumber

case class ProbNumber(x: Double, p: Double = 1.0) extends Numeric[ProbNumber] with Ordered[ProbNumber] with Error with Product with Serializable

The ProbNumber class is used to represent probabilistic numbers '(x, p)' where 'x' is a real number and 'p' is its probability of occurrence. FIX: Currently this class is half-baked!!!

x

the real number (double precision)

p

the probability of its occurrence [0, 1]

See also

http://okmij.org/ftp/Computation/monads.html#random-var-monad

Linear Supertypes
Product, Equals, Error, Ordered[ProbNumber], Comparable[ProbNumber], Numeric[ProbNumber], Ordering[ProbNumber], PartialOrdering[ProbNumber], Equiv[ProbNumber], Serializable, Serializable, Comparator[ProbNumber], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ProbNumber
  2. Product
  3. Equals
  4. Error
  5. Ordered
  6. Comparable
  7. Numeric
  8. Ordering
  9. PartialOrdering
  10. Equiv
  11. Serializable
  12. Serializable
  13. Comparator
  14. AnyRef
  15. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProbNumber(x: Double, p: Double = 1.0)

    x

    the real number (double precision)

    p

    the probability of its occurrence [0, 1]

Type Members

  1. class Ops extends AnyRef

    Definition Classes
    Numeric

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def *(xp: ProbNumber): ProbNumber

    Multiply two probabilistic numbers.

    Multiply two probabilistic numbers.

    xp

    multiply this times xp

  4. def +(xp: ProbNumber): ProbNumber

    Add two probabilistic numbers.

    Add two probabilistic numbers.

    xp

    add xp to this

  5. def -(xp: ProbNumber): ProbNumber

    Substract two probabilistic numbers.

    Substract two probabilistic numbers.

    xp

    subtract xp from this

  6. def <(that: ProbNumber): Boolean

    Definition Classes
    Ordered
  7. def <=(that: ProbNumber): Boolean

    Definition Classes
    Ordered
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def >(that: ProbNumber): Boolean

    Definition Classes
    Ordered
  10. def >=(that: ProbNumber): Boolean

    Definition Classes
    Ordered
  11. def abs(x: ProbNumber): ProbNumber

    Definition Classes
    Numeric
  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compare(yq: ProbNumber): Int

    Compare this probabilistic number with that probabilistic number yq.

    Compare this probabilistic number with that probabilistic number yq.

    yq

    that probabilistic number

    Definition Classes
    ProbNumber → Ordered
  15. def compare(xp: ProbNumber, yq: ProbNumber): Int

    Compare two probabilistic numbers (negative for <, zero for ==, positive for >).

    Compare two probabilistic numbers (negative for <, zero for ==, positive for >).

    xp

    the first probabilistic number to compare

    yq

    the second probabilistic number to compare

    Definition Classes
    ProbNumber → Ordering → Comparator
  16. def compareTo(that: ProbNumber): Int

    Definition Classes
    Ordered → Comparable
  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equiv(x: ProbNumber, y: ProbNumber): Boolean

    Definition Classes
    Ordering → PartialOrdering → Equiv
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  21. def fromInt(n: Int): ProbNumber

    Create a probabilistic number from an Int.

    Create a probabilistic number from an Int.

    n

    the integer used to create the probabilistic number.

    Definition Classes
    ProbNumber → Numeric
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def gt(x: ProbNumber, y: ProbNumber): Boolean

    Definition Classes
    Ordering → PartialOrdering
  24. def gteq(x: ProbNumber, y: ProbNumber): Boolean

    Definition Classes
    Ordering → PartialOrdering
  25. def isCertain: Boolean

    Determine whether the probabilistic number is certain (probability = 1).

  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def lt(x: ProbNumber, y: ProbNumber): Boolean

    Definition Classes
    Ordering → PartialOrdering
  28. def lteq(x: ProbNumber, y: ProbNumber): Boolean

    Definition Classes
    Ordering → PartialOrdering
  29. def max(x: ProbNumber, y: ProbNumber): ProbNumber

    Definition Classes
    Ordering
  30. def min(x: ProbNumber, y: ProbNumber): ProbNumber

    Definition Classes
    Ordering
  31. def minus(xp: ProbNumber, yq: ProbNumber): ProbNumber

    Definition Classes
    ProbNumber → Numeric
  32. implicit def mkNumericOps(lhs: ProbNumber): Ops

    Definition Classes
    Numeric
  33. implicit def mkOrderingOps(lhs: ProbNumber): ProbNumber.Ops

    Definition Classes
    Ordering
  34. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. def negate(xp: ProbNumber): ProbNumber

    Definition Classes
    ProbNumber → Numeric
  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def on[U](f: (U) ⇒ ProbNumber): Ordering[U]

    Definition Classes
    Ordering
  39. def one: ProbNumber

    Definition Classes
    Numeric
  40. val p: Double

    the probability of its occurrence [0, 1]

  41. def plus(xp: ProbNumber, yq: ProbNumber): ProbNumber

    Definition Classes
    ProbNumber → Numeric
  42. def reverse: Ordering[ProbNumber]

    Definition Classes
    Ordering → PartialOrdering
  43. def reversed(): Comparator[ProbNumber]

    Definition Classes
    Comparator
  44. def signum(x: ProbNumber): Int

    Definition Classes
    Numeric
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def thenComparing[U <: Comparable[_ >: U]](arg0: Function[_ >: ProbNumber, _ <: U]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  47. def thenComparing[U](arg0: Function[_ >: ProbNumber, _ <: U], arg1: Comparator[_ >: U]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  48. def thenComparing(arg0: Comparator[_ >: ProbNumber]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  49. def thenComparingDouble(arg0: ToDoubleFunction[_ >: ProbNumber]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  50. def thenComparingInt(arg0: ToIntFunction[_ >: ProbNumber]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  51. def thenComparingLong(arg0: ToLongFunction[_ >: ProbNumber]): Comparator[ProbNumber]

    Definition Classes
    Comparator
  52. def times(xp: ProbNumber, yq: ProbNumber): ProbNumber

    Definition Classes
    ProbNumber → Numeric
  53. def toDouble(xp: ProbNumber): Double

    Convert the probabilistic number to a Double.

    Convert the probabilistic number to a Double.

    xp

    the probabilistic number to convert

    Definition Classes
    ProbNumber → Numeric
  54. def toFloat(xp: ProbNumber): Float

    Convert the probabilistic number to a Float.

    Convert the probabilistic number to a Float.

    xp

    the probabilistic number to convert

    Definition Classes
    ProbNumber → Numeric
  55. def toInt(xp: ProbNumber): Int

    Convert the probabilistic number to an Int.

    Convert the probabilistic number to an Int.

    xp

    the probabilistic number to convert

    Definition Classes
    ProbNumber → Numeric
  56. def toLong(xp: ProbNumber): Long

    Convert the probabilistic number to a Long.

    Convert the probabilistic number to a Long.

    Definition Classes
    ProbNumber → Numeric
  57. def toString(): String

    Convert this probabilistic number to a String.

    Convert this probabilistic number to a String.

    Definition Classes
    ProbNumber → AnyRef → Any
  58. def tryCompare(x: ProbNumber, y: ProbNumber): Some[Int]

    Definition Classes
    Ordering → PartialOrdering
  59. def unary_-(): ProbNumber

    Compute the unary minus (-).

  60. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. val x: Double

    the real number (double precision)

  64. def zero: ProbNumber

    Definition Classes
    Numeric

Inherited from Product

Inherited from Equals

Inherited from Error

Inherited from Ordered[ProbNumber]

Inherited from Comparable[ProbNumber]

Inherited from Numeric[ProbNumber]

Inherited from Ordering[ProbNumber]

Inherited from PartialOrdering[ProbNumber]

Inherited from Equiv[ProbNumber]

Inherited from Serializable

Inherited from Serializable

Inherited from Comparator[ProbNumber]

Inherited from AnyRef

Inherited from Any

Ungrouped