SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MatrixOperator.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) 2013 Soumyajit De
00008  */
00009 
00010 #ifndef MATRIX_OPERATOR_H_
00011 #define MATRIX_OPERATOR_H_
00012 
00013 #include <shogun/lib/config.h>
00014 #include <shogun/mathematics/linalg/linop/LinearOperator.h>
00015 
00016 namespace shogun
00017 {
00018 
00026 template<class T> class CMatrixOperator : public CLinearOperator<T>
00027 {
00028 public:
00030     CMatrixOperator()
00031     : CLinearOperator<T>()
00032     {
00033     }
00034 
00040     CMatrixOperator(index_t dimension)
00041     : CLinearOperator<T>(dimension)
00042     {
00043     }
00044 
00046     ~CMatrixOperator()
00047     {
00048     }
00049 
00056     virtual SGVector<T> apply(SGVector<T> b) const = 0;
00057 
00063     virtual void set_diagonal(SGVector<T> diag) = 0;
00064 
00070     virtual SGVector<T> get_diagonal() const = 0;
00071 
00073     virtual const char* get_name() const
00074     {
00075         return "MatrixOperator";
00076     }
00077 
00078 };
00079 }
00080 
00081 #endif // MATRIX_OPERATOR_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation