ソースを参照

removed redundant KernelStd definition and declaration

Sven Sickert 8 年 前
コミット
d02a2068ff

+ 0 - 39
math/distances/KernelStd.cpp

@@ -1,39 +0,0 @@
-/** 
-* @file KernelStd.cpp
-* @brief Standard kernel
-* @author Erik Rodner
-* @date 10/24/2007
-
-*/
-
-#include <iostream>
-
-#include "vislearning/math/distances/KernelStd.h"
-
-using namespace OBJREC;
-
-using namespace std;
-// refactor-nice.pl: check this substitution
-// old: using namespace ice;
-using namespace NICE;
-
-
-
-KernelStd::KernelStd() : Kernel(true)
-{
-}
-
-KernelStd::~KernelStd()
-{
-}
-
-double KernelStd::K (const NICE::Vector & x, const NICE::Vector & y) const
-{
-	if ( x.size() != y.size() ) 
-		fthrow (Exception, "KernelStd::K: vectors must have the same dimension\n");
-    double sum = 0.0;
-    for ( int i = 0 ; i < (int)x.size() ; i++ )
-		sum += x[i] * y[i];
-
-    return sum;
-}

+ 0 - 40
math/distances/KernelStd.h

@@ -1,40 +0,0 @@
-/** 
-* @file KernelStd.h
-* @brief Standard kernel
-* @author Erik Rodner
-* @date 10/24/2007
-
-*/
-#ifndef KERNELSTDINCLUDE
-#define KERNELSTDINCLUDE
-
-#include "core/vector/VectorT.h"
-#include "core/vector/MatrixT.h"
-  
-#include "vislearning/math/kernels/Kernel.h"
-
-/** Standard kernel */
-
-namespace OBJREC {
-
-class KernelStd : public Kernel
-{
-
-    protected:
-
-    public:
-  
-	/** simple constructor */
-	KernelStd();
-      
-	/** simple destructor */
-	virtual ~KernelStd();
-	
-	double K (const NICE::Vector & x, const NICE::Vector & y) const;
-     
-};
-
-
-} // namespace
-
-#endif

+ 3 - 10
math/kernels/KernelStd.cpp

@@ -6,17 +6,10 @@
 
 */
 
-#include <iostream>
-
 #include "KernelStd.h"
 
 using namespace OBJREC;
 
-using namespace std;
-using namespace NICE;
-
-
-
 KernelStd::KernelStd() : Kernel(true)
 {
 }
@@ -27,11 +20,11 @@ KernelStd::~KernelStd()
 
 double KernelStd::K (const NICE::Vector & x, const NICE::Vector & y) const
 {
-	if ( x.size() != y.size() ) 
-		fthrow (Exception, "KernelStd::K: vectors must have the same dimension\n");
+    if ( x.size() != y.size() )
+        fthrow (NICE::Exception, "KernelStd::K: vectors must have the same dimension\n");
     double sum = 0.0;
     for ( int i = 0 ; i < (int)x.size() ; i++ )
-		sum += x[i] * y[i];
+        sum += x[i] * y[i];
 
     return sum;
 }

+ 10 - 10
math/kernels/KernelStd.h

@@ -1,4 +1,4 @@
-/** 
+/**
 * @file KernelStd.h
 * @brief Standard kernel
 * @author Erik Rodner
@@ -20,15 +20,15 @@ class KernelStd : public Kernel
     protected:
 
     public:
-  
-	/** simple constructor */
-	KernelStd();
-      
-	/** simple destructor */
-	virtual ~KernelStd();
-	
-	double K (const NICE::Vector & x, const NICE::Vector & y) const;
-     
+
+        /** simple constructor */
+        KernelStd();
+
+        /** simple destructor */
+        virtual ~KernelStd();
+
+        double K (const NICE::Vector & x, const NICE::Vector & y) const;
+
 };