Package hlcd.run
Class TestParameter
java.lang.Object
hlcd.run.TestParameter
Starts the execution of finding if the parameters specified of a code are
valid automatically once a constructor is called.
//minimal example to execute this class:
public static void main(String[] args) {
System.out.println("Running TestParameter...");
byte n = 8;
byte k = 4;
byte d = 4;
byte base = 4;
TestParameter tp = new TestParameter(n, k, d, base);
System.out.println("TestParameter completed.");
}- Since:
- 1.8
- Version:
- 1.0 (February 12th, 2022)
- Author:
- Maysara Al Jumaily
-
Constructor Summary
ConstructorsConstructorDescriptionTestParameter(byte n, byte k, byte d, byte base)Initiates the run of execution of the code based on the specified parameters.TestParameter(byte n, byte k, byte d, byte base, boolean beep)Initiates the run of execution of the code based on the specified parameters.TestParameter(CodeParameters cp, CodeValidatorParameters cvp, CodeExporterParameters cep, CodeDisplayParameters cdp, boolean beep)Initializes the execution to the specified parameters (the most customized executor).TestParameter(String path, CodeParameters p)Initiates the run of execution of the code based on theCodeParametersspecified. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the code found.booleanReturns whether the code is valid after the tests have been completed.static voidExecutes the program.
-
Constructor Details
-
TestParameter
Initiates the run of execution of the code based on theCodeParametersspecified. It will also run the validation of the code which is assigned to run all testes except checking for the Hermitian LCD property. Furthermore, it will export the code object, the generator matrix as a \(\LaTeX\) file and a Matlab file as well as the weight enumerator as a \(\LaTeX\) file. Lastly, a beep sound is played once the search is completed.- Parameters:
path- the directory path to write the files top- the parameters of the code to be executed
-
TestParameter
public TestParameter(byte n, byte k, byte d, byte base)Initiates the run of execution of the code based on the specified parameters. It will also run the validation of the code which is assigned to run all testes except checking for the Hermitian LCD property. Furthermore, it will export the code object, the generator matrix as a \(\LaTeX\) file and a Matlab file as well as the weight enumerator as a \(\LaTeX\) file. Lastly, a beep sound is played once the search is completed.- Parameters:
n- the length of each codeword in the codek- the dimension of the coded- the minimum distance of the codebase- the base of the code which could either be \(2\) or \(4\)
-
TestParameter
public TestParameter(byte n, byte k, byte d, byte base, boolean beep)Initiates the run of execution of the code based on the specified parameters. It will also run the validation of the code which is assigned to run all testes except checking for the Hermitian LCD property. Furthermore, it will export the code object, the generator matrix as a \(\LaTeX\) file and a Matlab file as well as the weight enumerator as a \(\LaTeX\) file.- Parameters:
n- the length of each codeword in the codek- the dimension of the coded- the minimum distance of the codebase- the base of the code which could either be \(2\) or \(4\)beep- whether a beep sound should be played after the completion of the execution of the program
-
TestParameter
public TestParameter(CodeParameters cp, CodeValidatorParameters cvp, CodeExporterParameters cep, CodeDisplayParameters cdp, boolean beep)Initializes the execution to the specified parameters (the most customized executor).- Parameters:
cp- the code parameterscvp- the code validator parameterscep- the code exporter parameterscdp- the display code parametersbeep- should the program play a beep sound once it completes running
-
-
Method Details
-
getCode
Returns the code found.- Returns:
- the code found
-
isValidCode
public boolean isValidCode()Returns whether the code is valid after the tests have been completed.- Returns:
trueif the code is valid,falseotherwise
-
main
Executes the program.- Parameters:
args- the arguments specified but will be ignored
-