PLearn 0.1
|
00001 00002 #ifndef TransposeVariable_INC 00003 #define TransposeVariable_INC 00004 00005 #include <plearn/var/UnaryVariable.h> 00006 00007 namespace PLearn { 00008 using namespace std; 00009 00010 00011 class TransposeVariable: public UnaryVariable 00012 { 00013 private: 00014 typedef UnaryVariable inherited; 00015 00016 public: 00017 00019 TransposeVariable() : startk(0) {} 00020 00021 protected: 00022 int startk; 00023 00024 public: 00025 TransposeVariable(Variable* v); 00026 PLEARN_DECLARE_OBJECT(TransposeVariable); 00027 virtual void recomputeSize(int& l, int& w) const; 00028 00029 00030 virtual void fprop(); 00031 virtual void bprop(); 00032 virtual void symbolicBprop(); 00033 virtual void rfprop(); 00034 }; 00035 00036 DECLARE_OBJECT_PTR(TransposeVariable); 00037 00038 inline Var transpose(Var v) 00039 { return new TransposeVariable(v); } 00040 00041 } // end of namespace PLearn 00042 00043 #endif 00044 00045 /* 00046 Local Variables: 00047 mode:c++ 00048 c-basic-offset:4 00049 c-file-style:"stroustrup" 00050 c-file-offsets:((innamespace . 0)(inline-open . 0)) 00051 indent-tabs-mode:nil 00052 fill-column:79 00053 End: 00054 */ 00055 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=79 :