spire

algebra

package algebra

Visibility
  1. Public
  2. All

Type Members

  1. trait AbGroup[A] extends Group[A] with CMonoid[A]

    An abelian group is a group whose operation is commutative.

  2. trait AdditiveAbGroup[A] extends AdditiveGroup[A] with AdditiveCMonoid[A]

  3. trait AdditiveCMonoid[A] extends AdditiveMonoid[A] with AdditiveCSemigroup[A]

  4. trait AdditiveCSemigroup[A] extends AdditiveSemigroup[A]

  5. trait AdditiveGroup[A] extends AdditiveMonoid[A]

  6. trait AdditiveGroupAction[P, G] extends AnyRef

  7. trait AdditiveMonoid[A] extends AdditiveSemigroup[A]

  8. trait AdditiveSemigroup[A] extends AnyRef

  9. trait AdditiveTorsor[V, R] extends AdditiveGroupAction[V, R]

  10. trait BooleanAlgebra[A] extends AnyRef

    A boolean algebra is a structure that defines a few basic operations, namely as conjunction (&), disjunction (|), and negation (~).

    A boolean algebra is a structure that defines a few basic operations, namely as conjunction (&), disjunction (|), and negation (~). Both conjunction and disjunction must be associative, commutative and should distribute over each other. Also, both have an identity and they obey the absorption law; that is x & (y | x) == x and x | (x & y) == x.

  11. trait CMonoid[A] extends Monoid[A] with CSemigroup[A]

    CMonoid represents a commutative monoid.

    CMonoid represents a commutative monoid.

    A monoid is commutative if for all x and y, x |+| y === y |+| x.

  12. trait CRig[A] extends Rig[A] with MultiplicativeCMonoid[A]

    CRig is a Rig that is commutative under multiplication.

  13. trait CRing[A] extends Ring[A] with MultiplicativeCMonoid[A]

    CRing is a Ring that is commutative under multiplication.

  14. trait CSemigroup[A] extends Semigroup[A]

    CSemigroup represents a commutative semigroup.

    CSemigroup represents a commutative semigroup.

    A semigroup is commutative if for all x and y, x |+| y === y |+| x.

  15. trait CoordinateSpace[V, F] extends InnerProductSpace[V, F]

  16. trait Eq[A] extends AnyRef

    A type class used to determine equality between 2 instances of the same type.

    A type class used to determine equality between 2 instances of the same type. Any 2 instances x and y are equal if eqv(x, y) is true. Moreover, eqv should form an equivalence relation.

  17. trait EuclideanRing[A] extends CRing[A]

  18. trait Field[A] extends EuclideanRing[A] with MultiplicativeAbGroup[A]

  19. trait FieldAlgebra[V, F] extends RingAlgebra[V, F] with VectorSpace[V, F]

    A FieldAlgebra is a vector space that is also a Ring.

    A FieldAlgebra is a vector space that is also a Ring. An example is the complex numbers.

  20. trait Group[A] extends Monoid[A]

    A group is a monoid where each element has an inverse.

  21. trait GroupAction[P, G] extends AnyRef

    A (left) group action of G on P is simply the implementation of a method actl(g, p), or g +> p in additive notation, such that:

    A (left) group action of G on P is simply the implementation of a method actl(g, p), or g +> p in additive notation, such that:

    1. (g |+| h) +> p === g +> (h +> p) for all g, h in G and p in P.

    2. scalar.id +> p === p for all p in P.

  22. trait InnerProductSpace[V, F] extends VectorSpace[V, F]

  23. trait IsIntegral[A] extends IsReal[A]

  24. trait IsReal[A] extends Order[A] with Signed[A]

    A simple type class for numeric types that are a subset of the reals.

  25. trait MetricSpace[V, R] extends AnyRef

    This type class models a metric space V.

    This type class models a metric space V. The distance between 2 points in V is measured in R, which should be real (ie. IsReal[R] exists).

  26. trait Module[V, R] extends AdditiveAbGroup[V]

    A module generalizes a vector space by requiring its scalar need only form a ring, rather than a field.

  27. trait Monoid[A] extends Semigroup[A]

    A monoid is a semigroup with an identity.

    A monoid is a semigroup with an identity. A monoid is a specialization of a semigroup, so its operation must be associative. Additionally, op(x, id) == op(id, x) == x. For example, if we have Monoid[String], with op as string concatenation, then id = "".

  28. trait MultiplicativeAbGroup[A] extends MultiplicativeGroup[A] with MultiplicativeCMonoid[A]

  29. trait MultiplicativeCMonoid[A] extends MultiplicativeMonoid[A] with MultiplicativeCSemigroup[A]

  30. trait MultiplicativeCSemigroup[A] extends MultiplicativeSemigroup[A]

  31. trait MultiplicativeGroup[A] extends MultiplicativeMonoid[A]

  32. trait MultiplicativeGroupAction[P, G] extends AnyRef

  33. trait MultiplicativeMonoid[A] extends MultiplicativeSemigroup[A]

  34. trait MultiplicativeSemigroup[A] extends AnyRef

  35. trait MultiplicativeTorsor[V, R] extends MultiplicativeGroupAction[V, R]

  36. trait NRoot[A] extends AnyRef

    This is a type class for types with n-roots.

    This is a type class for types with n-roots. The value returned by nroot and sqrt are only guaranteed to be approximate answers (except in the case of Real).

    Also, generally nroots where n is even are not defined for negative numbers. The behaviour is undefined if this is attempted. It would be nice to ensure an exception is raised, but some types may defer computation and testing if a value is negative may not be ideal. So, do not count on ArithmeticExceptions to save you from bad arithmetic!

  37. trait NormedVectorSpace[V, F] extends VectorSpace[V, F] with MetricSpace[V, F]

    A normed vector space is a vector space equipped with a function norm: V => F.

    A normed vector space is a vector space equipped with a function norm: V => F. The main constraint is that the norm of a vector must be scaled linearly when the vector is scaled; that is norm(k *: v) == k.abs * norm(v). Additionally, a normed vector space is also a MetricSpace, where distance(v, w) = norm(v - w), and so must obey the triangle inequality.

    An example of a normed vector space is R^n equipped with the euclidean vector length as the norm.

  38. trait NormedVectorSpace0 extends AnyRef

  39. trait NormedVectorSpaceFunctions extends AnyRef

  40. trait Order[A] extends Eq[A]

    The Order type class is used to define a total ordering on some type A.

  41. trait Rig[A] extends Semiring[A] with AdditiveMonoid[A] with MultiplicativeMonoid[A]

    Rig is a ring whose additive structure doesn't have an inverse (ie.

    Rig is a ring whose additive structure doesn't have an inverse (ie. it is monoid, not a group). Put another way, a Rig is a Ring without a negative.

  42. trait Ring[A] extends Rig[A] with Rng[A]

    Ring represents a set (A) that is a group over addition (+) and a monoid over multiplication (*).

    Ring represents a set (A) that is a group over addition (+) and a monoid over multiplication (*). Aside from this, the multiplication must distribute over addition.

    Ring implements some methods (for example fromInt) in terms of other more fundamental methods (zero, one and plus). Where possible, these methods should be overridden by more efficient implementations.

  43. trait RingAlgebra[V, R] extends Module[V, R] with Rng[V]

    A RingAlgebra is a module that is also a Rng.

    A RingAlgebra is a module that is also a Rng. An example is the Gaussian numbers.

  44. trait Rng[A] extends Semiring[A] with AdditiveAbGroup[A]

    Rng is a ring whose multiplicative structure doesn't have an identity (i.

    Rng is a ring whose multiplicative structure doesn't have an identity (i.e. it is semigroup, not a monoid). Put another way, a Rng is a Ring without an identity.

  45. trait Semigroup[A] extends AnyRef

    A semigroup is any set A with an associative operation (op).

  46. trait Semiring[A] extends AdditiveMonoid[A] with MultiplicativeSemigroup[A]

    Semiring is a ring without identities or an inverse.

    Semiring is a ring without identities or an inverse. Thus, it has no negation, zero, or one.

    A Semiring with an additive inverse (-) is a Rng. A Semiring with additive and multiplicative identities (0 and 1) is a Rig. A Semiring with all of the above is a Ring.

  47. sealed abstract class Sign extends AnyRef

    A simple ADT representing the Sign of an object.

  48. trait Signed[A] extends AnyRef

    A trait for things that have some notion of sign and the ability to ensure something has a positive sign.

  49. trait Torsor[V, R] extends GroupAction[V, R]

    A Torsor[V, R] requires an AbGroup[R] and provides GroupAction[V, R], plus a diff operator, <-> in additive notation, such that:

    A Torsor[V, R] requires an AbGroup[R] and provides GroupAction[V, R], plus a diff operator, <-> in additive notation, such that:

    1. (g <-> g) === scalar.id for all g in G.

    2. (g <-> h) +> h === g for all g, h in G.

    3. (g <-> h) +> i === (i <-> h) +> g for all g, h in G.

    4. (g <-> h) === -(h <-> g) for all g, h in G.

  50. trait Trig[A] extends AnyRef

  51. trait VectorSpace[V, F] extends Module[V, F]

    A vector space is a group V that can be multiplied by scalars in F that lie in a field.

    A vector space is a group V that can be multiplied by scalars in F that lie in a field. Scalar multiplication must distribute over vector addition (x *: (v + w) === x *: v + x *: w) and scalar addition ((x + y) *: v === x *: v + y *: v). Scalar multiplication by 1 in F is an identity function (1 *: v === v). Scalar multiplication is "associative" (x *: y *: v === (x * y) *: v).

  52. trait ZAlgebra[V] extends RingAlgebra[V, Int] with Ring[V]

    Given any Ring[A] we can construct a RingAlgebra[A, Int].

    Given any Ring[A] we can construct a RingAlgebra[A, Int]. This is possible since we can define fromInt on Ring generally.

  53. final case class ZModule[V](vector: Group[V]) extends Module[V, Int] with Product with Serializable

Value Members

  1. object AbGroup

  2. object Additive

  3. object AdditiveTorsor

  4. object BooleanAlgebra

  5. object CMonoid

  6. object CRig

  7. object CRing

  8. object CSemigroup

  9. object CoordinateSpace

  10. object Eq

  11. object EuclideanRing

  12. object Field

  13. object Group

  14. object InnerProductSpace

  15. object IsReal

  16. object MetricSpace extends MetricSpace0

  17. object Module

  18. object Monoid

  19. object Multiplicative

  20. object MultiplicativeTorsor

  21. object NRoot

  22. object NormedVectorSpace extends NormedVectorSpace0 with NormedVectorSpaceFunctions

  23. object Order

  24. object Rig

  25. object Ring

  26. object RingAlgebra

  27. object Rng

  28. object Semigroup

  29. object Semiring

  30. object Sign

  31. object Signed

  32. object Torsor

  33. object Trig

  34. object VectorSpace

Ungrouped