C# Class NewTOAPIA.Net.Rtp.GF16

A field is a set of numbers with an addition/subtraction operations as well as multiplication/division operation. The result of adding/subtracting or multiplying/dividing any two numbers of the field has to be in the set as well. A finite field contains only finitely many elements. A finite field is also called Galois Field in honor of Evariste Galois. The advantage of a finite-field arithmetic is that it can be done exactly by computer (error-correcting code). (*) Evariste Galois 1811 (Bourg-La-Reine, near Paris) - 1832 (Paris)
Datei anzeigen Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
Add ( UInt16 a, UInt16 b ) : UInt16

Add two number in GF8

The subtraction is the same as the addition because with Galois fields, each number is its own negative. So there is no need to have a Sub method

Divide ( UInt16 numerator, UInt16 denominator ) : UInt16

a divide by b

Equals ( object o ) : bool
GF16 ( UInt16 i ) : System

Ctor

GetHashCode ( ) : int
Multiply ( UInt16 a, UInt16 b ) : UInt16

Multiply 2 operandes

Power ( int exponent ) : GF16

Power is used to create teh Vandermonde matrix

Power ( UInt16 x, UInt32 exponent ) : UInt16
ToString ( ) : string

Overload of the string operator

operator ( ) : GF16

Overload the + operator

Private Methods

Method Description
GF16 ( ) : System
fillLogTables ( ) : void

Fill the log table. The log tables are used to facilitate multiplication and division.

Method Details

Add() public static method

Add two number in GF8
The subtraction is the same as the addition because with Galois fields, each number is its own negative. So there is no need to have a Sub method
public static Add ( UInt16 a, UInt16 b ) : UInt16
a System.UInt16 First number
b System.UInt16 Second number
return System.UInt16

Divide() public static method

a divide by b
public static Divide ( UInt16 numerator, UInt16 denominator ) : UInt16
numerator System.UInt16
denominator System.UInt16
return System.UInt16

Equals() public method

public Equals ( object o ) : bool
o object
return bool

GF16() public method

Ctor
public GF16 ( UInt16 i ) : System
i System.UInt16 Value
return System

GetHashCode() public method

public GetHashCode ( ) : int
return int

Multiply() public static method

Multiply 2 operandes
public static Multiply ( UInt16 a, UInt16 b ) : UInt16
a System.UInt16 First operande
b System.UInt16 Second operande
return System.UInt16

Power() public method

Power is used to create teh Vandermonde matrix
public Power ( int exponent ) : GF16
exponent int
return GF16

Power() public static method

public static Power ( UInt16 x, UInt32 exponent ) : UInt16
x System.UInt16
exponent System.UInt32
return System.UInt16

ToString() public method

Overload of the string operator
public ToString ( ) : string
return string

operator() public static method

Overload the + operator
public static operator ( ) : GF16
return GF16