Class CodeValidatorParameters

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

public class CodeValidatorParameters extends Object implements Serializable
Stores the options of a code \(\mathsf{C}\) when being validated to ensure the generator matrix \(G\) does satisfy the necessary requirements of the \(\left[n, \, k, \, d\right]_{base}\) code found.
Since:
1.8
Version:
1.0 (January 21st, 2022)
Author:
Maysara Al Jumaily
See Also:
Serialized Form
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor which will set all parameters to true except checking for Hermitian LCD property and printing invalid entries.
    CodeValidatorParameters​(boolean checkDeterminant, boolean checkZeroVectors, boolean replicateLinearCombinations, boolean checkValidMinimumDistance, boolean checkUniqueness, boolean checkHLCDProperty, boolean printInvalidEntries, boolean stopWhenFalseEncountered)
    Initializes the state of a code validator options.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Should the validator check if the generator matrix \(G\) has a non-zero determinant (only used for quaternary Hermitian LCD codes).
    boolean
    Should the validator perform a check to ensure that the code \(\mathsf{ C}\) satisfies the Hermitian LCD property (for quaternary codes).
    boolean
    Should the validator perform a check to ensure all the codewords are unique such that there are no duplicates in the codewords of \(\mathsf{ C}\).
    boolean
    Should the validator perform a check to ensure the codewords in the code satisfy the minimum distance \(d\) constraint.
    boolean
    Should the validator perform a check to ensure the code \(\mathsf{C}\) contains the all-zero vector once and all other codewords are non-zero.
    boolean
    Should the program print invalid tests when encountered.
    boolean
    Should the validator perform a check to ensure the linear combinations of the codewords in the generator matrix \(G\) yield the same linear combination of codewords stored in the Code object.
    boolean
    Should the validator stop further testing once a test failed.
    void
    setCheckDeterminant​(boolean checkDeterminant)
    Sets the state of whether the validator should perform a determinant check (only used for quaternary Hermitian LCD codes).
    void
    setCheckLCDProperty​(boolean checkHLCDProperty)
    Sets the state of whether the validator should perform a check to ensure all the code \(\mathsf{C}\) satisfies the Hermitian LCD property (for quaternary codes).
    void
    setCheckUniqueness​(boolean checkUniqueness)
    Sets the state of whether the validator should perform a check to ensure all the codewords are unique such that there are no duplicates in the codewords of \(\mathsf{C}\).
    void
    setCheckValidMinimumDistance​(boolean checkValidMinimumDistance)
    Sets the state of whether the validator should perform a check to ensure all the codewords in the code satisfy the minimum distance \(d\) constraint.
    void
    setCheckZeroVectors​(boolean checkZeroVectors)
    Sets the state of whether the validator should perform a check to ensure the codewords in \(\mathsf{C}\) contain a single nonzero vector.
    void
    setPrintInvalidEntries​(boolean printInvalidEntries)
    Sets the state of whether the validator should print out messages to the console of invalid tests encountered.
    void
    setReplicateLinearCombinations​(boolean replicateLinearCombinations)
    Sets the state of whether the validator should perform a check to ensure the codewords in \(G\) generate all the linear combinations found.
    void
    setStopWhenFalseEncountered​(boolean stopWhenFalseEncountered)
    Sets the state of whether the validator should stop testing once a single test has failed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CodeValidatorParameters

      public CodeValidatorParameters()
      The default constructor which will set all parameters to true except checking for Hermitian LCD property and printing invalid entries.
    • CodeValidatorParameters

      public CodeValidatorParameters(boolean checkDeterminant, boolean checkZeroVectors, boolean replicateLinearCombinations, boolean checkValidMinimumDistance, boolean checkUniqueness, boolean checkHLCDProperty, boolean printInvalidEntries, boolean stopWhenFalseEncountered)
      Initializes the state of a code validator options.
      Parameters:
      checkDeterminant - should the determinant of \(G\) be checked so that it is not zero. This is used for quaternary Hermitian LCD codes.
      checkZeroVectors - Checks if there exists zero vectors (other than the all-zero default vector) in the linear combinations found. There shouldn't be any because all the number of slots of the linear combinations stored is \(2^k\) if the code is binary and \(4^k\) if quaternary. At the beginning, all the slots are zeroed out.
      replicateLinearCombinations - Uses the codewords in \(G\) and recalculates all the codewords in the code by generating their linear combinations and ensures they match what the code already store as linear combinations.
      checkValidMinimumDistance - Ensures all the codewords in the combinations satisfy the minimum distance constraint.
      checkUniqueness - Ensures all the linear combinations stored are unique and are no duplicates.
      checkHLCDProperty - Ensures to loop through all the possible vectors in the space \(base^n\), stores all the vectors that are orthogonal (using Hermitian dot product) to all codewords of the code in a set \(S\). Then, it ensures all of these vectors found are not codewords of the code \(\mathsf{C}\). In the case where a vector is found in both \(S\) and \(\mathsf{C}\), then the implementation of this program wrong. Note: this should almost always be false. It is not necessary to check but if checked and all is clear, then the implementation of this program is flawless. Also, this will take enormously long time to complete. Hence, not recommended at all for values of \(k \gt 8\).
      printInvalidEntries - Should messages be printed on console about the invalid aspects found in the code.
      stopWhenFalseEncountered - Should the validator stop as soon as one of the options conclude the code is invalid.
  • Method Details

    • isCheckDeterminant

      public boolean isCheckDeterminant()
      Should the validator check if the generator matrix \(G\) has a non-zero determinant (only used for quaternary Hermitian LCD codes).
      Returns:
      true if a check is needed, false otherwise
    • setCheckDeterminant

      public void setCheckDeterminant(boolean checkDeterminant)
      Sets the state of whether the validator should perform a determinant check (only used for quaternary Hermitian LCD codes).
      Parameters:
      checkDeterminant - the new value
    • isCheckZeroVectors

      public boolean isCheckZeroVectors()
      Should the validator perform a check to ensure the code \(\mathsf{C}\) contains the all-zero vector once and all other codewords are non-zero. This is because when the program is initialized, the default value for all the linear combinations is zero.
      Returns:
      true if a check is needed, false otherwise
    • setCheckZeroVectors

      public void setCheckZeroVectors(boolean checkZeroVectors)
      Sets the state of whether the validator should perform a check to ensure the codewords in \(\mathsf{C}\) contain a single nonzero vector.
      Parameters:
      checkZeroVectors - the new value
    • isReplicateCombinationsValid

      public boolean isReplicateCombinationsValid()
      Should the validator perform a check to ensure the linear combinations of the codewords in the generator matrix \(G\) yield the same linear combination of codewords stored in the Code object.
      Returns:
      true if a check is needed, false otherwise
      See Also:
      Code
    • setReplicateLinearCombinations

      public void setReplicateLinearCombinations(boolean replicateLinearCombinations)
      Sets the state of whether the validator should perform a check to ensure the codewords in \(G\) generate all the linear combinations found.
      Parameters:
      replicateLinearCombinations - the new value
    • isCheckValidMinimumDistance

      public boolean isCheckValidMinimumDistance()
      Should the validator perform a check to ensure the codewords in the code satisfy the minimum distance \(d\) constraint.
      Returns:
      true if a check is needed, false otherwise
    • setCheckValidMinimumDistance

      public void setCheckValidMinimumDistance(boolean checkValidMinimumDistance)
      Sets the state of whether the validator should perform a check to ensure all the codewords in the code satisfy the minimum distance \(d\) constraint.
      Parameters:
      checkValidMinimumDistance - the new value
    • isCheckUniqueness

      public boolean isCheckUniqueness()
      Should the validator perform a check to ensure all the codewords are unique such that there are no duplicates in the codewords of \(\mathsf{ C}\).
      Returns:
      true if a check is needed, false otherwise
    • setCheckUniqueness

      public void setCheckUniqueness(boolean checkUniqueness)
      Sets the state of whether the validator should perform a check to ensure all the codewords are unique such that there are no duplicates in the codewords of \(\mathsf{C}\).
      Parameters:
      checkUniqueness - the new value
    • isCheckHLCDProperty

      public boolean isCheckHLCDProperty()
      Should the validator perform a check to ensure that the code \(\mathsf{ C}\) satisfies the Hermitian LCD property (for quaternary codes). It will loop through all the possible vectors in the space \(base^n\), stores all the vectors that are orthogonal (using Hermitian dot product) to all codewords of the code in a set \(S\). Then, it ensures all of these vectors found are not codewords of the code \(\mathsf{C}\). In the case where a vector is found in both \(S\) and \(\mathsf{C}\), then the implementation of this program wrong. Note: this should almost always befalse. It is not necessary to check but if checked and all is clear, then the implementation of this program is flawless. Also, this will take enormously long time to complete. Hence, not recommended at all for values of \(k \gt 8\).
      Returns:
      true if a check is needed, false otherwise
    • setCheckLCDProperty

      public void setCheckLCDProperty(boolean checkHLCDProperty)
      Sets the state of whether the validator should perform a check to ensure all the code \(\mathsf{C}\) satisfies the Hermitian LCD property (for quaternary codes). It should be always false because it takes a significantly long time to complete.
      Parameters:
      checkHLCDProperty - the new value
    • isPrintInvalidEntries

      public boolean isPrintInvalidEntries()
      Should the program print invalid tests when encountered. This is used for debugging purposes. Nonetheless, it should be true to ensure the correctness of the implementation of the program from bugs.
      Returns:
      true if printing will occur, false otherwise
    • setPrintInvalidEntries

      public void setPrintInvalidEntries(boolean printInvalidEntries)
      Sets the state of whether the validator should print out messages to the console of invalid tests encountered.
      Parameters:
      printInvalidEntries - the new value
    • isStopWhenFalseEncountered

      public boolean isStopWhenFalseEncountered()
      Should the validator stop further testing once a test failed. This should be true to stop the validator from continuing.
      Returns:
      true if the validator will stop once a single test failed, false otherwise
    • setStopWhenFalseEncountered

      public void setStopWhenFalseEncountered(boolean stopWhenFalseEncountered)
      Sets the state of whether the validator should stop testing once a single test has failed.
      Parameters:
      stopWhenFalseEncountered - the new value