-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
35 lines (25 loc) · 840 Bytes
/
Copy pathMain.java
File metadata and controls
35 lines (25 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package qr;
public class Main {
public static final String INPUT = "https://fr.pornhub.com/";
/*
* Parameters
*/
public static final int VERSION = 1;
public static final int MASK = 1;
public static final int SCALING = 20;
public static void main(String[] args) {
/*
* Encoding
*/
boolean[] encodedData = DataEncoding.byteModeEncoding(INPUT, VERSION);
int[][] qrCode = MatrixConstruction.renderQRCodeMatrix(VERSION, encodedData);
int penality = MatrixConstruction.evaluate(qrCode);
System.out.println("Le nombre de point de penalite pour le mask " + MASK + " est de " + penality + " points.");
int bestMask = MatrixConstruction.findBestMasking(VERSION, encodedData);
System.out.println("Le meilleur mask est le " + bestMask);
/*
* Visualization
*/
Helpers.show(qrCode, SCALING);
}
}