Class DihedralGroup
java.lang.Object
org.episteme.core.mathematics.algebra.groups.DihedralGroup
- All Implemented Interfaces:
Group<DihedralGroup.Element>, Magma<DihedralGroup.Element>, Monoid<DihedralGroup.Element>, Set<DihedralGroup.Element>
Represents a Dihedral Group D_n of order 2n.
Elements are symmetries of a regular n-gon: rotations and reflections. Represented as s^a * r^b where a in {0, 1} and b in {0, ..., n-1}.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(DihedralGroup.Element element) Tests whether this set contains the specified element.Returns a human-readable description of this set.intgetN()identity()Returns the identity element of this monoid.inverse(DihedralGroup.Element element) Returns the inverse of the given element.booleanTests whether this is an abelian (commutative) group.booleanisEmpty()Returnstrueif this set contains no elements.operate(DihedralGroup.Element left, DihedralGroup.Element right) Performs the binary operation on two elements.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Monoid
isAssociative
-
Constructor Details
-
DihedralGroup
public DihedralGroup(int n)
-
-
Method Details
-
getN
public int getN() -
operate
Description copied from interface:MagmaPerforms the binary operation on two elements.This is the fundamental operation of a magma. The result must be an element of this magma (closure property).
Properties: None required (not necessarily associative or commutative)
- Specified by:
operatein interfaceMagma<DihedralGroup.Element>- Parameters:
left- the first operandright- the second operand- Returns:
- the result of a ∗ b
- See Also:
-
identity
Description copied from interface:MonoidReturns the identity element of this monoid.Satisfies: e ∗ a = a ∗ e = a for all a.
- Specified by:
identityin interfaceMonoid<DihedralGroup.Element>- Returns:
- the identity element
-
inverse
Description copied from interface:GroupReturns the inverse of the given element.For element a, returns a⻹ such that: a ∗ a⻹ = a⻹ ∗ a = e (identity).
- Specified by:
inversein interfaceGroup<DihedralGroup.Element>- Parameters:
element- the element to invert- Returns:
- the inverse element
-
isCommutative
public boolean isCommutative()Description copied from interface:GroupTests whether this is an abelian (commutative) group.- Specified by:
isCommutativein interfaceGroup<DihedralGroup.Element>- Specified by:
isCommutativein interfaceMagma<DihedralGroup.Element>- Returns:
trueif this group is abelian
-
description
Description copied from interface:SetReturns a human-readable description of this set.Examples:
- "â„ (Real Numbers)"
- "ℤ/12ℤ (Integers modulo 12)"
- "{1, 2, 3, 4, 5}"
- Specified by:
descriptionin interfaceSet<DihedralGroup.Element>- Returns:
- a description of this set
-
isEmpty
public boolean isEmpty()Description copied from interface:SetReturnstrueif this set contains no elements.The empty set (∅) is a fundamental concept in set theory. It is the unique set containing no elements.
- Specified by:
isEmptyin interfaceSet<DihedralGroup.Element>- Returns:
trueif this set is empty
-
contains
Description copied from interface:SetTests whether this set contains the specified element.This is the fundamental operation of a set - membership testing.
- Specified by:
containsin interfaceSet<DihedralGroup.Element>- Parameters:
element- the element to test for membership- Returns:
trueif this set contains the element,falseotherwise- See Also:
-