Class GaloisFieldMathMode

java.lang.Object
net.messagevortex.router.operation.GaloisFieldMathMode
All Implemented Interfaces:
MathMode

public class GaloisFieldMathMode extends Object implements MathMode
Offers galoise Math required for redundancy matrices.
  • Constructor Details

    • GaloisFieldMathMode

      public GaloisFieldMathMode(int omega)
  • Method Details

    • getGaloisFieldMathMode

      public static GaloisFieldMathMode getGaloisFieldMathMode(int omega)

      Gets a singleton math mode for the specified omega.

      Parameters:
      omega - the number of bits to be used
      Returns:
      the math mode (singleton)
    • mul

      public int mul(int c1, int c2)
      Description copied from interface: MathMode

      Multiplys c1 ith c2.

      Specified by:
      mul in interface MathMode
      Parameters:
      c1 - the first operand
      c2 - the second operand
      Returns:
      the result of the multiplication
    • div

      public int div(int c1, int divisor)
      Description copied from interface: MathMode

      Divides c1 by c2 (without remainder).

      Specified by:
      div in interface MathMode
      Parameters:
      c1 - the dividend
      divisor - the divisor
      Returns:
      the result of the division
    • add

      public int add(int c1, int c2)
      Description copied from interface: MathMode

      Add c1 with c2.

      Specified by:
      add in interface MathMode
      Parameters:
      c1 - the first operand
      c2 - the second operand
      Returns:
      the result of the addition
    • sub

      public int sub(int c1, int c2)
      Description copied from interface: MathMode

      Subtract c2 from c1.

      Specified by:
      sub in interface MathMode
      Parameters:
      c1 - the base value
      c2 - the the value to subtract from the base value
      Returns:
      the result of the subtraction
    • getGfLog

      public int[] getGfLog()
    • getGfIlog

      public int[] getGfIlog()
    • toString

      public String toString()
      Description copied from interface: MathMode

      get the identitfication representation.

      Specified by:
      toString in interface MathMode
      Overrides:
      toString in class Object
      Returns:
      th identification string
    • getTableDump

      public String getTableDump()

      dumps transformation table of GF-Field.

      Returns:
      returns a string representing the current table