C# Class NewTOAPIA.Net.Rtp.FEC_Matrix

Overview: ------------------------------------------------------------------------------------------- FEC_Matrix is a class that implements the basic matrix calculation using Galois Fields on 16 bits (GF16). Public Methods: ------------------------------------------------------------------------------------------- Invert - Invert the matrix by using Gauss-Jordan using GF16 operations CreateVandermondeMatrix - Create a Vandermonde matrix over GF16
ファイルを表示 Open project: Wiladams/NewTOAPIA

Public Methods

Method Description
CreateVandermondeMatrix ( int columns, int rows ) : ].UInt16[

Create a Vandermonde matrix of size row x column over GF16

The Vandermonde matrix is typically used to create the encoding matrix where: - The number of Columns of the matrix correspond to number of checksum packets. - The number of Rows of the matrix correspond to number of data packets.

Invert ( GF16 mtxIn_GF16 ) : ].GF16[

Invert the matrix by using Gauss-Jordan using GF16 operations

The inversion is done by adding the identity matrix to the right and using Gauss-Jordan algorithm (elementary operations on rows) until we get the identity matrix on the left. Then we strip the identity on the left in order to get the reverted matrix.

Private Methods

Method Description
AddIdentityRight ( GF16 matrixIn ) : ].GF16[

Add identity to the right side of a matrix

This is use when doing Jordan-Gauss elimination

GaussJordan ( GF16 matrixIn ) : ].GF16[

Gauss - Jordan elimination. This algorithm takes a matrix and use elementary row operations to put the matrix in a row echelon form. This means that the result matrix will have the identity matrix at the begining. This method can be used in 2 specific scenarios: - To solve a linear system numerically - To invert a matrix

For the Reed Solomon encoding, Gauss - Jordan elimination is used to invert the decoding matrix. This is needed to recover from packet loss. Important note: The input is modified

MatrixCopyTo ( GF16 matrixIn, GF16 matrixDestination ) : void

Copy a matrix to a destination matrix

StripIdentity ( GF16 matrixIn ) : ].GF16[

Remove the identity at the front of the matrix

Method Details

CreateVandermondeMatrix() public static method

Create a Vandermonde matrix of size row x column over GF16
The Vandermonde matrix is typically used to create the encoding matrix where: - The number of Columns of the matrix correspond to number of checksum packets. - The number of Rows of the matrix correspond to number of data packets.
public static CreateVandermondeMatrix ( int columns, int rows ) : ].UInt16[
columns int The number of columns of the Vandermonde matrix
rows int The number of rows of the Vandermode matrix
return ].UInt16[

Invert() public static method

Invert the matrix by using Gauss-Jordan using GF16 operations
The inversion is done by adding the identity matrix to the right and using Gauss-Jordan algorithm (elementary operations on rows) until we get the identity matrix on the left. Then we strip the identity on the left in order to get the reverted matrix.
public static Invert ( GF16 mtxIn_GF16 ) : ].GF16[
mtxIn_GF16 GF16 The matrix to invert
return ].GF16[