Class CodeParameters

java.lang.Object
hlcd.parameters.CodeParameters
All Implemented Interfaces:
Serializable

public class CodeParameters extends Object implements 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

    Constructors
    Constructor
    Description
    CodeParameters​(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 Type
    Method
    Description
    byte
    Returns the base of the \(\left[n, \, k, \, d\right]_{base}\) code.
    byte
    Returns the minimum distance of the \(\left[n, \, k, \, d\right]_{base}\) code.
    byte
    Returns the dimension of the \(\left[n, \, k, \, d\right]_{base}\) code.
    byte
    Returns the length of each codeword in a \(\left[n, \, k, \, d\right]_{ base}\) code.
    byte
    Returns the minimum weight of the right-side of the generator matrix \(G\) that is in standard form which should be \(d - 1\).
    boolean
    Returns true if a specific form of cut down in of search space be applied, false otherwise.
    boolean
    Returns true if the code is Hermitian linear complementary code, false otherwise.
    boolean
    Returns true if the identity matrix is appended to the left-side of the generator matrix, false otherwise.
    boolean
    Returns true if multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\), false otherwise.
    The text representation of the parameters used in the form of (n, k , d)_H_base (the H denotes it is Hermitian, ignored otherwise).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 code
      k - the dimension of the code
      d - the minimum distance of the code
      base - 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 code
      k - the dimension of the code
      d - the minimum distance of the code
      rhsWeight - 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 code
      isMultithreaded - should multithreading be used for faster computation time
      appendIdentity - should the identity matrix be added on the left-hand-side to cut down on the search space
      restrictCodewordGeneration - Should a specific form of cut down in of search space be applied. This should always be true. 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()
      Returns true if the code is Hermitian linear complementary code, false otherwise. 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 true if the code is Hermitian linear complementary code, false otherwise
    • isIdentityAppended

      public boolean isIdentityAppended()
      Returns true if the identity matrix is appended to the left-side of the generator matrix, false otherwise.
      Returns:
      returns true if the identity matrix is appended to the left-side of the generator matrix, false otherwise
    • isMultithreaded

      public boolean isMultithreaded()
      Returns true if multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\), false otherwise. 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 true if multithreading is used when calculating if some vector \(v\) is an appropriate codeword to be added to the generator matrix \(G\), false otherwise
    • isCodewordRestrictionApplied

      public boolean isCodewordRestrictionApplied()
      Returns true if a specific form of cut down in of search space be applied, false otherwise. This should always be true. The explanation of this form is found on Page 91 of the M.Sc. thesis
      Returns:
      returns true if a specific form of cut down in of search space be applied, false otherwise
    • toString

      public String 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.
      Overrides:
      toString in class Object
      Returns:
      The text representation of the parameters used.