package algebra
Poly-algebra
contains a collection of typeclass abstractions over common algebraic structures,
and provides a framework for generic math programming in Scala.
- Alphabetic
- By Inheritance
- algebra
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class AbstractEq [-X] extends Eq[X]
- abstract class AbstractHashing [-X] extends Hashing[X]
- abstract class AbstractOrder [-X] extends Order[X]
- abstract class AbstractPartialOrder [-X] extends PartialOrder[X]
-
trait
Action
[X, -S] extends AnyRef
Represents an action.
Represents an action.
- Since
0.2.10
-
trait
AdditiveAction
[X, S] extends AnyRef
Represents an action in which its action operator is translation (
:+
).Represents an action in which its action operator is translation (
:+
).- Since
0.2.10
-
trait
AdditiveCGroup
[X] extends AdditiveGroup[X] with AdditiveCMonoid[X]
Represents an additive Abelian (commutative) group.
Represents an additive Abelian (commutative) group.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Since
0.2.6
-
trait
AdditiveCMonoid
[X] extends AdditiveMonoid[X] with AdditiveCSemigroup[X]
Represents an additive commutative monoid.
Represents an additive commutative monoid.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Since
0.2.6
-
trait
AdditiveCSemigroup
[X] extends AdditiveSemigroup[X]
Represents an additive commutative semigroup.
Represents an additive commutative semigroup.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
-
trait
AdditiveGroup
[G] extends AdditiveMonoid[G]
Represents an additive group.
Represents an additive group. An additive group is an additive monoid (with operation
+
and identity element0
) that is also invertible.An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
-
trait
AdditiveGroupAction
[X, S] extends AdditiveMonoidAction[X, S]
Represents an additive action where the actors form a group.
-
trait
AdditiveMonoid
[M] extends AdditiveSemigroup[M] with HasZero[M]
Represents an additive monoid.
Represents an additive monoid. An additive monoid is an additive semigroup (with operation
+
) with an additive identity element0
.An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Since
0.1.0
-
trait
AdditiveMonoidAction
[X, S] extends AdditiveSemigroupAction[X, S]
Represents an additive action where the actors form a monoid.
-
trait
AdditiveSemigroup
[S] extends AnyRef
Represents an additive semigroup.
Represents an additive semigroup. An additive semigroup is a semigroup with the binary operation
add
(+
).An instance of this typeclass should satisfy the following axiom:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
-
trait
AdditiveSemigroupAction
[X, S] extends AdditiveAction[X, S]
Represents an additive action where the actors form a semigroup.
- trait AdditiveTorsor [X, G] extends AdditiveGroupAction[X, G]
-
trait
AffineSpace
[P, V, F] extends AdditiveTorsor[P, V]
Represents an affine space.
Represents an affine space.
- P
Type of points
- V
Type of vectors
- F
Type of field on which the vector space is based
- Since
0.2.10
-
trait
AlgebraOverField
[X, S] extends VectorSpace[X, S] with AlgebraOverRing[X, S]
Represents an algebra over a field, i.e., a vector space equipped with a bilinear product over the type of vectors.
Represents an algebra over a field, i.e., a vector space equipped with a bilinear product over the type of vectors.
- Since
0.1.0
-
trait
AlgebraOverRing
[X, S] extends Module[X, S] with CRing[X]
Represents an algebra over a ring, i.e., a module equipped with a bilinear product.
Represents an algebra over a ring, i.e., a module equipped with a bilinear product.
- Since
0.1.0
-
trait
BooleanAlgebra
[X] extends BoundedLattice[X]
Represents an abstract Boolean algebra, which is a complemented distributive lattice.
Represents an abstract Boolean algebra, which is a complemented distributive lattice.
- Since
0.1.0
-
trait
Bounded
[+X] extends HasTop[X] with HasBottom[X]
Witnesses the existence of both a maximum element and a minimum element of a specific type.
Witnesses the existence of both a maximum element and a minimum element of a specific type.
An instance of this typeclass should satisfy the following axioms:
- Top element: ∀a∈X, a <= top.
- Bottom element: ∀a∈X, a >= bot.
- Since
0.2.7
-
trait
BoundedLattice
[X] extends Lattice[X] with Bounded[X] with BoundedLowerSemilattice[X] with BoundedUpperSemilattice[X]
Represents a bounded lattice, i.e., a lattice containing both the top and the bottom elements.
Represents a bounded lattice, i.e., a lattice containing both the top and the bottom elements.
An instance of this typeclass should satisfy the following axioms:
- Supremum associativity: ∀a, b, c∈X, sup(a, sup(b, c)) == sup(sup(a, b), c).
- Infimum associativity: ∀a, b, c∈X, inf(a, inf(b, c)) == inf(inf(a, b), c).
- Supremum commutativity: ∀a, b∈X, sup(a, b) == sup(b, a).
- Infimum commutativity: ∀a, b∈X, inf(a, b) == inf(b, a).
- Absorption of supremum w.r.t. infimum: ∀a, b∈X, sup(a, inf(a, b)) == a.
- Absorption of infimum w.r.t. supremum: ∀a, b∈X, inf(a, sup(a, b)) == a.
- Top element: ∀a∈X, a <= top.
- Bottom element: ∀a∈X, a >= bot.
- Since
0.2.0
-
trait
BoundedLowerSemilattice
[X] extends LowerSemilattice[X] with HasBottom[X]
Represents a lower semilattice that has a specific bottom element.
Represents a lower semilattice that has a specific bottom element.
An instance of this typeclass should satisfy the following axioms:
- Infimum associativity: ∀a, b, c∈X, inf(a, inf(b, c)) == inf(inf(a, b), c).
- Infimum commutativity: ∀a, b∈X, inf(a, b) == inf(b, a).
- Infimum idempotency: ∀a∈X, inf(a, a) == a.
- Bottom element: ∀a∈X, a >= bot.
- Since
0.2.0
-
trait
BoundedUpperSemilattice
[X] extends UpperSemilattice[X] with HasTop[X]
Represents an upper semilattice that has a specific top element.
Represents an upper semilattice that has a specific top element.
An instance of this typeclass should satisfy the following axioms:
- Supremum associativity: ∀a, b, c∈X, sup(a, sup(b, c)) == sup(sup(a, b), c).
- Supremum commutativity: ∀a, b∈X, sup(a, b) == sup(b, a).
- Supremum idempotency: ∀a∈X, sup(a, a) == a.
- Top element: ∀a∈X, a <= top.
- trait BoundedUpperSemilatticeWithEq [X] extends BoundedUpperSemilattice[X] with EqUpperSemilattice[X]
-
trait
CGroup
[X] extends CMonoid[X] with Group[X]
Represents an Abelian (commutative) group.
Represents an Abelian (commutative) group.
An instance of this typeclass should satisfy the following axioms:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- Identity: \( \forall a \in X, ia = ai = a\), where \(i\) is the identity element.
- Invertibility: ∀a∈X, ∃b∈X, a op b == b op a == id.
- Commutativity: \(\forall a, b \in X, ab = ba\).
- Since
0.2.6
-
trait
CMonoid
[X] extends Monoid[X] with CSemigroup[X]
Represents a commutative monoid.
Represents a commutative monoid.
An instance of this typeclass should satisfy the following axioms:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- Identity: \( \forall a \in X, ia = ai = a\), where \(i\) is the identity element.
- Commutativity: \(\forall a, b \in X, ab = ba\).
- Since
0.2.6
-
trait
CRing
[X] extends Ring[X] with CSemiring[X]
Represents a commutative ring (i.e.
Represents a commutative ring (i.e. the multiplication operation is also commutative).
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Multiplicative commutativity: ∀a, b∈X, a * b == b * a.
- Distributivity of multiplication w.r.t. addition: ∀a, b, c∈X, (a + b) * c == a * c + b * c and a * (b + c) == a * b + a * c.
- Since
0.2.6
-
trait
CSemigroup
[X] extends Semigroup[X]
Represents a commutative semigroup.
Represents a commutative semigroup.
An instance of this typeclass should satisfy the following axioms:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- Commutativity: \(\forall a, b \in X, ab = ba\).
-
trait
CSemiring
[X] extends Semiring[X] with MultiplicativeCMonoid[X]
Represents a commutative semiring, i.e., a semiring where the multiplication operation is also commutative.
Represents a commutative semiring, i.e., a semiring where the multiplication operation is also commutative.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Multiplicative commutativity: ∀a, b∈X, a * b == b * a.
- Distributivity of multiplication w.r.t. addition: ∀a, b, c∈X, (a + b) * c == a * c + b * c and a * (b + c) == a * b + a * c.
- Zero as an annihilator: ∀a∈X, 0 * a == a * 0 == 0.
- Since
0.2.6
-
trait
ConcatenativeMonoid
[X] extends ConcatenativeSemigroup[X] with HasEmpty[X]
Represents a concatenative monoid (i.e.
Represents a concatenative monoid (i.e. monoids operating on sequences, etc. that bears the operation
++
)- Since
0.2.1
-
trait
ConcatenativeSemigroup
[X] extends AnyRef
Represents a concatenative semigroup (i.e.
Represents a concatenative semigroup (i.e. semigroups operating on sequences, etc. that bears the operation
++
)- Since
0.2.1
-
trait
Eq
[-X] extends AnyRef
Typeclass for type-strict equivalence relations.
Typeclass for type-strict equivalence relations. This is equivalent to the Haskell typeclass
Eq
.Eq
is contravariant with respect to its type parameter.An instance of this typeclass should satisfy the following axioms:
- Reflexivity: ∀a∈X, a === a.
- Symmetry: ∀a, b∈X, a === b implies b === a.
- Transitivity: ∀a, b, c∈X, a === b and b === c implies a === c.
- trait EqBoundedLattice [X] extends EqBoundedLowerSemilattice[X] with BoundedUpperSemilatticeWithEq[X] with BoundedLattice[X]
- trait EqBoundedLowerSemilattice [X] extends BoundedLowerSemilattice[X] with EqLowerSemilattice[X]
- trait EqLattice [X] extends Lattice[X] with EqLowerSemilattice[X] with EqUpperSemilattice[X]
- trait EqLowerSemilattice [X] extends LowerSemilattice[X] with PartialOrder[X]
- trait EqUpperSemilattice [X] extends UpperSemilattice[X] with PartialOrder[X]
-
trait
EuclideanDomain
[X] extends CRing[X] with OrderedRing[X]
Represents a Euclidean domain.
Represents a Euclidean domain.
- Since
0.1.0
-
trait
Field
[X] extends CRing[X] with MultiplicativeCGroup[X]
Represents a field.
Represents a field.
- Since
0.1.0
-
trait
Group
[G] extends Monoid[G]
Represents a group.
Represents a group. A group is a monoid where an inverse element exists for every element.
An instance of this typeclass should satisfy the following axioms:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- Identity: \( \forall a \in X, ia = ai = a\), where \(i\) is the identity element.
- Invertibility: ∀a∈X, ∃b∈X, a op b == b op a == id.
- trait GroupAction [X, S] extends MonoidAction[X, S]
-
trait
HasBottom
[+X] extends AnyRef
Represents the existence of a minimum
bottom
element.Represents the existence of a minimum
bottom
element.An instance of this typeclass should satisfy the following axiom:
- Bottom element: ∀a∈X, a >= bot.
-
trait
HasEmpty
[+X] extends AnyRef
Represents the existence of an empty element.
-
trait
HasIdentity
[+X] extends AnyRef
Represents the existence of an identity element.
Represents the existence of an identity element. An instance of this typeclass should satisfy the following axiom:
- Identity: \( \forall a \in X, ia = ai = a\), where \(i\) is the identity element.
-
trait
HasOne
[+X] extends AnyRef
Represents the existence of an
1
element.Represents the existence of an
1
element.An instance of this typeclass should satisfy the following axiom:
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
-
trait
HasTop
[+X] extends AnyRef
Represents the existence of a maximum
top
element.Represents the existence of a maximum
top
element.An instance of this typeclass should satisfy the following axiom:
- Top element: ∀a∈X, a <= top.
-
trait
HasZero
[+X] extends AnyRef
Represents the existence of an
0
element.Represents the existence of an
0
element.An instance of this typeclass should satisfy the following axiom:
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
-
trait
Hashing
[-X] extends Eq[X]
Represents an equivalence relation endowed with a hashing function.
Represents an equivalence relation endowed with a hashing function. This is the typeclass that a HashMap requires for its keys.
- Since
0.2.0
- type Id[X] = X
- trait ImplicitStructures extends AnyRef
-
trait
InnerProductSpace
[V, F] extends NormedVectorSpace[V, F]
Typeclass for inner product spaces.
Typeclass for inner product spaces. An inner product space is a vector space endowed with an inner product operation.
- Since
0.1.0
-
trait
IsReal
[X] extends OrderedField[X] with PowerOps[X] with TrigExpOps[X] with MetricSpace[X, X]
Witnesses that a type represents the set of real numbers.
Witnesses that a type represents the set of real numbers.
- Since
0.2.10
-
trait
Lattice
[X] extends UpperSemilattice[X] with LowerSemilattice[X]
Represents a lattice, a partially-ordered set where each two elements have a unique infimum and a unique supremum.
Represents a lattice, a partially-ordered set where each two elements have a unique infimum and a unique supremum.
An instance of this typeclass should satisfy the following axioms:
- Supremum associativity: ∀a, b, c∈X, sup(a, sup(b, c)) == sup(sup(a, b), c).
- Infimum associativity: ∀a, b, c∈X, inf(a, inf(b, c)) == inf(inf(a, b), c).
- Supremum commutativity: ∀a, b∈X, sup(a, b) == sup(b, a).
- Infimum commutativity: ∀a, b∈X, inf(a, b) == inf(b, a).
- Absorption of supremum w.r.t. infimum: ∀a, b∈X, sup(a, inf(a, b)) == a.
- Absorption of infimum w.r.t. supremum: ∀a, b∈X, inf(a, sup(a, b)) == a.
-
trait
LowerSemilattice
[X] extends AnyRef
Represents a lower-semilattice, i.e., a partially-ordered set in which every finite non-empty subset has a greatest lower bound.
Represents a lower-semilattice, i.e., a partially-ordered set in which every finite non-empty subset has a greatest lower bound.
An instance of this typeclass should satisfy the following axioms:
- Infimum associativity: ∀a, b, c∈X, inf(a, inf(b, c)) == inf(inf(a, b), c).
- Infimum commutativity: ∀a, b∈X, inf(a, b) == inf(b, a).
- Infimum idempotency: ∀a∈X, inf(a, a) == a.
-
trait
Magma
[X] extends AnyRef
Represents a magma, which is a set endowed with a binary operator.
Represents a magma, which is a set endowed with a binary operator. No laws is specified with regards to the operator (except closure, which is satisfied by the type system).
- Since
0.4.0
- trait MetricSpace [-X, +S] extends AnyRef
-
trait
Module
[X, S] extends MultiplicativeAction[X, S] with AdditiveCGroup[X]
Represents a module over a ring.
Represents a module over a ring.
A module over a ring is an additive Abelian group (poly.algebra.AdditiveCGroup) on vectors that supports a linear distributive scaling function. It is a generalization of a vector space because the scalars need only be a ring (poly.algebra.Ring).
An instance of this typeclass should satisfy the following axioms:
- S is a ring.
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Compatibility: \(\forall k, l \in S, \forall a \in X, k(la) = (kl)a \).
- Scaling identity: \(\forall a\in X, 1a = a\).
- Distributivity of scaling w.r.t. vector addition: \(\forall k\in S, \forall a, b\in X, k(a+b) == ka + kb \).
- Distributivity of scaling w.r.t. scalar addition: \(\forall k, l \in S, \forall a\in X, (k+l)a = ka + la. \).
-
trait
Monoid
[M] extends Semigroup[M] with HasIdentity[M]
Represents a monoid, i.e., a semigroup with an identity element.
Represents a monoid, i.e., a semigroup with an identity element.
An instance of this typeclass should satisfy the following axioms:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- Identity: \( \forall a \in X, ia = ai = a\), where \(i\) is the identity element.
- trait MonoidAction [X, S] extends SemigroupAction[X, S]
-
trait
MultiplicativeAction
[X, S] extends AnyRef
- Since
0.2.10
-
trait
MultiplicativeCGroup
[X] extends MultiplicativeGroup[X] with MultiplicativeCMonoid[X]
Represents an multiplicative Abelian (commutative) group.
Represents an multiplicative Abelian (commutative) group.
An instance of this typeclass should satisfy the following axioms:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Multiplicative invertibility: ∀a∈X, ∃a-1∈X, a * a-1 == a-1 * a == 1.
- Multiplicative commutativity: ∀a, b∈X, a * b == b * a.
-
trait
MultiplicativeCMonoid
[X] extends MultiplicativeMonoid[X] with MultiplicativeCSemigroup[X]
Represents a multiplicative commutative monoid.
Represents a multiplicative commutative monoid.
An instance of this typeclass should satisfy the following axioms:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Multiplicative commutativity: ∀a, b∈X, a * b == b * a.
-
trait
MultiplicativeCSemigroup
[X] extends MultiplicativeSemigroup[X]
Represents a multiplicative commutative semigroup.
Represents a multiplicative commutative semigroup.
An instance of this typeclass should satisfy the following axioms:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative commutativity: ∀a, b∈X, a * b == b * a.
-
trait
MultiplicativeGroup
[X] extends MultiplicativeMonoid[X]
Represents an multiplicative group.
Represents an multiplicative group. A multiplicative group is a multiplicative monoid (with operation
*
and identity1
) that is also invertible.An instance of this typeclass should satisfy the following axioms:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Multiplicative invertibility: ∀a∈X, ∃a-1∈X, a * a-1 == a-1 * a == 1.
- trait MultiplicativeGroupAction [X, S] extends MultiplicativeMonoidAction[X, S]
-
trait
MultiplicativeMonoid
[X] extends MultiplicativeSemigroup[X] with HasOne[X]
Represents a multiplicative monoid.
Represents a multiplicative monoid. A multiplicative monoid is a multiplicative semigroup with a multiplicative identity
1
.An instance of this typeclass should satisfy the following axioms:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- X
Type of element
- trait MultiplicativeMonoidAction [X, S] extends MultiplicativeSemigroupAction[X, S]
-
trait
MultiplicativeSemigroup
[X] extends AnyRef
Represents a multiplicative semigroup.
Represents a multiplicative semigroup. An multiplicative semigroup is a semigroup with the binary operation
mul
(*
).An instance of this typeclass should satisfy the following axiom:
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- trait MultiplicativeSemigroupAction [X, S] extends MultiplicativeAction[X, S]
- trait MultiplicativeTorsor [X, G] extends MultiplicativeGroupAction[X, G]
-
trait
NormedVectorSpace
[V, F] extends VectorSpace[V, F] with MetricSpace[V, F]
Represents a vector space equipped with a norm.
Represents a vector space equipped with a norm.
- Since
0.1.0
-
trait
Order
[-X] extends EqLattice[X]
Represents a weak order.
Represents a weak order.
A weak order is a generalization of a total order in which some elements may be tied. Weak orders appear ubiquitously in ordered data structures and sorting algorithms.
An instance of this typeclass should satisfy the following axioms:
- Transitivity: ∀a, b, c∈X, a <= b and b <= c implies a <= c.
- Totality: ∀a, b∈X, a <= b or b <= a.
- trait OrderedAdditiveCGroup [X] extends OrderedAdditiveGroup[X] with AdditiveCGroup[X] with MetricSpace[X, X]
- trait OrderedAdditiveGroup [X] extends AdditiveGroup[X] with Order[X]
-
trait
OrderedField
[X] extends Field[X] with OrderedRing[X]
- Since
0.2.4
-
trait
OrderedHashing
[-X] extends Order[X] with Hashing[X]
Represents a weak order endowed with a hashing function.
Represents a weak order endowed with a hashing function.
- Since
0.3.3
-
trait
OrderedRing
[X] extends Ring[X] with OrderedAdditiveCGroup[X] with SignOps[X]
- Since
0.2.4
-
trait
PartialOrder
[-X] extends Eq[X]
Represents a partial order.
Represents a partial order.
Partial orders are a generalization of total orders in which some element pairs may not be compared.
An instance of this typeclass should satisfy the following axioms:
- Reflexivity: ∀a∈X, a <= a.
- Antisymmetry: ∀a, b∈X, a <= b and b <= a implies a == b.
- Transitivity: ∀a, b, c∈X, a <= b and b <= c implies a <= c.
- trait PowerOps [X] extends AnyRef
- trait Priority1Implicits extends Priority2Implicits
- trait Priority2Implicits extends AnyRef
-
trait
Ring
[X] extends Semiring[X] with AdditiveCGroup[X]
Represents a ring.
Represents a ring. A ring is an Abelian additive group together with a multiplicative monoid.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Distributivity of multiplication w.r.t. addition: ∀a, b, c∈X, (a + b) * c == a * c + b * c and a * (b + c) == a * b + a * c.
- Since
0.1.0
-
trait
Semigroup
[S] extends Magma[S]
Typeclass for semigroups.
Typeclass for semigroups. A semigroup is a set equipped with an associative binary operation.
An instance of this typeclass should satisfy the following axiom:
- Associativity: \(\forall a, b, c \in S, (ab)c = a(bc)\).
- trait SemigroupAction [X, S] extends Action[X, S]
-
trait
Semiring
[X] extends AdditiveCMonoid[X] with MultiplicativeMonoid[X]
Represents a semiring.
Represents a semiring. A semiring is a commutative additive monoid as well as a multiplicative monoid.
An instance of this typeclass should satisfy the following axioms:
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Multiplicative associativity: ∀a, b, c∈X, (a * b) * c == a * (b * c).
- Multiplicative identity: ∀a∈X, a * 1 == 1 * a == a.
- Distributivity of multiplication w.r.t. addition: ∀a, b, c∈X, (a + b) * c == a * c + b * c and a * (b + c) == a * b + a * c.
- Zero as an annihilator: ∀a∈X, 0 * a == a * 0 == 0.
-
trait
SequentialOrder
[X] extends Order[X]
Represents a total order in which each element's predecessor and successor can be accessed.
Represents a total order in which each element's predecessor and successor can be accessed. This is equivalent to the Haskell typeclass
Enum
.- Since
0.2.19
- trait SignOps [X] extends AnyRef
-
trait
Similarity
[-X, S] extends AnyRef
Represents a similarity measure.
-
trait
Torsor
[X, G] extends GroupAction[X, G]
Represents a torsor, also known as a principle homogeneous space of a group.
Represents a torsor, also known as a principle homogeneous space of a group.
- Since
0.3.13
-
trait
TrigExpOps
[X] extends AnyRef
Represents the support for trigonometric and exponential/logarithmic functions.
Represents the support for trigonometric and exponential/logarithmic functions.
- Since
0.2.0
-
trait
UpperSemilattice
[X] extends AnyRef
Represents a upper-semilattice, i.e., a partially-ordered set in which every finite non-empty subset has a least upper bound.
Represents a upper-semilattice, i.e., a partially-ordered set in which every finite non-empty subset has a least upper bound.
An instance of this typeclass should satisfy the following axioms:
- Supremum associativity: ∀a, b, c∈X, sup(a, sup(b, c)) == sup(sup(a, b), c).
- Supremum commutativity: ∀a, b∈X, sup(a, b) == sup(b, a).
- Supremum idempotency: ∀a∈X, sup(a, a) == a.
-
trait
VectorSpace
[X, S] extends Module[X, S]
Represents a vector space over a field.
Represents a vector space over a field.
A vector space over a field (poly.algebra.Field) is a set of vectors together with a linear distributive scaling function.
An instance of this typeclass should satisfy the following axioms:
- S is a field.
- Additive associativity: \(\forall a, b, c \in X, (a+b)+c = a+(b+c)\).
- Additive identity: ∀a∈X, a + 0 == 0 + a == a.
- Additive invertibility: \(\forall a\in X, \exists -a \in X, a + (-a) == (-a) + a == 0\).
- Additive commutativity: ∀a, b∈X, a + b == b + a.
- Compatibility: \(\forall k, l \in S, \forall a \in X, k(la) = (kl)a \).
- Scaling identity: \(\forall a\in X, 1a = a\).
- Distributivity of scaling w.r.t. vector addition: \(\forall k\in S, \forall a, b\in X, k(a+b) == ka + kb \).
- Distributivity of scaling w.r.t. scalar addition: \(\forall k, l \in S, \forall a\in X, (k+l)a = ka + la. \).
- Since
0.1.0
Value Members
- object Action extends BinaryImplicitGetter[Action]
- object AdditiveAction extends BinaryImplicitGetter[AdditiveAction]
- object AdditiveCGroup extends ImplicitGetter[AdditiveCGroup]
- object AdditiveCMonoid extends ImplicitGetter[AdditiveCMonoid]
- object AdditiveCSemigroup extends ImplicitGetter[AdditiveCSemigroup]
- object AdditiveGroup extends ImplicitGetter[AdditiveGroup]
- object AdditiveGroupAction extends BinaryImplicitGetter[AdditiveGroupAction]
- object AdditiveMonoid extends ImplicitGetter[AdditiveMonoid]
- object AdditiveMonoidAction extends BinaryImplicitGetter[AdditiveMonoidAction]
- object AdditiveSemigroup extends ImplicitGetter[AdditiveSemigroup]
- object AdditiveSemigroupAction extends BinaryImplicitGetter[AdditiveSemigroupAction]
- object AdditiveTorsor extends BinaryImplicitGetter[AdditiveTorsor]
- object AffineSpace extends TernaryImplicitGetter[AffineSpace]
- object AlgebraOverField extends BinaryImplicitGetter[AlgebraOverField]
- object AlgebraOverRing extends BinaryImplicitGetter[AlgebraOverRing]
- object BooleanAlgebra extends ImplicitGetter[BooleanAlgebra]
- object Bounded extends ImplicitGetter[Bounded]
- object BoundedLattice extends ImplicitGetter[BoundedLattice]
- object BoundedLowerSemilattice extends ImplicitGetter[BoundedLowerSemilattice]
- object BoundedUpperSemilattice extends ImplicitGetter[BoundedUpperSemilattice]
- object BoundedUpperSemilatticeWithEq extends ImplicitGetter[BoundedUpperSemilatticeWithEq]
- object CGroup extends ImplicitGetter[CGroup]
- object CMonoid extends ImplicitGetter[CMonoid]
- object CRing extends ImplicitGetter[CRing]
- object CSemigroup extends ImplicitGetter[CSemigroup]
- object CSemiring extends ImplicitGetter[CSemiring]
- object ConcatenativeMonoid extends ImplicitGetter[ConcatenativeMonoid]
- object ConcatenativeSemigroup extends ImplicitGetter[ConcatenativeSemigroup]
- object Eq extends ImplicitGetter[Eq]
- object EqBoundedLattice extends ImplicitGetter[EqBoundedLattice]
- object EqBoundedLowerSemilattice extends ImplicitGetter[EqBoundedLowerSemilattice]
- object EqLattice extends ImplicitGetter[EqLattice]
- object EqLowerSemilattice extends ImplicitGetter[EqLowerSemilattice]
- object EqUpperSemilattice extends ImplicitGetter[EqUpperSemilattice]
- object EuclideanDomain extends ImplicitGetter[EuclideanDomain]
- object Field extends ImplicitGetter[Field]
- object Group extends ImplicitGetter[Group]
- object GroupAction extends BinaryImplicitGetter[GroupAction]
- object HasBottom extends ImplicitGetter[HasBottom]
- object HasEmpty extends ImplicitGetter[HasEmpty]
- object HasIdentity extends ImplicitGetter[HasIdentity]
- object HasOne extends ImplicitGetter[HasOne]
- object HasTop extends ImplicitGetter[HasTop]
- object HasZero extends ImplicitGetter[HasZero]
- object Hashing extends ImplicitGetter[Hashing]
- object InnerProductSpace extends BinaryImplicitGetter[InnerProductSpace]
- object IsReal extends ImplicitGetter[IsReal]
- object Lattice extends ImplicitGetter[Lattice]
- object LowerSemilattice extends ImplicitGetter[LowerSemilattice]
- object Magma extends ImplicitGetter[Magma]
- object MetricSpace extends BinaryImplicitGetter[MetricSpace]
- object Module extends BinaryImplicitGetter[Module]
- object Monoid extends ImplicitGetter[Monoid]
- object MonoidAction extends BinaryImplicitGetter[MonoidAction]
- object MultiplicativeAction extends BinaryImplicitGetter[MultiplicativeAction]
- object MultiplicativeCGroup extends ImplicitGetter[MultiplicativeCGroup]
- object MultiplicativeCMonoid extends ImplicitGetter[MultiplicativeCMonoid]
- object MultiplicativeCSemigroup extends ImplicitGetter[MultiplicativeCSemigroup]
- object MultiplicativeGroup extends ImplicitGetter[MultiplicativeGroup]
- object MultiplicativeGroupAction extends BinaryImplicitGetter[MultiplicativeGroupAction]
- object MultiplicativeMonoid extends ImplicitGetter[MultiplicativeMonoid]
- object MultiplicativeMonoidAction extends BinaryImplicitGetter[MultiplicativeMonoidAction]
- object MultiplicativeSemigroup extends ImplicitGetter[MultiplicativeSemigroup]
- object MultiplicativeSemigroupAction extends BinaryImplicitGetter[MultiplicativeSemigroupAction]
- object MultiplicativeTorsor extends BinaryImplicitGetter[MultiplicativeTorsor]
- object NormedVectorSpace extends BinaryImplicitGetter[NormedVectorSpace]
- object Order extends ImplicitGetter[Order]
- object OrderedAdditiveCGroup extends ImplicitGetter[OrderedAdditiveCGroup]
- object OrderedAdditiveGroup extends ImplicitGetter[OrderedAdditiveGroup]
- object OrderedField extends ImplicitGetter[OrderedField]
- object OrderedHashing extends ImplicitGetter[OrderedHashing]
- object OrderedRing extends ImplicitGetter[OrderedRing]
- object PartialOrder extends ImplicitGetter[PartialOrder]
- object PowerOps extends ImplicitGetter[PowerOps]
- object Ring extends ImplicitGetter[Ring]
- object Semigroup extends ImplicitGetter[Semigroup]
- object SemigroupAction extends BinaryImplicitGetter[SemigroupAction]
- object Semiring extends ImplicitGetter[Semiring]
- object SequentialOrder extends ImplicitGetter[SequentialOrder]
- object SignOps extends ImplicitGetter[SignOps]
- object Similarity extends BinaryImplicitGetter[Similarity]
- object Torsor extends BinaryImplicitGetter[Torsor]
- object TrigExpOps extends ImplicitGetter[TrigExpOps]
- object UpperSemilattice extends ImplicitGetter[UpperSemilattice]
- object VectorSpace extends BinaryImplicitGetter[VectorSpace]
-
object
implicits
extends ImplicitStructures
Brings typeclass instances of default algebraic structures on system types into scope.
-
object
ops
extends Priority1Implicits
Importing this object introduces efficient operator overloading through macros.
Importing this object introduces efficient operator overloading through macros.
- Since
0.2.0
- object specgroup
-
object
syntax
extends GenericFunctions with MapReduceMathOps with ImplicitStructures with Priority1Implicits
An object for all-in-one importing experience.
An object for all-in-one importing experience. Once imported this
syntax
object,implicits
/ops
/functions
should NO LONGER be imported.- Since
0.2.15