SumOne.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2012 Sergey Lisitsyn
00008  * Copyright (C) 2012 Sergey Lisitsyn
00009  */
00010 
00011 #ifndef _CSUMONE__H__
00012 #define _CSUMONE__H__
00013 
00014 #include <shogun/preprocessor/DensePreprocessor.h>
00015 #include <shogun/features/Features.h>
00016 #include <shogun/lib/common.h>
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00031 class CSumOne : public CDensePreprocessor<float64_t>
00032 {
00033     public:
00035         CSumOne();
00036 
00038         virtual ~CSumOne();
00039 
00041         virtual bool init(CFeatures* features);
00043         virtual void cleanup();
00045         virtual bool load(FILE* f);
00047         virtual bool save(FILE* f);
00048 
00052         virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features);
00053 
00056         virtual SGVector<float64_t> apply_to_feature_vector(SGVector<float64_t> vector);
00057 
00059         virtual const char* get_name() const { return "SumOne"; }
00060 
00062         virtual EPreprocessorType get_type() const { return P_SUMONE; }
00063 };
00064 }
00065 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation