Class IntegerRingEmbedding<E>

java.lang.Object
dk.jonaslindstrom.ruffini.common.algorithms.IntegerRingEmbedding<E>
Type Parameters:
E - Element type.
All Implemented Interfaces:
java.util.function.IntFunction<E>

public class IntegerRingEmbedding<E> extends Object implements java.util.function.IntFunction<E>
This function computes the canonical embedding of the integers into any ring by mapping an integer n to the identity element added to itself n times.
  • Constructor Details

    • IntegerRingEmbedding

      public IntegerRingEmbedding(SemiRing<E> ring)
  • Method Details

    • apply

      public E apply(int a)
      Specified by:
      apply in interface java.util.function.IntFunction<E>