Packages

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, 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. Comparator
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 NumericOps extends AnyRef
    Definition Classes
    Numeric
  2. class OrderingOps extends AnyRef
    Definition Classes
    Ordering

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  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. 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
  20. 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
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def gt(x: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  23. def gteq(x: ProbNum, y: ProbNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  24. def isCertain: Boolean

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

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def isReverseOf(other: Ordering[_]): Boolean
    Definition Classes
    Ordering
  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[U <: ProbNum](x: U, y: U): U
    Definition Classes
    Ordering
  30. def min[U <: ProbNum](x: U, y: U): U
    Definition Classes
    Ordering
  31. def minus(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  32. implicit def mkNumericOps(lhs: ProbNum): NumericOps
    Definition Classes
    Numeric
  33. implicit def mkOrderingOps(lhs: ProbNum): OrderingOps
    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
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  38. def on[U](f: (U) => ProbNum): Ordering[U]
    Definition Classes
    Ordering
  39. def one: ProbNum
    Definition Classes
    Numeric
  40. def orElse(other: Ordering[ProbNum]): Ordering[ProbNum]
    Definition Classes
    Ordering
  41. def orElseBy[S](f: (ProbNum) => S)(implicit ord: Ordering[S]): Ordering[ProbNum]
    Definition Classes
    Ordering
  42. val p: Double
  43. def parseString(str: String): Option[ProbNum]

    Parse the string to create a complex number.

    Parse the string to create a complex number.

    Definition Classes
    ProbNum → Numeric
  44. def plus(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  45. def productElementNames: Iterator[String]
    Definition Classes
    Product
  46. def reverse: Ordering[ProbNum]
    Definition Classes
    Ordering → PartialOrdering
  47. def reversed(): Comparator[ProbNum]
    Definition Classes
    Comparator
  48. def sign(x: ProbNum): ProbNum
    Definition Classes
    Numeric
  49. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  50. def thenComparing[U <: Comparable[_ >: U <: AnyRef]](arg0: Function[_ >: ProbNum <: AnyRef, _ <: U]): Comparator[ProbNum]
    Definition Classes
    Comparator
  51. def thenComparing[U <: AnyRef](arg0: Function[_ >: ProbNum <: AnyRef, _ <: U], arg1: Comparator[_ >: U <: AnyRef]): Comparator[ProbNum]
    Definition Classes
    Comparator
  52. def thenComparing(arg0: Comparator[_ >: ProbNum <: AnyRef]): Comparator[ProbNum]
    Definition Classes
    Comparator
  53. def thenComparingDouble(arg0: ToDoubleFunction[_ >: ProbNum <: AnyRef]): Comparator[ProbNum]
    Definition Classes
    Comparator
  54. def thenComparingInt(arg0: ToIntFunction[_ >: ProbNum <: AnyRef]): Comparator[ProbNum]
    Definition Classes
    Comparator
  55. def thenComparingLong(arg0: ToLongFunction[_ >: ProbNum <: AnyRef]): Comparator[ProbNum]
    Definition Classes
    Comparator
  56. def times(xp: ProbNum, yq: ProbNum): ProbNum
    Definition Classes
    ProbNum → Numeric
  57. 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
  58. 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
  59. 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
  60. def toLong(xp: ProbNum): Long

    Convert the probabilistic number to a Long.

    Convert the probabilistic number to a Long.

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

    Convert this probabilistic number to a String.

    Convert this probabilistic number to a String.

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

    Compute the unary minus (-).

  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  66. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. val x: Double
  68. def zero: ProbNum
    Definition Classes
    Numeric

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def signum(x: ProbNum): Int
    Definition Classes
    Numeric
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) use sign method instead

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 Comparator[ProbNum]

Inherited from AnyRef

Inherited from Any

Ungrouped