Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SXYCoeficientsAproximationSeries Class Reference

Classe que implementa uma série que calcula novos dados (nova série) como uma interpolação linear entre os pontos da outras séries associadas. More...

#include <sxy_series_coef.h>

Inheritance diagram for SXYCoeficientsAproximationSeries:

Inheritance graph
[legend]
Collaboration diagram for SXYCoeficientsAproximationSeries:

Collaboration graph
[legend]
List of all members.

Public Methods

void resetLimits (void)
 Função de ajuste dos limites da reta de aproximação.

void setLimits (double xmin, double xmax, double ymin, double ymax)
 Função de ajuste dos limites da reta de aproximação.

void getLimits (double &xmin, double &xmax, double &ymin, double &ymax)
 Função de consulta aos limites da reta de aproximação.

unsigned int getNumCoeficients (void) const
unsigned int getBufferSize (void) const
 Função de ajuste dos limites da reta de aproximação.

virtual unsigned int isLogXCallback (void)
virtual unsigned int isLogYCallback (void)
virtual unsigned int aproxFunctionCallback (double x, double &y)=0
void getLog (unsigned int &logx, unsigned int &logy)
 Função de ajuste de valores logarítmicos.

unsigned int getCoeficient (unsigned int c, double &coef) const
 Função de consulta ao coefieciente.

unsigned int getNumPoints (void)
 Função de retorno do número de pontos.

unsigned int getPoint (unsigned int n, double &x, double &y)
 Função de retorno do n-ésimo ponto calculado na interpolação.

unsigned int getNumParameters (void) const
 Função de consulta do número de parâmetros utilizados.

void insertParameter (SXYSeries *param)
 Função de ajuste no vetor de séries de entrada (parâmetro).

SXYSeriesgetParameter (int i) const
 Função de consulta ao vetor de séries de entrada (parâmetro).

virtual ~SXYCoeficientsAproximationSeries ()
 Destrutor que tem por objetivo apenas desalocar as estruturas internas.

 SXYCoeficientsAproximationSeries (unsigned int num_variables, unsigned int buffer_size=200, unsigned int resolution=100)
 Contrutor da classe que se encarrega de pré-alocar o buffer interno para armazenamento dos pontos a serem interpolados.


Protected Methods

virtual unsigned int calculateCoeficients (unsigned int n, double *x, double *y)=0
void setCoeficient (unsigned int c, double coef)

Private Methods

void resetCoeficients (void)
unsigned int fillBuffer (void)

Private Attributes

SXYVector< SXYSeries * > * parameters_vector
 Vetor de séries a serem utilizadas para a interpolação linear.

unsigned int max_index
 Tamanho máximo pré-alocado para os buffers de cálculo.

unsigned int num_coeficients
 Número de pontos definido na série.

unsigned int num_points
 Número de pontos definido na série.

double * buffer_x
 Buffer interno (pré-alocado) de valores em X.

double * buffer_y
 Buffer interno (pré-alocado) de valores em Y.

double * coeficients
 Coeficiente angular calculado na interpolação.

double lxmin
 Limite horizontal mínimo para desenho da reta.

double lxmax
 Limite horizontal máximo para desenho da reta.

double lymin
 Limite vertical mínimo para desenho da reta.

double lymax
 Limite vertical máximo para desenho da reta.

unsigned int has_manual_limit
 Flag de ajuste de limite manual.


Detailed Description

Classe que implementa uma série que calcula novos dados (nova série) como uma interpolação linear entre os pontos da outras séries associadas.

Definition at line 16 of file sxy_series_coef.h.


Constructor & Destructor Documentation

SXYCoeficientsAproximationSeries::~SXYCoeficientsAproximationSeries void    [virtual]
 

Destrutor que tem por objetivo apenas desalocar as estruturas internas.

Definition at line 46 of file sxy_series_coef.cpp.

References buffer_x, buffer_y, coeficients, and parameters_vector.

SXYCoeficientsAproximationSeries::SXYCoeficientsAproximationSeries unsigned int    num_variables,
unsigned int    buffer_size = 200,
unsigned int    resolution = 100
 

Contrutor da classe que se encarrega de pré-alocar o buffer interno para armazenamento dos pontos a serem interpolados.

Parameters:
mx tamanho máximo do buffer pré-alocado.
See also:
buffer_x

buffer_y

max_index

Definition at line 24 of file sxy_series_coef.cpp.

References buffer_x, buffer_y, coeficients, has_manual_limit, max_index, MAX_PARAMETERS, num_coeficients, num_points, parameters_vector, and resetCoeficients().


Member Function Documentation

virtual unsigned int SXYCoeficientsAproximationSeries::aproxFunctionCallback double    x,
double &    y
[pure virtual]
 

Implemented in SXYLinearSeries, and SXYParabolicSeries.

Referenced by getPoint().

virtual unsigned int SXYCoeficientsAproximationSeries::calculateCoeficients unsigned int    n,
double *    x,
double *    y
[protected, pure virtual]
 

