PLearn 0.1
convolutions.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // convolutions.h
00003 
00004 // PLearn (A C++ Machine Learning Library)
00005 // Copyright (C) 1998 Pascal Vincent
00006 // Copyright (C) 1999-2002 Pascal Vincent, Yoshua Bengio and University of
00007 // Montreal
00008 //
00009 
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are met:
00012 //
00013 //  1. Redistributions of source code must retain the above copyright
00014 //     notice, this list of conditions and the following disclaimer.
00015 //
00016 //  2. Redistributions in binary form must reproduce the above copyright
00017 //     notice, this list of conditions and the following disclaimer in the
00018 //     documentation and/or other materials provided with the distribution.
00019 //
00020 //  3. The name of the authors may not be used to endorse or promote
00021 //     products derived from this software without specific prior written
00022 //     permission.
00023 //
00024 // THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
00025 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00026 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
00027 // NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00028 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
00029 // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00030 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00031 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00032 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00033 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034 //
00035 // This file is part of the PLearn library. For more information on the PLearn
00036 // library, go to the PLearn Web site at www.plearn.org
00037 
00038 
00039 /* *******************************************************
00040  * $Id$
00041  * This file is part of the PLearn library.
00042  ******************************************************* */
00043 
00046 #ifndef convolutions_INC
00047 #define convolutions_INC
00048 
00049 #include <plearn/math/TMat.h>
00050 
00051 namespace PLearn {
00052 
00058 void convolve1D(const Vec& source_signal, const Vec& kernel,
00059                 const Vec& dest_signal, int step=1, bool accumulate=true);
00060 
00061 
00073 void backConvolve1D(const Vec& source_signal, const Vec& kernel,
00074                     const Vec& dest_signal, int step=1, bool accumulate=true);
00075 
00076 
00082 void convolve1Dbackprop(const Vec& source_signal, const Vec& kernel,
00083                         const Vec& dC_ddest_signal,
00084                         const Vec& dC_dsource_signal, const Vec& dC_dkernel,
00085                         int step=1, bool accumulate=true);
00086 
00087 
00091 void convolve1Dbackprop(const Vec& source_signal,
00092                         const Vec& dC_ddest_signal,
00093                         const Vec& dC_dkernel,
00094                         int step=1, bool accumulate=true);
00095 
00096 
00102 void backConvolve1Dbackprop(const Vec& kernel, const Vec& dest_signal,
00103                             const Vec& dC_ddest_signal,
00104                             const Vec& dC_dsource_signal,
00105                             const Vec& dC_dkernel,
00106                             int step=1, bool accumulate=true);
00107 
00108 
00111 void backConvolve1Dbackprop(const Vec& dest_signal,
00112                             const Vec& dC_dsource_signal,
00113                             const Vec& dC_dkernel,
00114                             int step=1, bool accumulate=true);
00115 
00116 
00123 void convolve2D(const Mat& source_image, const Mat& kernel,
00124                 const Mat& dest_image,
00125                 int step1=1, int step2=1, bool accumulate=true);
00126 
00127 
00146 void backConvolve2D(const Mat& source_image, const Mat& kernel,
00147                     const Mat& dest_image,
00148                     int step1=1, int step2=1, bool accumulate=true);
00149 
00150 
00159 void convolve2Dbackprop(const Mat& source_image, const Mat& kernel,
00160                         const Mat& dC_ddest_image,
00161                         const Mat& dC_dsource_image, const Mat& dC_dkernel,
00162                         int step1=1, int step2=1, bool accumulate=true);
00163 
00164 
00171 void convolve2Dbackprop(const Mat& source_image,
00172                         const Mat& dC_ddest_image,
00173                         const Mat& dC_dkernel,
00174                         int step1=1, int step2=1, bool accumulate=true);
00175 
00176 
00186 void backConvolve2Dbackprop(const Mat& kernel, const Mat& dest_image,
00187                             const Mat& dC_ddest_image,
00188                             const Mat& dC_dsource_image, const Mat& dC_dkernel,
00189                             int step1=1, int step2=1, bool accumulate=true);
00190 
00191 
00198 void backConvolve2Dbackprop(const Mat& dest_image,
00199                             const Mat& dC_dsource_image,
00200                             const Mat& dC_dkernel,
00201                             int step1=1, int step2=1, bool accumulate=true);
00202 
00203 } // end of namespace PLearn
00204 
00205 #endif //!<  convolutions_INC
00206 
00207 
00208 /*
00209   Local Variables:
00210   mode:c++
00211   c-basic-offset:4
00212   c-file-style:"stroustrup"
00213   c-file-offsets:((innamespace . 0)(inline-open . 0))
00214   indent-tabs-mode:nil
00215   fill-column:79
00216   End:
00217 */
00218 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=79 :
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines