Package hlcd.parameters
Class CodeParameters
java.lang.Object
hlcd.parameters.CodeParameters
- All Implemented Interfaces:
Serializable
Stores the parameters of a code when being created. This includes the
length, dimension, minimum distance, if it is HLCD should the
restriction of the code generation be applied, should the identity matrix
be appended. The multithreading option is implemented but not tested
(hence not supported in this program). The restriction is explained on
page 91 of the thesis.
- Since:
- 1.8
- Version:
- 1.0 (January 19th, 2022)
- Author:
- Maysara Al Jumaily
- See Also:
- M.Sc. thesis.,
VectorGenerator, Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionCodeParameters(byte n, byte k, byte d, byte base)Initializes the basic parameters state of a code.CodeParameters(byte n, byte k, byte d, byte rhsWeight, byte base, boolean isHLCD, boolean isMultithreaded, boolean appendIdentity, boolean restrictCodewordGeneration)Initializes the basic state of a code. -
Method Summary
Modifier and TypeMethodDescriptionbytegetBase()Returns the base of the \(\left[n, \, k, \, d\right]_{base}\) code.bytegetD()Returns the minimum distance of the \(\left[n, \, k, \, d\right]_{base}\) code.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 should be \(d - 1\).booleanReturnstrueif a specific form of cut down in of search space be 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.toString()The text representation of the parameters used in the form of (n, k , d)_H_base (the H denotes it is Hermitian, ignored otherwise).
-
Constructor Details
-
CodeParameters
public CodeParameters(byte n, byte k, byte d, byte base)Initializes the basic parameters state of a code.- Parameters:
n- the length of codek- the dimension of the coded- the minimum distance of the codebase- the base of the code which should be \(2\) or \(4\)
-
CodeParameters
public CodeParameters(byte n, byte k, byte d, byte rhsWeight, byte base, boolean isHLCD, boolean isMultithreaded, boolean appendIdentity, boolean restrictCodewordGeneration)Initializes the basic state of a code.- Parameters:
n- the length of codek- the dimension of the coded- the minimum distance of the coderhsWeight- the weight of the right-hand-side of the matrix. In the case where the identity matrix is not appended, then it should be \(d\). Otherwise, it should be \(d - 1\).base- the base of the code which should be \(2\) or \(4\)isHLCD- if the quaternary code should be of type Hermitian linear complementary codeisMultithreaded- should multithreading be used for faster computation timeappendIdentity- should the identity matrix be added on the left-hand-side to cut down on the search spacerestrictCodewordGeneration- Should a specific form of cut down in of search space be applied. This should always betrue. The explanation of this form is found on page 91 of the thesis.
-
-
Method Details
-
getN
public byte getN()Returns the length of each codeword in a \(\left[n, \, k, \, d\right]_{ base}\) code. For a binary code, \(0 \lt n \leq 62\) and for a quaternary code, \(0 \lt n \leq 30\).- Returns:
- the length of each codeword in a \(\left[n, \, k, \, d\right]_{ base}\) code.
-
getK
public byte getK()Returns the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code. For a binary code, \(0 \lt k \leq 62\) and for a quaternary code, \(0 \lt k \leq 30\).- Returns:
- the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code
-
getD
public 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
public 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. It could either be \(2\) or \(4\).
-
getRHSWeight
public byte getRHSWeight()Returns the minimum weight of the right-side of the generator matrix \(G\) that is in standard form which should be \(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 should be \(d - 1\). In the case where it is not in standard form, it should return \(d\).
-
isHLCD
public boolean isHLCD()Returnstrueif the code is Hermitian linear complementary code,falseotherwise. This property should be true only if the code is quaternary. A traditional non-Hermitian quaternary code is not implemented here but can be easily implemented.- Returns:
- returns
trueif the code is Hermitian linear complementary code,falseotherwise
-
isIdentityAppended
public 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
public 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. It has been implemented but not test, hence, not supported yet.- 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
public boolean isCodewordRestrictionApplied()Returnstrueif a specific form of cut down in of search space be applied,falseotherwise. This should always betrue. The explanation of this form is found on Page 91 of the M.Sc. thesis- Returns:
- returns
trueif a specific form of cut down in of search space be applied,falseotherwise
-
toString
The text representation of the parameters used in the form of (n, k , d)_H_base (the H denotes it is Hermitian, ignored otherwise). The other parameters, such is generating all matrices, is code restriction applied, is the identity added, is multithreading used and the right-hand side weight of vectors in \(G\) are not a part of this.
-