Package hlcd.linearCode
Interface CodeOperations
- All Known Implementing Classes:
Code
public interface CodeOperations
The operations a mathematical linear code.
- Since:
- 1.8
- Version:
- 1.0 (February 10th, 2022)
- Author:
- Maysara Al Jumaily
-
Method Summary
Modifier and TypeMethodDescriptionbytegetBase()Returns the base of the \(\left[n, \, k, \, d\right]_{base}\) code.Returns the code statistics which includes the total time taken, parameters of the code and parameters of the validator used.Returns the code validator parameters of the code.The linear combinations of the codewords in the code.bytegetD()Returns the minimum distance of the \(\left[n, \, k, \, d\right]_{base}\) code.Returns the generator matrix \(G\).Returns the matrix \(G\) as a brand-new copy (deep copy).bytegetK()Returns the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code.bytegetN()Returns the length of each codeword in a \(\left[n, \, k, \, d\right]_{ base}\) code.byteReturns the minimum weight of the right-side of the generator matrix \(G\) that is in standard form, which is \(d - 1\).booleanReturnstrueif a specific form of cut down in the space search has been applied,falseotherwise.booleanisHLCD()Returnstrueif the code is Hermitian linear complementary code,falseotherwise.booleanReturnstrueif the identity matrix is appended to the left-side of the generator matrix,falseotherwise.booleanReturnstrueif multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\),falseotherwise.voidPrints the current code parameters on screen.voidprintCombinations(String delimiter, Style style)Prints the elements in the combination array on screen with the style type specified.voidPrints the current matrix on console with brackets surrounding the matrix, a single space between columns, each digit is written in base 10 as well as the size of the matrix.voidprintGeneratorMatrix(boolean addBrackets, Style style, boolean showSize)Prints the current matrix on console with columns separated by a single space.voidprintGeneratorMatrix(String delimiter, boolean addBrackets, Style style, boolean showSize)Prints the current matrix on console.
-
Method Details
-
printCodeParameters
void printCodeParameters()Prints the current code parameters on screen. More precisely, it will print the generator \(n\), \(k\), \(d\), base values, number of linear combinations, the combinations themselves and the vectors used in the generator matrix and other properties.- See Also:
CodeParameters
-
getGeneratorMatrix
Matrix getGeneratorMatrix()Returns the generator matrix \(G\).- Returns:
- the generator matrix \(G\)
- See Also:
getGeneratorMatrixCopy()
-
getGeneratorMatrixCopy
Matrix getGeneratorMatrixCopy()Returns the matrix \(G\) as a brand-new copy (deep copy).NOT TESTED YET!
- Returns:
- the matrix \(G\) as a brand-new copy (deep copy)
- See Also:
getGeneratorMatrix()
-
getN
byte getN()Returns the length of each codeword in a \(\left[n, \, k, \, d\right]_{ base}\) code. For a binary code, \(1 \lt n \leq 62\) and for a quaternary code, \(1 \lt n \leq 30\).- Returns:
- the length of each codeword in the \(\left[n, \, k, \, d\right]_{base}\) code
-
getK
byte getK()Returns the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code. For a binary code, \(1 \lt k \leq 62\) and for a quaternary code, \(1 \lt k \leq 30\).- Returns:
- the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code
-
getD
byte getD()Returns the minimum distance of the \(\left[n, \, k, \, d\right]_{base}\) code. It should be less than \(n\).- Returns:
- the minimum distance of the \(\left[n, \, k, \, d\right]_{base}\) code
-
getBase
byte getBase()Returns the base of the \(\left[n, \, k, \, d\right]_{base}\) code. It could either be \(2\) or \(4\).- Returns:
- the base of the \(\left[n, \, k, \, d\right]_{base}\) code which could either be \(2\) or \(4\)
-
getRHSWeight
byte getRHSWeight()Returns the minimum weight of the right-side of the generator matrix \(G\) that is in standard form, which is \(d - 1\). In the case where it is not in standard form, it should return \(d\).- Returns:
- returns the minimum weight of the right-side of the generator matrix \(G\) that is in standard form, which is \(d - 1\). In the case where it is not in standard form, it should return \(d\).
-
printCombinations
Prints the elements in the combination array on screen with the style type specified.- Parameters:
delimiter- the delimiter between each digitstyle- the style format which could either be binary, quaternary, decimal or \(\LaTeX\)
-
printGeneratorMatrix
void printGeneratorMatrix()Prints the current matrix on console with brackets surrounding the matrix, a single space between columns, each digit is written in base 10 as well as the size of the matrix. -
printGeneratorMatrix
Prints the current matrix on console with columns separated by a single space. The brackets surrounding the matrix will be displayed ifaddBracketsistrue. Each digit is displayed based on the style specified. It will show the size of the matrix in the bottom-right corner ifshowSizeistrue.- Parameters:
addBrackets- should brackets around the matrix be displayedstyle- the style format which could either be binary, quaternary, decimal or \(\LaTeX\)showSize- should the dimension of the matrix be shown at the bottom-right
-
printGeneratorMatrix
Prints the current matrix on console. The columns will be separated by the delimiter specified. The brackets surrounding the matrix will be displayed ifaddBracketsistrue. Each digit is displayed based on the style specified. It will show the size of the matrix in the bottom-right corner ifshowSizeistrue.- Parameters:
delimiter- the delimiter between columns of current matrixaddBrackets- should brackets around the matrix be displayedstyle- the style format which could either be binary, quaternary, decimal or \(\LaTeX\)showSize- should the dimension of the matrix be shown at the bottom-right
-
getCombinations
LongArray getCombinations()The linear combinations of the codewords in the code.- Returns:
- the linear combinations of the codewords in the code
-
isHLCD
boolean isHLCD()Returnstrueif the code is Hermitian linear complementary code,falseotherwise. This property can be true when the code is quaternary. Note that this program dealt with only Hermitian quaternary codes but can be easily extended to traditional quaternary codes.- Returns:
- returns
trueif the code is Hermitian linear complementary code,falseotherwise
-
isIdentityAppended
boolean isIdentityAppended()Returnstrueif the identity matrix is appended to the left-side of the generator matrix,falseotherwise.- Returns:
- returns
trueif the identity matrix is appended to the left-side of the generator matrix,falseotherwise
-
isMultithreaded
boolean isMultithreaded()Returnstrueif multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\),falseotherwise. This deals with checking and ensuring that \(v\), \(\omega v\) and \(\overline{\omega} v\) are linearly independent with all linear combinations that are currently stored. This is coded but not tested.- Returns:
- returns
trueif multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\),falseotherwise
-
isCodewordRestrictionApplied
boolean isCodewordRestrictionApplied()Returnstrueif a specific form of cut down in the space search has been applied,falseotherwise. This should always betrue. The explanation of this form is found on page 91 of the thesis.- Returns:
- returns
trueif a specific form of cut down in the space search has been applied,falseotherwise
-
getCodeStatistics
CodeStatistics getCodeStatistics()Returns the code statistics which includes the total time taken, parameters of the code and parameters of the validator used.- Returns:
- the statistics of the code
-
getCodeValidatorParameters
CodeValidatorParameters getCodeValidatorParameters()Returns the code validator parameters of the code.- Returns:
- the code validator parameters of the code
-