Class AbstractModule<V,S,R extends Ring<S>>

java.lang.Object
dk.jonaslindstrom.ruffini.common.structures.AbstractModule<V,S,R>
All Implemented Interfaces:
AdditiveGroup<V>, CommutativeMonoid<V>, Module<V,S,R>, Set<V>
Direct Known Subclasses:
AbstractVectorSpace

public abstract class AbstractModule<V,S,R extends Ring<S>> extends Object implements Module<V,S,R>
  • Field Details

  • Constructor Details

    • AbstractModule

      public AbstractModule(AdditiveGroup<V> vectors, R ring)
  • Method Details

    • getScalars

      public R getScalars()
      Description copied from interface: Module
      Get the scalar ring.
      Specified by:
      getScalars in interface Module<V,S,R extends Ring<S>>
    • negate

      public V negate(V a)
      Description copied from interface: AdditiveGroup
      Return -a.
      Specified by:
      negate in interface AdditiveGroup<V>
    • add

      public V add(V a, V b)
      Description copied from interface: CommutativeMonoid
      Return the result of a+b.
      Specified by:
      add in interface CommutativeMonoid<V>
    • zero

      public V zero()
      Description copied from interface: CommutativeMonoid
      Return the zero element.
      Specified by:
      zero in interface CommutativeMonoid<V>
    • toString

      public String toString(V v)
      Description copied from interface: Set
      Returns a human-readable string representation of an element in this set.
      Specified by:
      toString in interface Set<V>
    • equals

      public boolean equals(V v, V u)
      Description copied from interface: Set
      Returns true if and only if a = b as elements of this set.
      Specified by:
      equals in interface Set<V>