Exemple #1
0
        static void Main(string[] args)
        {
            int[][] I=new int[][]{new int[]{0,0},new int[]{1,1}};
            int[][] B1 = new int[][] { new int[] { 1, 0 }, new int[] { 0, 1 } };
            int[][] B0 = new int[][] { new int[] { 1, 0 }, new int[] { 1, 0 } };
            int k = 2;
            int m = 2;
            int n = 2;
            DVCSCheck alg = new DVCSCheck(I, B0, B1, k, n, m);
            DVCSBasedAlgorithm dvcs = new DVCSBasedAlgorithm(I, 2, 2, B0, B1, k, n, m);
            PVCSBasedAlgorithm pvcs = new PVCSBasedAlgorithm(I, 2, 2, B0, B1, k, n, m);
            /*COMPROBACIÓN DE VALIDEZ DE Bs ELEGIDAS*/
            bool checkB0MaxR = alg.checkB0MaxR(1);
            bool checkB1MaxR = alg.checkB1MaxR(0);
            bool checkLessThanR = alg.checkLessThanR();
            bool check = alg.check(1, 0);

            /*Algoritmo: Transformadas */
            MatrixUtilities mu22 = new MatrixUtilities(n,m);
            char[][] L0 = mu22.T(B0);
            char[][] L1 = mu22.T(B1);
            MatrixUtilities mu32 = new MatrixUtilities(3, 2);
            int[][] b32 = new int[][]{ new int[] { 1, 0 }, new int[] { 0, 1 }, new int[] { 1, 0 } };
            char[][] l32 = mu32.T(b32);
            char[][][] T0 = mu22.permuteToT(L0);
            char[][][] T1 = mu22.permuteToT(L1);
            char[][][] T32 = mu32.permuteToT(l32);
            char[][][] shades_dvcs = dvcs.generateShades();
            char[][][] shades_pvcs = pvcs.generateShades();
        }
Exemple #2
0
 public DVCSCheck(int[][] I, int[][] B0, int[][] B1, int k, int n, int m)
 {
     this.I = I;
     this.B0 = B0;
     this.B1 = B1;
     this.k = k;
     this.n = n;
     this.m = m;
     mxu = new MatrixUtilities(n, m);
 }
 public PVCSBasedAlgorithm(int[][] A, int W, int H, int[][] B0, int[][] B1, int k, int n, int m)
 {
     mxu = new MatrixUtilities(n, m);
     this.A = A;
     this.W = W;
     this.H = H;
     this.B0 = B0;
     this.B1 = B1;
     this.k = k;
     this.m = m;
     this.n = n;
     L0 = mxu.T(B0);
     L1 = mxu.T(B1);
     T0 = mxu.permuteToT(L0);
     T1 = mxu.permuteToT(L1);
 }