Convolution.h
Go to the documentation of this file.
/***************************************************************************
File : Convolution.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2007 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Numerical convolution/deconvolution of data sets
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef CONVOLUTION_H
#define CONVOLUTION_H
#include <Filter.h>
class Convolution : public Filter
{
Q_OBJECT
public:
Convolution(ApplicationWindow *parent, Table *t, const QString& signalColName, const QString& responseColName);
void setDataFromTable(Table *t, const QString& signalColName, const QString& responseColName);
int signalDataSize(){return d_n_signal;};
int responseDataSize(){return d_n_response;};
protected:
void addResultCurve();
void convlv(double *sig, int n, double *dres, int m, int sign);
private:
virtual void output();
int d_n_signal;
int d_n_response;
};
class Deconvolution : public Convolution
{
Q_OBJECT
public:
Deconvolution(ApplicationWindow *parent, Table *t, const QString& realColName, const QString& imagColName = QString());
private:
void output();
};
#endif
Convolution::output
virtual void output()
Performs the data analysis and takes care of the output.
Definition: Convolution.cpp:118
Convolution::signalDataSize
int signalDataSize()
Returns the size of the signal data set.
Definition: Convolution.h:43
sign
#define sign(a)
Definition: ShapiroWilkTest.cpp:40
Filter
Abstract base class for data analysis operations.
Definition: Filter.h:43
Filter.h
Convolution::setDataFromTable
void setDataFromTable(Table *t, const QString &signalColName, const QString &responseColName)
Definition: Convolution.cpp:44
Convolution::addResultCurve
void addResultCurve()
Handles the graphical output.
Definition: Convolution.cpp:125
Convolution::d_n_response
int d_n_response
Size of the response data set.
Definition: Convolution.h:58
ApplicationWindow
QtiPlot&#39;s main window.
Definition: ApplicationWindow.h:133
Deconvolution
Definition: Convolution.h:61
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
Convolution::responseDataSize
int responseDataSize()
Returns the size of the response data set.
Definition: Convolution.h:45
Convolution
Definition: Convolution.h:34
Convolution::d_n_signal
int d_n_signal
Size of the signal data set.
Definition: Convolution.h:56
Convolution::convlv
void convlv(double *sig, int n, double *dres, int m, int sign)
Performes the convolution of the two data sets and stores the result in the signal data set...
Definition: Convolution.cpp:168
Convolution::Convolution
Convolution(ApplicationWindow *parent, Table *t, const QString &signalColName, const QString &responseColName)
Definition: Convolution.cpp:37