SudokuFX
Loading...
Searching...
No Matches
fr.softsf.sudokufx.benchmark.BenchGridMaster Class Reference

Classe de benchmark pour mesurer les performances des opérations sur la grille Sudoku, notamment le masquage de cases dans une grille résolue. More...

+ Collaboration diagram for fr.softsf.sudokufx.benchmark.BenchGridMaster:

Public Member Functions

void measureSudo (Blackhole bh)
 Benchmarks the cacherLesCases(int, int[]) method by hiding a fixed number of cells in a copy of the solved Sudoku grid.
 

Private Member Functions

Object cacherLesCases (int nombreDeCasesACacher, final int[] grilleAResoudre)
 Cache un nombre spécifié de cases dans la grille en les remplaçant par zéro.
 

Static Private Attributes

static final int[] DEFAULT_INDICES = IntStream.range(0, NOMBRE_CASES).toArray()
 
static final int[] GRILLE_RESOLUE
 
static final int NOMBRE_CASES = 81
 
static final int NOMBRE_DE_CASES_A_CACHER = 50
 

Detailed Description

Classe de benchmark pour mesurer les performances des opérations sur la grille Sudoku, notamment le masquage de cases dans une grille résolue.

Utilise JMH pour exécuter des tests de performance en mesurant le temps moyen d'exécution.

Member Function Documentation

◆ cacherLesCases()

Object fr.softsf.sudokufx.benchmark.BenchGridMaster.cacherLesCases ( int nombreDeCasesACacher,
final int[] grilleAResoudre )
private

Cache un nombre spécifié de cases dans la grille en les remplaçant par zéro.

Parameters
nombreDeCasesACacherLe nombre de cases à cacher dans la grille (au maximum 81 cases).
grilleAResoudreLe tableau représentant la grille, où les cases sélectionnées seront mises à 0.

◆ measureSudo()

void fr.softsf.sudokufx.benchmark.BenchGridMaster.measureSudo ( Blackhole bh)

Benchmarks the cacherLesCases(int, int[]) method by hiding a fixed number of cells in a copy of the solved Sudoku grid.

Parameters
bhthe Blackhole to consume the result and avoid dead code elimination during benchmarking
+ Here is the call graph for this function:

Member Data Documentation

◆ DEFAULT_INDICES

final int [] fr.softsf.sudokufx.benchmark.BenchGridMaster.DEFAULT_INDICES = IntStream.range(0, NOMBRE_CASES).toArray()
staticprivate

◆ GRILLE_RESOLUE

final int [] fr.softsf.sudokufx.benchmark.BenchGridMaster.GRILLE_RESOLUE
staticprivate
Initial value:
= {
3, 5, 9, 4, 6, 7, 2, 8, 1,
7, 6, 8, 5, 2, 1, 9, 4, 3,
4, 2, 1, 9, 8, 3, 5, 7, 6,
8, 3, 7, 1, 5, 2, 4, 6, 9,
2, 4, 6, 7, 3, 9, 8, 1, 5,
1, 9, 5, 8, 4, 6, 7, 3, 2,
6, 8, 4, 3, 9, 5, 1, 2, 7,
9, 7, 3, 2, 1, 8, 6, 5, 4,
5, 1, 2, 6, 7, 4, 3, 9, 8
}

◆ NOMBRE_CASES

final int fr.softsf.sudokufx.benchmark.BenchGridMaster.NOMBRE_CASES = 81
staticprivate

◆ NOMBRE_DE_CASES_A_CACHER

final int fr.softsf.sudokufx.benchmark.BenchGridMaster.NOMBRE_DE_CASES_A_CACHER = 50
staticprivate

The documentation for this class was generated from the following file: