Package hlcd.parameters
Class CodeValidatorParameters
java.lang.Object
hlcd.parameters.CodeValidatorParameters
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionThe default constructor which will set all parameters totrueexcept 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 TypeMethodDescriptionbooleanShould the validator check if the generator matrix \(G\) has a non-zero determinant (only used for quaternary Hermitian LCD codes).booleanShould the validator perform a check to ensure that the code \(\mathsf{ C}\) satisfies the Hermitian LCD property (for quaternary codes).booleanShould the validator perform a check to ensure all the codewords are unique such that there are no duplicates in the codewords of \(\mathsf{ C}\).booleanShould the validator perform a check to ensure the codewords in the code satisfy the minimum distance \(d\) constraint.booleanShould the validator perform a check to ensure the code \(\mathsf{C}\) contains the all-zero vector once and all other codewords are non-zero.booleanShould the program print invalid tests when encountered.booleanShould 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 theCodeobject.booleanShould the validator stop further testing once a test failed.voidsetCheckDeterminant(boolean checkDeterminant)Sets the state of whether the validator should perform a determinant check (only used for quaternary Hermitian LCD codes).voidsetCheckLCDProperty(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).voidsetCheckUniqueness(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}\).voidsetCheckValidMinimumDistance(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.voidsetCheckZeroVectors(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.voidsetPrintInvalidEntries(boolean printInvalidEntries)Sets the state of whether the validator should print out messages to the console of invalid tests encountered.voidsetReplicateLinearCombinations(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.voidsetStopWhenFalseEncountered(boolean stopWhenFalseEncountered)Sets the state of whether the validator should stop testing once a single test has failed.
-
Constructor Details
-
CodeValidatorParameters
public CodeValidatorParameters()The default constructor which will set all parameters totrueexcept 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 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\).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:
trueif a check is needed,falseotherwise
-
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:
trueif a check is needed,falseotherwise
-
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 theCodeobject.- Returns:
trueif a check is needed,falseotherwise- 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:
trueif a check is needed,falseotherwise
-
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:
trueif a check is needed,falseotherwise
-
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:
trueif a check is needed,falseotherwise
-
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 alwaysfalsebecause 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 betrueto ensure the correctness of the implementation of the program from bugs.- Returns:
trueif printing will occur,falseotherwise
-
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 betrueto stop the validator from continuing.- Returns:
trueif the validator will stop once a single test failed,falseotherwise
-
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
-