libeblearngui
|
00001 /*************************************************************************** 00002 * Copyright (C) 2009 by Pierre Sermanet * 00003 * pierre.sermanet@gmail.com * 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions are met: 00007 * * Redistributions of source code must retain the above copyright 00008 * notice, this list of conditions and the following disclaimer. 00009 * * Redistributions in binary form must reproduce the above copyright 00010 * notice, this list of conditions and the following disclaimer in the 00011 * documentation and/or other materials provided with the distribution. 00012 * * Redistribution under a license not approved by the Open Source 00013 * Initiative (http://www.opensource.org) must display the 00014 * following acknowledgement in all advertising material: 00015 * This product includes software developed at the Courant 00016 * Institute of Mathematical Sciences (http://cims.nyu.edu). 00017 * * The names of the authors may not be used to endorse or promote products 00018 * derived from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 00021 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00022 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00023 * DISCLAIMED. IN NO EVENT SHALL ThE AUTHORS BE LIABLE FOR ANY 00024 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00025 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00026 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00027 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00028 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 ***************************************************************************/ 00031 00032 #ifndef EBL_BASIC_GUI_H_ 00033 #define EBL_BASIC_GUI_H_ 00034 00035 #include "libidxgui.h" 00036 #include "ebl_basic.h" 00037 00038 namespace ebl { 00039 00041 00042 class linear_module_gui { 00043 public: 00044 linear_module_gui(); 00045 virtual ~linear_module_gui(); 00046 00047 template <typename T, class Tstate> 00048 static void display_fprop(linear_module<T,Tstate> &nn, Tstate &in, 00049 Tstate &out, uint &h0, uint &w0, double zoom, 00050 T vmin = 0, T vmax = 0, bool show_out = false); 00051 template <typename T, class Tstate> 00052 static void display_bprop(linear_module<T,Tstate> &nn, Tstate &in, 00053 Tstate &out, uint &h0, uint &w0, double zoom, 00054 T vmin = 0, T vmax = 0, bool show_out = false); 00055 template <typename T, class Tstate> 00056 static void display_bbprop(linear_module<T,Tstate> &nn, Tstate &in, 00057 Tstate &out, uint &h0, uint &w0, double zoom, 00058 T vmin = 0, T vmax = 0, bool show_out = false); 00059 }; 00060 00062 00063 class convolution_module_gui { 00064 public: 00065 convolution_module_gui(); 00066 virtual ~convolution_module_gui(); 00067 00068 template <typename T, class Tstate> 00069 static void display_fprop(convolution_module<T,Tstate> &nn, 00070 uint &h0, uint &w0, double zoom, 00071 T vmin = 0, T vmax = 0, 00072 bool show_out = false); 00073 00074 template <typename T, class Tstate> 00075 static void display_bprop(convolution_module<T,Tstate> &nn, 00076 uint &h0, uint &w0, double zoom, 00077 T vmin = 0, T vmax = 0, 00078 bool show_out = false); 00079 00080 template <typename T, class Tstate> 00081 static void display_bbprop(convolution_module<T,Tstate> &nn, 00082 uint &h0, uint &w0, double zoom, 00083 T vmin = 0, T vmax = 0, 00084 bool show_out = false); 00085 }; 00086 00088 00089 class subsampling_module_gui { 00090 public: 00091 subsampling_module_gui(); 00092 virtual ~subsampling_module_gui(); 00093 00094 template <typename T, class Tstate> 00095 static void display_fprop(subsampling_module<T,Tstate> &nn, 00096 Tstate &in, Tstate &out, 00097 uint &h0, uint &w0, double zoom, 00098 T vmin = 0, T vmax = 0, 00099 bool show_out = false); 00100 00101 template <typename T, class Tstate> 00102 static void display_bprop(subsampling_module<T,Tstate> &nn, 00103 Tstate &in, Tstate &out, 00104 uint &h0, uint &w0, double zoom, 00105 T vmin = 0, T vmax = 0, 00106 bool show_out = false); 00107 00108 template <typename T, class Tstate> 00109 static void display_bbprop(subsampling_module<T,Tstate> &nn, 00110 Tstate &in, Tstate &out, 00111 uint &h0, uint &w0, double zoom, 00112 T vmin = 0, T vmax = 0, 00113 bool show_out = false); 00114 }; 00115 00116 } // namespace ebl { 00117 00118 #include "ebl_basic_gui.hpp" 00119 00120 #endif /* EBL_BASIC_GUI_H_ */