浏览代码

removed merging issue with previous official release

Alexander Freytag 11 年之前
父节点
当前提交
4158390858
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      FastMinKernel.cpp

+ 3 - 2
FastMinKernel.cpp

@@ -435,7 +435,8 @@ void FastMinKernel::hikUpdateLookupTable(double * T, const double & alphaNew, co
     {
         double fval;
         int q_bin = q.quantize(x_i);
-        if ( (uint) q_bin > j )
+        
+        if ( q_bin > (int) j )
           fval = prototypes[j];
         else
           fval = x_i;      
@@ -899,7 +900,7 @@ double FastMinKernel::getFrobNormApprox()
       }
       secondTerm /= 3.0;
       secondTerm = pow(secondTerm, 2);
-      secondTerm *= (pow(this->n,2) - this->n);
+      secondTerm *= (this->n * ( this->n - 1 ));
       frobNormApprox += secondTerm;