include/copylinker.h

Go to the documentation of this file.
00001 /********************************************************************************
00002  *  Neural Network Framework.                                                   *
00003  *  Copyright (C) 2005-2008 Gianluca Massera <emmegian@yahoo.it>                *
00004  *                                                                              *
00005  *  This program is free software; you can redistribute it and/or modify        *
00006  *  it under the terms of the GNU General Public License as published by        *
00007  *  the Free Software Foundation; either version 2 of the License, or           *
00008  *  (at your option) any later version.                                         *
00009  *                                                                              *
00010  *  This program is distributed in the hope that it will be useful,             *
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of              *
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
00013  *  GNU General Public License for more details.                                *
00014  *                                                                              *
00015  *  You should have received a copy of the GNU General Public License           *
00016  *  along with this program; if not, write to the Free Software                 *
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA  *
00018  ********************************************************************************/
00019 
00020 #ifndef COPYLINKER_H
00021 #define COPYLINKER_H
00022 
00026 #include "types.h"
00027 #include "linker.h"
00028 
00029 namespace nnfw {
00030 
00054 class NNFW_API CopyLinker : public Linker {
00055 public:
00057     typedef enum { In2In = 0, In2Out = 1, Out2In = 2, Out2Out = 3 } CopyMode;
00058 
00061 
00064     CopyLinker( Cluster* from, Cluster* to, CopyMode mode, const char* name = "unnamed" );
00065 
00068     CopyLinker( PropertySettings& prop );
00069 
00072     virtual ~CopyLinker();
00073 
00075 
00077 
00080     void setMode( CopyMode );
00081 
00084     CopyMode getMode() const;
00085 
00088     bool setMode( const Variant& v );
00089     
00092     Variant getModeP();
00093 
00096     void update();
00097 
00100     u_int size() const;
00101 
00104     void randomize( Real , Real ) {
00105         // --- Do Nothing
00106     };
00107 
00109     virtual CopyLinker* clone() const;
00110 
00112 
00113 private:
00115     RealVec dataFrom;
00117     RealVec dataTo;
00119     bool viewsIsInit;
00121     u_int dimData;
00123     CopyMode mode;
00124 };
00125 
00126 }
00127 
00128 #endif
BerliOS Developer Logo Valid XHTML 1.0 Transitional Valid CSS!