Class VectorSpace2D

java.lang.Object
org.episteme.core.mathematics.linearalgebra.spaces.VectorSpace2D
All Implemented Interfaces:
AbelianGroup<Vector<Real>>, AbelianMonoid<Vector<Real>>, Group<Vector<Real>>, Magma<Vector<Real>>, Monoid<Vector<Real>>, Set<Vector<Real>>, Module<Vector<Real>, Real>, VectorSpace<Vector<Real>, Real>

public class VectorSpace2D extends Object implements VectorSpace<Vector<Real>, Real>
2D Vector Space.

Optimized for 2D geometry and physics.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getInstance

      public static VectorSpace2D getInstance()
    • operate

      public Vector<Real> operate(Vector<Real> left, Vector<Real> right)
      Description copied from interface: Magma
      Performs 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:
      operate in interface Magma<Vector<Real>>
      Parameters:
      left - the first operand
      right - the second operand
      Returns:
      the result of a ∗ b
      See Also:
    • add

      public Vector<Real> add(Vector<Real> a, Vector<Real> b)
      Description copied from interface: AbelianMonoid
      Returns the sum of two elements (additive notation).

      Delegates to Magma.operate(Object, Object).

      Specified by:
      add in interface AbelianMonoid<Vector<Real>>
      Parameters:
      a - the first addend
      b - the second addend
      Returns:
      a + b
    • zero

      public Vector<Real> zero()
      Description copied from interface: AbelianMonoid
      Returns the additive identity (zero element).

      Delegates to AbelianMonoid.identity().

      Specified by:
      zero in interface AbelianMonoid<Vector<Real>>
      Returns:
      the zero element
    • negate

      public Vector<Real> negate(Vector<Real> element)
      Description copied from interface: AbelianGroup
      Returns the additive inverse (negation) of an element.

      Satisfies: a + (-a) = (-a) + a = 0

      Specified by:
      negate in interface AbelianGroup<Vector<Real>>
      Parameters:
      element - the element to negate
      Returns:
      -element
      See Also:
    • inverse

      public Vector<Real> inverse(Vector<Real> element)
      Description copied from interface: Group
      Returns the inverse of the given element.

      For element a, returns a⁻¹ such that: a ∗ a⁻¹ = a⁻¹ ∗ a = e (identity).

      Specified by:
      inverse in interface Group<Vector<Real>>
      Parameters:
      element - the element to invert
      Returns:
      the inverse element
    • scale

      public Vector<Real> scale(Real scalar, Vector<Real> vector)
      Description copied from interface: Module
      Scalar multiplication (r × m).
      Specified by:
      scale in interface Module<Vector<Real>, Real>
      Parameters:
      scalar - the scalar r ∈ R
      vector - the module element m ∈ M
      Returns:
      r × m
    • isCommutative

      public boolean isCommutative()
      Description copied from interface: AbelianGroup
      Abelian groups are always commutative by definition.
      Specified by:
      isCommutative in interface AbelianGroup<Vector<Real>>
      Specified by:
      isCommutative in interface AbelianMonoid<Vector<Real>>
      Specified by:
      isCommutative in interface Group<Vector<Real>>
      Specified by:
      isCommutative in interface Magma<Vector<Real>>
      Returns:
      always true
    • description

      public String description()
      Description copied from interface: Set
      Returns a human-readable description of this set.

      Examples:

      • "ℝ (Real Numbers)"
      • "ℤ/12ℤ (Integers modulo 12)"
      • "{1, 2, 3, 4, 5}"

      Specified by:
      description in interface Set<Vector<Real>>
      Returns:
      a description of this set
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Set
      Returns true if 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:
      isEmpty in interface Set<Vector<Real>>
      Returns:
      true if this set is empty
    • contains

      public boolean contains(Vector<Real> element)
      Description copied from interface: Set
      Tests whether this set contains the specified element.

      This is the fundamental operation of a set - membership testing.

      Specified by:
      contains in interface Set<Vector<Real>>
      Parameters:
      element - the element to test for membership
      Returns:
      true if this set contains the element, false otherwise
      See Also:
    • getScalarField

      public Field<Real> getScalarField()
      Description copied from interface: VectorSpace
      Returns the field of scalars.
      Specified by:
      getScalarField in interface VectorSpace<Vector<Real>, Real>
      Returns:
      the scalar field
    • getScalarRing

      public Ring<Real> getScalarRing()
      Description copied from interface: Module
      Returns the ring of scalars for this module.
      Specified by:
      getScalarRing in interface Module<Vector<Real>, Real>
      Returns:
      the scalar ring
    • dimension

      public int dimension()
      Description copied from interface: VectorSpace
      Returns the dimension of the vector space (if finite).
      Specified by:
      dimension in interface VectorSpace<Vector<Real>, Real>
      Returns:
      the dimension, or -1 if infinite/unknown