proxtoolbox.experiments.sudoku package¶
This subpackage contains the Sudoku experiment.
Submodules¶
proxtoolbox.experiments.sudoku.sudokuExperiment module¶
-
class
proxtoolbox.experiments.sudoku.sudokuExperiment.
SudokuExperiment
(sudoku=None, norm_data=81, **kwargs)[source]¶ Bases:
proxtoolbox.experiments.experiment.Experiment
Sudoku experiment class
The goal of a standard Sudoku puzzle is to fill a 9x9 array with the numbers from 1 to 9. Every row, every column and each of the 9 3x3 subblocks should contain each number only once.
Starting point is a grid that already contains several numbers. Usually, there exists a unique solution.
-
static
getDefaultParameters
()[source]¶ Return the default parameters used by this experiment. The name of the parameters must match the arguments of the __init__() methods of the Experiment class and/or derived classes. Essentially this corresponds to the old config files. This static method must be implemented in the derived classes (the implementation given here only throws an exception). See example below.
Returns: - dictionary
Default parameters to be used for this experiment. Each entry must match an argument from the __init__() methods of the Experiment class and/or derived classes.
Notes
The following shows a typical implementation of this method:
@staticmethod def getDefaultParameters():
- defaultParams = {
- ‘object’: ‘complex’, ‘constraint’: ‘amplitude only’, ‘distance’: ‘far field’, ‘Nx’: 128, ‘Ny’: 128, ‘Nz’: 1, ‘product_space_dimension’: 4, ‘MAXIT’: 6000, ‘TOL’: 5e-5, ‘lambda_0’: 0.85, ‘lambda_max’: 0.85, ‘lambda_switch’: 20, ‘data_ball’: 1e-30, ‘diagnostic’: True, ‘iterate_monitor_name’: ‘FeasibilityIterateMonitor’, ‘verbose’: 1, ‘graphics’: 1, ‘anim’: False
} return defaultParams
-
static