spire.math

NaturalAlgebra

class NaturalAlgebra extends NaturalIsRig with NaturalIsReal with Serializable

Annotations
@SerialVersionUID( 0L )
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NaturalAlgebra
  2. Serializable
  3. Serializable
  4. NaturalIsReal
  5. NaturalIsSigned
  6. NaturalOrder
  7. IsIntegral
  8. IsRational
  9. IsAlgebraic
  10. IsReal
  11. Signed
  12. Order
  13. PartialOrder
  14. Eq
  15. NaturalIsRig
  16. Rig
  17. MultiplicativeMonoid
  18. Semiring
  19. MultiplicativeSemigroup
  20. AdditiveMonoid
  21. AdditiveSemigroup
  22. AnyRef
  23. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NaturalAlgebra()

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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. def abs(a: Natural): Natural

    An idempotent function that ensures an object has a non-negative sign.

    An idempotent function that ensures an object has a non-negative sign.

    Definition Classes
    NaturalIsSigned → Signed
  7. def additive: Monoid[Natural]

    Definition Classes
    AdditiveMonoidAdditiveSemigroup
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def ceil(a: Natural): Natural

    Rounds a the nearest integer that is greater than or equal to a.

    Rounds a the nearest integer that is greater than or equal to a.

    Definition Classes
    IsIntegralIsReal
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compare(x: Natural, y: Natural): Int

    Definition Classes
    NaturalOrder → Order
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def eqv(x: Natural, y: Natural): Boolean

    Returns true if x and y are equivalent, false otherwise.

    Returns true if x and y are equivalent, false otherwise.

    Definition Classes
    NaturalOrder → OrderPartialOrderEq
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def floor(a: Natural): Natural

    Rounds a the nearest integer that is less than or equal to a.

    Rounds a the nearest integer that is less than or equal to a.

    Definition Classes
    IsIntegralIsReal
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def gt(x: Natural, y: Natural): Boolean

    Definition Classes
    NaturalOrder → OrderPartialOrder
  19. def gteqv(x: Natural, y: Natural): Boolean

    Definition Classes
    NaturalOrder → OrderPartialOrder
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def isOne(a: Natural)(implicit ev: Eq[Natural]): Boolean

    Definition Classes
    MultiplicativeMonoid
  23. def isSignNegative(a: Natural): Boolean

    Definition Classes
    Signed
  24. def isSignNonNegative(a: Natural): Boolean

    Definition Classes
    Signed
  25. def isSignNonPositive(a: Natural): Boolean

    Definition Classes
    Signed
  26. def isSignNonZero(a: Natural): Boolean

    Definition Classes
    Signed
  27. def isSignPositive(a: Natural): Boolean

    Definition Classes
    Signed
  28. def isSignZero(a: Natural): Boolean

    Definition Classes
    Signed
  29. def isWhole(a: Natural): Boolean

    Returns true iff a is a an integer.

    Returns true iff a is a an integer.

    Definition Classes
    IsIntegralIsReal
  30. def isZero(a: Natural)(implicit ev: Eq[Natural]): Boolean

    Tests if a is zero.

    Tests if a is zero.

    Definition Classes
    AdditiveMonoid
  31. def lt(x: Natural, y: Natural): Boolean

    Definition Classes
    NaturalOrder → OrderPartialOrder
  32. def lteqv(x: Natural, y: Natural): Boolean

    Definition Classes
    NaturalOrder → OrderPartialOrder
  33. def max(x: Natural, y: Natural): Natural

    Definition Classes
    Order
  34. def min(x: Natural, y: Natural): Natural

    Definition Classes
    Order
  35. def multiplicative: Monoid[Natural]

  36. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. def neqv(x: Natural, y: Natural): Boolean

    Returns false if x and y are equivalent, true otherwise.

    Returns false if x and y are equivalent, true otherwise.

    Definition Classes
    NaturalOrder → Eq
  38. final def notify(): Unit

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

    Definition Classes
    AnyRef
  40. def on[B](f: (B) ⇒ Natural): Order[B]

    Defines an order on B by mapping B to A using f and using As order to order B.

    Defines an order on B by mapping B to A using f and using As order to order B.

    Definition Classes
    OrderPartialOrderEq
  41. def one: Natural

    Definition Classes
    NaturalIsRig → MultiplicativeMonoid
  42. def partialCompare(x: Natural, y: Natural): Double

    Result of comparing x with y.

    Result of comparing x with y. Returns NaN if operands are not comparable. If operands are comparable, returns a Double whose sign is: - negative iff x < y - zero iff x === y - positive iff x > y

    Definition Classes
    OrderPartialOrder
  43. def plus(a: Natural, b: Natural): Natural

    Definition Classes
    NaturalIsRig → AdditiveSemigroup
  44. def pmax(x: Natural, y: Natural): Option[Natural]

    Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

    Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

    Definition Classes
    PartialOrder
  45. def pmin(x: Natural, y: Natural): Option[Natural]

    Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

    Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

    Definition Classes
    PartialOrder
  46. def pow(a: Natural, b: Int): Natural

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    This is similar to Semigroup#pow, except that a pow 0 is defined to be the multiplicative identity.

    Definition Classes
    NaturalIsRig → RigSemiring
  47. def prod(as: TraversableOnce[Natural]): Natural

    Given a sequence of as, sum them using the monoid and return the total.

    Given a sequence of as, sum them using the monoid and return the total.

    Definition Classes
    MultiplicativeMonoid
  48. def prodOption(as: TraversableOnce[Natural]): Option[Natural]

    Given a sequence of as, sum them using the semigroup and return the total.

    Given a sequence of as, sum them using the semigroup and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    MultiplicativeSemigroup
  49. def prodn(a: Natural, n: Int): Natural

    Return a multiplied with itself n times.

    Return a multiplied with itself n times.

    Definition Classes
    MultiplicativeMonoidMultiplicativeSemigroup
  50. def prodnAboveOne(a: Natural, n: Int): Natural

    Attributes
    protected
    Definition Classes
    MultiplicativeSemigroup
  51. def reverse: Order[Natural]

    Defines an ordering on A where all arrows switch direction.

    Defines an ordering on A where all arrows switch direction.

    Definition Classes
    OrderPartialOrder
  52. def round(a: Natural): Natural

    Rounds a to the nearest integer.

    Rounds a to the nearest integer.

    Definition Classes
    IsIntegralIsReal
  53. def sign(a: Natural): Sign

    Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

    Returns Zero if a is 0, Positive if a is positive, and Negative is a is negative.

    Definition Classes
    Signed
  54. def signum(a: Natural): Int

    Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.

    Returns 0 if a is 0, > 0 if a is positive, and < 0 is a is negative.

    Definition Classes
    NaturalIsSigned → Signed
  55. def sum(as: TraversableOnce[Natural]): Natural

    Given a sequence of as, sum them using the monoid and return the total.

    Given a sequence of as, sum them using the monoid and return the total.

    Definition Classes
    AdditiveMonoid
  56. def sumOption(as: TraversableOnce[Natural]): Option[Natural]

    Given a sequence of as, sum them using the semigroup and return the total.

    Given a sequence of as, sum them using the semigroup and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Definition Classes
    AdditiveSemigroup
  57. def sumn(a: Natural, n: Int): Natural

    Return a added with itself n times.

    Return a added with itself n times.

    Definition Classes
    AdditiveMonoidAdditiveSemigroup
  58. def sumnAboveOne(a: Natural, n: Int): Natural

    Attributes
    protected
    Definition Classes
    AdditiveSemigroup
  59. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  60. def times(a: Natural, b: Natural): Natural

    Definition Classes
    NaturalIsRig → MultiplicativeSemigroup
  61. def toAlgebraic(a: Natural): Algebraic

    Definition Classes
    IsRationalIsAlgebraic
  62. def toBigInt(n: Natural): BigInt

    Definition Classes
    NaturalIsReal → IsIntegral
  63. def toDouble(n: Natural): Double

    Approximates a as a Double.

    Approximates a as a Double.

    Definition Classes
    NaturalIsReal → IsReal
  64. def toRational(a: Natural): Rational

    Definition Classes
    IsIntegralIsRational
  65. def toReal(a: Natural): Real

    Definition Classes
    IsAlgebraicIsReal
  66. def toString(): String

    Definition Classes
    AnyRef → Any
  67. def tryCompare(x: Natural, y: Natural): Option[Int]

    Result of comparing x with y.

    Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is: - negative iff x < y - zero iff x == y - positive iff x > y

    Definition Classes
    PartialOrder
  68. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. def zero: Natural

    Definition Classes
    NaturalIsRig → AdditiveMonoid

Inherited from Serializable

Inherited from Serializable

Inherited from NaturalIsReal

Inherited from NaturalIsSigned

Inherited from NaturalOrder

Inherited from IsIntegral[Natural]

Inherited from IsRational[Natural]

Inherited from IsAlgebraic[Natural]

Inherited from IsReal[Natural]

Inherited from Signed[Natural]

Inherited from Order[Natural]

Inherited from PartialOrder[Natural]

Inherited from Eq[Natural]

Inherited from NaturalIsRig

Inherited from Rig[Natural]

Inherited from MultiplicativeMonoid[Natural]

Inherited from Semiring[Natural]

Inherited from AdditiveMonoid[Natural]

Inherited from AdditiveSemigroup[Natural]

Inherited from AnyRef

Inherited from Any

Ungrouped