Packages

c

scalation.math

ProbNum

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

The ProbNum 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[ProbNum], Comparable[ProbNum], Numeric[ProbNum], Ordering[ProbNum], PartialOrdering[ProbNum], Equiv[ProbNum], Serializable, Serializable, Comparator[ProbNum], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProbNum
  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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProbNum(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: ProbNum): ProbNum

    Multiply two probabilistic numbers.

    Multiply two probabilistic numbers.

    xp

    multiply this times 'xp'

  4. def +(xp: ProbNum): ProbNum

    Add two probabilistic numbers.

    Add two probabilistic numbers.

    xp

    add 'xp' to this

  5. def -(xp: ProbNum): ProbNum

    Subtract two probabilistic numbers.

    Subtract two probabilistic numbers.

    xp

    subtract 'xp' from this

  6. def <(that: ProbNum): Boolean
    Definition Classes
    Ordered
  7. def <=(that: ProbNum): Boolean
    Definition Classes
    Ordered
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def >(that: ProbNum): Boolean
    Definition Classes
    Ordered
  10. def >=(that: ProbNum): Boolean
    Definition Classes
    Ordered
  11. def abs(x: ProbNum): ProbNum
    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: ProbNum): 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
    ProbNum → Ordered
  15. def compare(xp: ProbNum, yq: ProbNum): 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
    ProbNum → Ordering → Comparator
  16. def compareTo(that: ProbNum): Int
    Definition Classes
    Ordered → Comparable
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equiv(x: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering → Equiv
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final 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): ProbNum

    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
    ProbNum → Numeric
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  23. def gt(x: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  24. def gteq(x: ProbNum, y: ProbNum): 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: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  28. def lteq(x: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  29. def max(x: ProbNum, y: ProbNum): ProbNum
    Definition Classes
    Ordering
  30. def min(x: ProbNum, y: ProbNum): ProbNum
    Definition Classes
    Ordering
  31. def minus(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  32. implicit def mkNumericOps(lhs: ProbNum): Ops
    Definition Classes
    Numeric
  33. implicit def mkOrderingOps(lhs: ProbNum): ProbNum.Ops
    Definition Classes
    Ordering
  34. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  35. def negate(xp: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  36. final def notify(): Unit
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  38. def on[U](f: (U) ⇒ ProbNum): Ordering[U]
    Definition Classes
    Ordering
  39. def one: ProbNum
    Definition Classes
    Numeric
  40. val p: Double
  41. def plus(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  42. def reverse: Ordering[ProbNum]
    Definition Classes
    Ordering → PartialOrdering
  43. def reversed(): Comparator[ProbNum]
    Definition Classes
    Comparator
  44. def signum(x: ProbNum): Int
    Definition Classes
    Numeric
  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. def thenComparing[U <: Comparable[_ >: U]](arg0: Function[_ >: ProbNum, _ <: U]): Comparator[ProbNum]
    Definition Classes
    Comparator
  47. def thenComparing[U](arg0: Function[_ >: ProbNum, _ <: U], arg1: Comparator[_ >: U]): Comparator[ProbNum]
    Definition Classes
    Comparator
  48. def thenComparing(arg0: Comparator[_ >: ProbNum]): Comparator[ProbNum]
    Definition Classes
    Comparator
  49. def thenComparingDouble(arg0: ToDoubleFunction[_ >: ProbNum]): Comparator[ProbNum]
    Definition Classes
    Comparator
  50. def thenComparingInt(arg0: ToIntFunction[_ >: ProbNum]): Comparator[ProbNum]
    Definition Classes
    Comparator
  51. def thenComparingLong(arg0: ToLongFunction[_ >: ProbNum]): Comparator[ProbNum]
    Definition Classes
    Comparator
  52. def times(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  53. def toDouble(xp: ProbNum): Double

    Convert the probabilistic number to a Double.

    Convert the probabilistic number to a Double.

    xp

    the probabilistic number to convert

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

    Convert the probabilistic number to a Float.

    Convert the probabilistic number to a Float.

    xp

    the probabilistic number to convert

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

    Convert the probabilistic number to an Int.

    Convert the probabilistic number to an Int.

    xp

    the probabilistic number to convert

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

    Convert the probabilistic number to a Long.

    Convert the probabilistic number to a Long.

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

    Convert this probabilistic number to a String.

    Convert this probabilistic number to a String.

    Definition Classes
    ProbNum → AnyRef → Any
  58. def tryCompare(x: ProbNum, y: ProbNum): Some[Int]
    Definition Classes
    Ordering → PartialOrdering
  59. def unary_-(): ProbNum

    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
  64. def zero: ProbNum
    Definition Classes
    Numeric

Inherited from Product

Inherited from Equals

Inherited from Error

Inherited from Ordered[ProbNum]

Inherited from Comparable[ProbNum]

Inherited from Numeric[ProbNum]

Inherited from Ordering[ProbNum]

Inherited from PartialOrdering[ProbNum]

Inherited from Equiv[ProbNum]

Inherited from Serializable

Inherited from Serializable

Inherited from Comparator[ProbNum]

Inherited from AnyRef

Inherited from Any

Ungrouped