Skip to content

Commit

Permalink
Make converter and preprocessor subclasses of transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
vinx13 authored and vigsterkr committed Jun 8, 2018
1 parent a549768 commit 6e8a04e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 4 additions & 3 deletions src/shogun/converter/Converter.h
Expand Up @@ -9,21 +9,22 @@

#include <shogun/lib/config.h>

#include <shogun/lib/common.h>
#include <shogun/base/SGObject.h>
#include <shogun/features/Features.h>
#include <shogun/lib/common.h>
#include <shogun/transformer/Transformer.h>

namespace shogun
{

/** @brief class Converter used to convert data
*
*/
class CConverter : public CSGObject
class CConverter : public CTransformer
{
public:
/** constructor */
CConverter() : CSGObject() {};
CConverter() : CTransformer(){};

/** destructor */
virtual ~CConverter() {};
Expand Down
12 changes: 4 additions & 8 deletions src/shogun/preprocessor/Preprocessor.h
Expand Up @@ -10,10 +10,11 @@

#include <shogun/lib/config.h>

#include <shogun/lib/common.h>
#include <shogun/base/SGObject.h>
#include <shogun/features/FeatureTypes.h>
#include <shogun/features/Features.h>
#include <shogun/lib/common.h>
#include <shogun/transformer/Transformer.h>

namespace shogun
{
Expand Down Expand Up @@ -67,22 +68,17 @@ enum EPreprocessorType
* an abstract apply() method is there, which sub-classes may choose to use as
* a wrapper to more specific methods.
*/
class CPreprocessor : public CSGObject
class CPreprocessor : public CTransformer
{
public:
/** constructor */
CPreprocessor() : CSGObject()
{
};
CPreprocessor() : CTransformer(){};

/** destructor */
virtual ~CPreprocessor()
{
}

/** initialize preprocessor with features */
virtual bool init(CFeatures* features)=0;

/** generic interface for applying the preprocessor. sub-classes may use
* this method as a wrapper to specific implementations
*
Expand Down

0 comments on commit 6e8a04e

Please sign in to comment.