Antonio S. Torralba
Universidad Complutense  

Chemistry

BBM1

Biophysics

 

FUNDER - Documentation


Feria Only in Spanish. Sorry!

Funder

Main

Theory

Documents

Example

Download

Contact


 

Susceptibility - Public methods

Prev

C++ classes

Up

Response - Public methods

Next



Signal - PUBLIC METHODS


Signal();

Creates a step function of 100 discrete-time points and time increment equal to 0.1


Signal(int size, double scale);

Creates a step function with the specified parameters.

Parameters

size

Number of discrete-time points

scale

Time increment between discrete-time points


Signal(double *data, int size, double scale);

Creates a signal with the specified parameters and from a vector of data.

Parameters

data

Pointer to a vector containing the discrete time-course of the signals

size

Number of discrete-time points

scale

Time increment between discrete-time points


Signal(const Signal &);

Copy constructor. Implicitly called when initializating in declarations.


~Signal();

Destruction of the signal unallocates the memory reserved for the data.


Signal operator+(const Signal &);

Addition of signals means addition point by point. If the signals are not in the same scale or the number of discrete-time points is different, this method prompts an error and the program terminates.


Signal operator-(const Signal &);

Subtraction of signals means subtraction point by point. If the signals are not in the same scale or the number of discrete-time points is different, this method prompts an error and the program terminates.


Signal operator*(const Signal &);

Product of signals means convolution of signals. This is a commutative operation. If the signals are not in the same scale or the number of discrete-time points is different, this method prompts an error and the program terminates.


Signal operator/(const Signal &);

Division of signals means deconvolution. The first point of the second signal must be different from zero. Otherwise, the program terminates. If the signals are not in the same scale or the number of discrete-time points is different, this method prompts an error and the program terminates.


Signal operator+(const double);

Addition of a constant means addition of the constant to every point.


Signal operator-(const double);

Subtraction of a constant means subtraction of the constant from every point.


Signal operator*(const double);

Product by a constant means product of every point by the constant.


Signal operator/(const double);

Division by a constant means division of every point by the constant. If the constant is zero, the program terminates.


Signal & operator=(const Signal &);

Assignment of signals.


Signal Derivative();

Derivative of the signal, assuming that the value of the signal at the origin is zero. It returns the derivative obtained after the operation.


double Integral();

Returns the area under the signal.


Signal Primitive();

Returns the primitive of the signal that crosses the origin.


void WriteToTextFile(const char *name);

Writes the signal to a text file, as follows:


Column no.

Meaning

1

Real time

2

Value of the signal


If the file cannot be created, the program terminates.

Parameter

name

A text file name for writing the signal


void ReadFromTextFile(const char *name);

Reads a signal from a text file of the structure created by Signal :: WriteToTextFile. If the file cannot be created or if it is too short, the program terminates.

Parameter

name

A text file from which the signal has to be read


int GetSize();

Retrieves the number of discrete-time points of the signal.


double GetTimeInc();

Retrieves the time increment between two consecutive points of the signal.


double *GetPtrToData();

Retrieves a pointer to the data.



Prev

Up

Next

Susceptibility
- Public methods

C++ classes

Response
- Public methods

 

Valid HTML 4.01!

Copyright © 2003-2013 Antonio Sánchez Torralba
Last modified:
Monday, 04-Mar-2013 11:58:25 CET

© 2013 Antonio Sánchez Torralba