spire.math

NaturalAlgebra

Related Doc: package math

class NaturalAlgebra extends NaturalIsRig with NaturalIsReal with Serializable

Annotations
@SerialVersionUID()
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: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  4. 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
  5. def additive: Monoid[Natural]

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

    Definition Classes
    Any
  7. 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
  8. def clone(): AnyRef

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

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

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

    Definition Classes
    AnyRef → Any
  12. 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
  13. def finalize(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

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

    Returns true iff a is a an integer.

    Returns true iff a is a an integer.

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

    Tests if a is zero.

    Tests if a is zero.

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

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

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

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

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

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

    Definition Classes
    AnyRef
  35. 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
  36. final def notify(): Unit

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

    Definition Classes
    AnyRef
  38. 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
  39. def one: Natural

    Definition Classes
    NaturalIsRig → MultiplicativeMonoid
  40. 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
  41. def plus(a: Natural, b: Natural): Natural

    Definition Classes
    NaturalIsRig → AdditiveSemigroup
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. def prodn(a: Natural, n: Int): Natural

    Return a multiplied with itself n times.

    Return a multiplied with itself n times.

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

    Attributes
    protected
    Definition Classes
    MultiplicativeSemigroup
  49. 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
  50. def round(a: Natural): Natural

    Rounds a to the nearest integer.

    Rounds a to the nearest integer.

    Definition Classes
    IsIntegralIsReal
  51. 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
  52. 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
  53. 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
  54. 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
  55. def sumn(a: Natural, n: Int): Natural

    Return a added with itself n times.

    Return a added with itself n times.

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

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

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

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

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

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

    Approximates a as a Double.

    Approximates a as a Double.

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

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

    Definition Classes
    IsAlgebraicIsReal
  64. def toString(): String

    Definition Classes
    AnyRef → Any
  65. 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
  66. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. 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