Class GaloisFieldMathMode
java.lang.Object
net.messagevortex.router.operation.GaloisFieldMathMode
- All Implemented Interfaces:
MathMode
Offers galoise Math required for redundancy matrices.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintadd(int c1, int c2) Add c1 with c2.intdiv(int c1, int divisor) Divides c1 by c2 (without remainder).static GaloisFieldMathModegetGaloisFieldMathMode(int omega) Gets a singleton math mode for the specified omega.int[]int[]getGfLog()dumps transformation table of GF-Field.intmul(int c1, int c2) Multiplys c1 ith c2.intsub(int c1, int c2) Subtract c2 from c1.toString()get the identitfication representation.
-
Constructor Details
-
GaloisFieldMathMode
public GaloisFieldMathMode(int omega)
-
-
Method Details
-
getGaloisFieldMathMode
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:MathModeMultiplys c1 ith c2.
-
div
public int div(int c1, int divisor) Description copied from interface:MathModeDivides c1 by c2 (without remainder).
-
add
public int add(int c1, int c2) Description copied from interface:MathModeAdd c1 with c2.
-
sub
public int sub(int c1, int c2) Description copied from interface:MathModeSubtract c2 from c1.
-
getGfLog
public int[] getGfLog() -
getGfIlog
public int[] getGfIlog() -
toString
Description copied from interface:MathModeget the identitfication representation.
-
getTableDump
dumps transformation table of GF-Field.
- Returns:
- returns a string representing the current table
-