Implemented in SXYLinearSeries, and SXYParabolicSeries.

Referenced by getPoint().

unsigned int SXYCoeficientsAproximationSeries::fillBuffer void    [private]
 

Definition at line 69 of file sxy_series_coef.cpp.

References buffer_x, buffer_y, getBufferSize(), getNumParameters(), SXYSeries::getNumPoints(), getParameter(), SXYSeries::getPoint(), isLogXCallback(), and isLogYCallback().

Referenced by getPoint().

unsigned int SXYCoeficientsAproximationSeries::getBufferSize void    const
 

Função de ajuste dos limites da reta de aproximação.

Definition at line 218 of file sxy_series_coef.cpp.

References max_index.

Referenced by fillBuffer(), and getPoint().

unsigned int SXYCoeficientsAproximationSeries::getCoeficient unsigned int    c,
double &    coef
const
 

Função de consulta ao coefieciente.

Returns:
um flag indicativo se o coeficiente pôde ser calculado

Definition at line 199 of file sxy_series_coef.cpp.

References coeficients, and SXYSeries::isValidNumber().

Referenced by SXYParabolicSeries::aproxFunctionCallback(), and SXYLinearSeries::aproxFunctionCallback().

void SXYCoeficientsAproximationSeries::getLimits double &    xmin,
double &    xmax,
double &    ymin,
double &    ymax
[virtual]
 

Função de consulta aos limites da reta de aproximação.

Parameters:
xmin valor horizontal mínimo
xmax valor horizontal máximo
ymin valor vertical mínimo
ymax valor vertical máximo

Reimplemented from SXYSeries.

Definition at line 247 of file sxy_series_coef.cpp.

References SXYSeries::getSeveralLimits(), lxmax, lxmin, lymax, and lymin.

Referenced by getPoint().

void SXYCoeficientsAproximationSeries::getLog unsigned int &    logx,
unsigned int &    logy
 

Função de ajuste de valores logarítmicos.

Parameters:
logx retorno do flag ajuste em x
logy retorno do flag ajuste em y

Definition at line 210 of file sxy_series_coef.cpp.

References isLogXCallback(), and isLogYCallback().

unsigned int SXYCoeficientsAproximationSeries::getNumCoeficients void    const
 

Definition at line 149 of file sxy_series_coef.cpp.

References num_coeficients.

Referenced by resetCoeficients().

unsigned int SXYCoeficientsAproximationSeries::getNumParameters void    const
 

Função de consulta do número de parâmetros utilizados.

Returns:
o tamanho do vetor de parâmetros alocado

Definition at line 173 of file sxy_series_coef.cpp.

References SXYVector< SXYSeries * >::getLength(), and parameters_vector.

Referenced by fillBuffer().

unsigned int SXYCoeficientsAproximationSeries::getNumPoints void    [virtual]
 

Função de retorno do número de pontos.

Neste caso, a série retorna sempre os dois pontos extremos do cálculo.

Returns:
um valor constante (2).

Implements SXYSeries.

Definition at line 63 of file sxy_series_coef.cpp.

References num_points.

Referenced by getPoint().

SXYSeries * SXYCoeficientsAproximationSeries::getParameter int    i const
 

Função de consulta ao vetor de séries de entrada (parâmetro).

Parameters:
i índice no vetor
Returns:
série na posição indicada

Definition at line 182 of file sxy_series_coef.cpp.

References SXYVector< SXYSeries * >::getElement(), and parameters_vector.

Referenced by fillBuffer().

unsigned int SXYCoeficientsAproximationSeries::getPoint unsigned int    n,
double &    x,
double &    y
[virtual]
 

Função de retorno do n-ésimo ponto calculado na interpolação.

Parameters:
n índice do ponto
x retorno do valor na abcissa.
y retorno do valor na ordenada.
Returns:
um flag indicando se o ponto deve ser considerado.
See also:
getNumPoints

Implements SXYSeries.

Definition at line 111 of file sxy_series_coef.cpp.

References aproxFunctionCallback(), calculateCoeficients(), fillBuffer(), getBufferSize(), getLimits(), getNumPoints(), isLogXCallback(), isLogYCallback(), and resetCoeficients().

void SXYCoeficientsAproximationSeries::insertParameter SXYSeries   param
 

Função de ajuste no vetor de séries de entrada (parâmetro).

Parameters:
i índice no vetor
série a ser utilizada para o cálculo

Definition at line 164 of file sxy_series_coef.cpp.

References SXYVector< SXYSeries * >::insertElement(), and parameters_vector.

Referenced by SXYSimpleCurve::createSeriesCallback().

virtual unsigned int SXYCoeficientsAproximationSeries::isLogXCallback void    [inline, virtual]
 

Definition at line 82 of file sxy_series_coef.h.

Referenced by fillBuffer(), getLog(), and getPoint().

virtual unsigned int SXYCoeficientsAproximationSeries::isLogYCallback void    [inline, virtual]
 

Definition at line 83 of file sxy_series_coef.h.

Referenced by fillBuffer(), getLog(), and getPoint().

