Ejemplo n.º 1
0
 internal xf094e3229d63c9be(int l, svm_node[][] x_, svm_parameter param)
 {
     int num;
     Label_00C5:
     this.xbcd9612004129925 = param.kernel_type;
     Label_0075:
     if ((((uint) num) | 0x80000000) != 0)
     {
         this.x83735b10b6a3d76d = param.degree;
         do
         {
             this.xc7c4e9c099884228 = param.gamma;
             this.x987b3666f8a37f90 = param.coef0;
             if (0xff != 0)
             {
                 this.x08db3aeabb253cb1 = (svm_node[][]) x_.Clone();
                 if (this.xbcd9612004129925 != 2)
                 {
                     this.x4f9e236643454e9f = null;
                     if (0 == 0)
                     {
                         if (0 == 0)
                         {
                             return;
                         }
                         goto Label_00C5;
                     }
                     goto Label_0075;
                 }
                 this.x4f9e236643454e9f = new double[l];
             }
         }
         while (2 == 0);
     }
     for (num = 0; num < l; num++)
     {
         this.x4f9e236643454e9f[num] = x99240096a9e3842c(this.x08db3aeabb253cb1[num], this.x08db3aeabb253cb1[num]);
     }
 }
Ejemplo n.º 2
0
        internal Kernel(int l, svm_node[][] x_, svm_parameter param)
        {
            kernel_type = param.kernel_type;
            degree = param.degree;
            gamma = param.gamma;
            coef0 = param.coef0;

            x = (svm_node[][]) x_.Clone();

            if (kernel_type == svm_parameter.RBF)
            {
                x_square = new double[l];
                for (int i = 0; i < l; i++)
                    x_square[i] = dot(x[i], x[i]);
            }
            else
                x_square = null;
        }