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 → Ordering

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Multiply two probabilistic numbers.

  5. def +(xp: ProbNumber): ProbNumber

    Add two probabilistic numbers.

    Add two probabilistic numbers.

    xp

    add xp to this

  6. def -(xp: ProbNumber): ProbNumber

    Substract two probabilistic numbers.

  7. def <(that: ProbNumber): Boolean

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

    Definition Classes
    Ordered
  9. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  11. def >(that: ProbNumber): Boolean

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

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

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

    Definition Classes
    Any
  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. 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
  17. 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
  18. def compareTo(that: ProbNumber): Int

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. 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
  23. 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
  24. final def getClass(): Class[_]

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

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

    Definition Classes
    Ordering → PartialOrdering
  27. def isCertain: Boolean

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

  28. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Ordering
  41. def one: ProbNumber

    Definition Classes
    Numeric
  42. val p: Double

    the probability of its occurrence [0, 1]

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    ProbNumber → Numeric
  55. 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
  56. 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
  57. 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
  58. def toLong(xp: ProbNumber): Long

    Convert the probabilistic number to a Long.

    Convert the probabilistic number to a Long.

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

    Convert this probabilistic number to a String.

    Convert this probabilistic number to a String.

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

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

    Compute the unary minus (-).

  62. final def wait(): Unit

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

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

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

    the real number (double precision)

  66. 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