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 Type
    Method
    Description
    byte
    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.
    byte
    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).
    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 is \(d - 1\).
    boolean
    Returns true if a specific form of cut down in the space search has been 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.
    void
    Prints the current code parameters on screen.
    void
    printCombinations​(String delimiter, Style style)
    Prints the elements in the combination array on screen with the style type specified.
    void
    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.
    void
    printGeneratorMatrix​(boolean addBrackets, Style style, boolean showSize)
    Prints the current matrix on console with columns separated by a single space.
    void
    printGeneratorMatrix​(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

      void printCombinations(String delimiter, Style style)
      Prints the elements in the combination array on screen with the style type specified.
      Parameters:
      delimiter - the delimiter between each digit
      style - 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

      void printGeneratorMatrix(boolean addBrackets, Style style, boolean showSize)
      Prints the current matrix on console with columns separated by a single space. The brackets surrounding the matrix will be displayed if addBrackets is true. Each digit is displayed based on the style specified. It will show the size of the matrix in the bottom-right corner if showSize is true.
      Parameters:
      addBrackets - should brackets around the matrix be displayed
      style - 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

      void printGeneratorMatrix(String delimiter, boolean addBrackets, Style style, boolean showSize)
      Prints the current matrix on console. The columns will be separated by the delimiter specified. The brackets surrounding the matrix will be displayed if addBrackets is true. Each digit is displayed based on the style specified. It will show the size of the matrix in the bottom-right corner if showSize is true.
      Parameters:
      delimiter - the delimiter between columns of current matrix
      addBrackets - should brackets around the matrix be displayed
      style - 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()
      Returns true if the code is Hermitian linear complementary code, false otherwise. 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 true if the code is Hermitian linear complementary code, false otherwise
    • isIdentityAppended

      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

      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. This is coded but not tested.
      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

      boolean isCodewordRestrictionApplied()
      Returns true if a specific form of cut down in the space search has been applied, false otherwise. This should always be true. The explanation of this form is found on page 91 of the thesis.
      Returns:
      returns true if a specific form of cut down in the space search has been applied, false otherwise
    • 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