void SXYCoeficientsAproximationSeries::resetCoeficients void    [private]
 

Definition at line 155 of file sxy_series_coef.cpp.

References coeficients, SXYSeries::getAnInvalidNumber(), and getNumCoeficients().

Referenced by getPoint(), and SXYCoeficientsAproximationSeries().

void SXYCoeficientsAproximationSeries::resetLimits void   
 

Função de ajuste dos limites da reta de aproximação.

Definition at line 224 of file sxy_series_coef.cpp.

References has_manual_limit.

void SXYCoeficientsAproximationSeries::setCoeficient unsigned int    c,
double    coef
[protected]
 

Definition at line 190 of file sxy_series_coef.cpp.

References coeficients.

Referenced by SXYParabolicSeries::calculateCoeficients(), and SXYLinearSeries::calculateCoeficients().

void SXYCoeficientsAproximationSeries::setLimits double    xmin,
double    xmax,
double    ymin,
double    ymax
 

Função de ajuste dos limites da reta de aproximação.

Parameters:
xmin valor horizontal mínimo
xmax valor horizontal máximo
ymin valor vertical mínimo
ymax valor vertical máximo

Definition at line 234 of file sxy_series_coef.cpp.

References has_manual_limit, lxmax, lxmin, lymax, and lymin.


Member Data Documentation

double* SXYCoeficientsAproximationSeries::buffer_x [private]
 

Buffer interno (pré-alocado) de valores em X.

Este buffer é usado para o cálculo dos coeficientes A e B.

See also:
calculateLine

Definition at line 36 of file sxy_series_coef.h.

Referenced by fillBuffer(), SXYCoeficientsAproximationSeries(), and ~SXYCoeficientsAproximationSeries().

double* SXYCoeficientsAproximationSeries::buffer_y [private]
 

Buffer interno (pré-alocado) de valores em Y.

Este buffer é usado para o cálculo dos coeficientes A e B.

See also:
calculateLine

Definition at line 41 of file sxy_series_coef.h.

Referenced by fillBuffer(), SXYCoeficientsAproximationSeries(), and ~SXYCoeficientsAproximationSeries().

double* SXYCoeficientsAproximationSeries::coeficients [private]
 

Coeficiente angular calculado na interpolação.

Definition at line 44 of file sxy_series_coef.h.

Referenced by getCoeficient(), resetCoeficients(), setCoeficient(), SXYCoeficientsAproximationSeries(), and ~SXYCoeficientsAproximationSeries().

unsigned int SXYCoeficientsAproximationSeries::has_manual_limit [private]
 

Flag de ajuste de limite manual.

Definition at line 59 of file sxy_series_coef.h.

Referenced by resetLimits(), setLimits(), and SXYCoeficientsAproximationSeries().

double SXYCoeficientsAproximationSeries::lxmax [private]
 

Limite horizontal máximo para desenho da reta.

Definition at line 50 of file sxy_series_coef.h.

Referenced by getLimits(), and setLimits().

double SXYCoeficientsAproximationSeries::lxmin [private]
 

Limite horizontal mínimo para desenho da reta.

Definition at line 47 of file sxy_series_coef.h.

Referenced by getLimits(), and setLimits().

double SXYCoeficientsAproximationSeries::lymax [private]
 

Limite vertical máximo para desenho da reta.

Definition at line 56 of file sxy_series_coef.h.

Referenced by getLimits(), and setLimits().

double SXYCoeficientsAproximationSeries::lymin [private]
 

Limite vertical mínimo para desenho da reta.

Definition at line 53 of file sxy_series_coef.h.

Referenced by getLimits(), and setLimits().

unsigned int SXYCoeficientsAproximationSeries::max_index [private]
 

Tamanho máximo pré-alocado para os buffers de cálculo.

Este valor é definido no construtor do objeto.

See also:
buffer_x

buffer_y

Definition at line 25 of file sxy_series_coef.h.

Referenced by getBufferSize(), and SXYCoeficientsAproximationSeries().

unsigned int SXYCoeficientsAproximationSeries::num_coeficients [private]
 

Número de pontos definido na série.

Definition at line 28 of file sxy_series_coef.h.

Referenced by getNumCoeficients(), and SXYCoeficientsAproximationSeries().

unsigned int SXYCoeficientsAproximationSeries::num_points [private]
 

Número de pontos definido na série.

Definition at line 31 of file sxy_series_coef.h.

Referenced by getNumPoints(), and SXYCoeficientsAproximationSeries().

SXYVector<SXYSeries*>* SXYCoeficientsAproximationSeries::parameters_vector [private]
 

Vetor de séries a serem utilizadas para a interpolação linear.

Definition at line 19 of file sxy_series_coef.h.

Referenced by getNumParameters(), getParameter(), insertParameter(), SXYCoeficientsAproximationSeries(), and ~SXYCoeficientsAproximationSeries().


The documentation for this class was generated from the following files:
SXY
Tecgraf / PUC-Rio - Computer Graphics Technology Group