GCGlib  0.04.228
GCG Graphics Engine

Abstract class for 1D basis projection/reconstruction interfaces. More...

#include <gcg.h>

Inheritance diagram for gcgBASIS1D< NUMTYPE >:
gcgCLASS gcgDWTBASIS1D< NUMTYPE > gcgLEGENDREBASIS1D< NUMTYPE >

Private Member Functions

virtual unsigned int getNumberOfCoefficients ()=0
 Returns the number of coefficients used in 1D projection/reconstruction processes.
 
virtual bool setNumberOfSamples (unsigned int nsamples)=0
 Sets the number of samples to be used in projection and reconstruction processes. More...
 
virtual bool projectSignal (int atX, gcgDISCRETE1D< float > *vector, gcgDISCRETE1D< NUMTYPE > *outputcoef)=0
 Computes the coefficients of the projection of the 1D vector signal on the basis. It projects the number of samples of this basis (given by setNumberOfSamples()) starting at position atX of vector. The coefficients are stored in array outputcoef that is adjusted to have getNumberofCoefficients() coefficients. More...
 
virtual bool reconstructSignal (int atX, gcgDISCRETE1D< NUMTYPE > *inputcoef, gcgDISCRETE1D< float > *outputvector)=0
 Computes the components of a vector (as 1D signal), using the getNumberofCoefficients() coefficients given in array inputcoef. The components (up to the number of samples given by setNumberOfSamples())are stored in the 1D signal outputvector starting at position atX. More...
 

Additional Inherited Members

- Public Member Functions inherited from gcgCLASS
void * operator new (size_t size)
 Defines a new operator to be used by instatiations of GCGlib classes instead the global one. More...
 
void * operator new (size_t size, const std::nothrow_t &) throw ()
 Defines a new operator to be used by instantiations of GCGlib classes instead the global one. Returns a NULL pointer instead of throwing an exception if an error occurs. More...
 
void * operator new[] (size_t size)
 Defines a new operator to be used by GCGlib array allocations instead the global one. More...
 
void * operator new[] (size_t size, const std::nothrow_t &) throw ()
 Defines a new operator to be used by vector allocations instead the global one. More...
 
void operator delete (void *p)
 Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More...
 
void operator delete (void *p, const std::nothrow_t &) throw ()
 Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More...
 
void operator delete[] (void *p)
 Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More...
 
void operator delete[] (void *p, const std::nothrow_t &) throw ()
 Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More...
 

Detailed Description

template<class NUMTYPE = float>
class gcgBASIS1D< NUMTYPE >

Abstract class for 1D basis projection/reconstruction interfaces.

Template Parameters
NUMTYPEType of the samples representing the signal. Supported types: float, double, long, int and short.
Since
0.01.6

Member Function Documentation

◆ projectSignal()

template<class NUMTYPE = float>
virtual bool gcgBASIS1D< NUMTYPE >::projectSignal ( int  atX,
gcgDISCRETE1D< float > *  vector,
gcgDISCRETE1D< NUMTYPE > *  outputcoef 
)
privatepure virtual

Computes the coefficients of the projection of the 1D vector signal on the basis. It projects the number of samples of this basis (given by setNumberOfSamples()) starting at position atX of vector. The coefficients are stored in array outputcoef that is adjusted to have getNumberofCoefficients() coefficients.

Parameters
[in]atXorigin of the signal for this projection (relative to vector origin).
[in]vectorarray (as 1D signal) containing components of the vector to be projected onto the basis.
[out]outputcoefarray (as 1D signal) that receives the computed coefficients. It is adjusted to have getNumberofCoefficients() elements.
Returns
true if projection is successful.
See also
setNumberOfSamples()
getNumberOfCoefficients()
reconstructSignal()
gcgDISCRETE1D()

Implemented in gcgDWTBASIS1D< NUMTYPE >, and gcgLEGENDREBASIS1D< NUMTYPE >.

◆ reconstructSignal()

template<class NUMTYPE = float>
virtual bool gcgBASIS1D< NUMTYPE >::reconstructSignal ( int  atX,
gcgDISCRETE1D< NUMTYPE > *  inputcoef,
gcgDISCRETE1D< float > *  outputvector 
)
privatepure virtual

Computes the components of a vector (as 1D signal), using the getNumberofCoefficients() coefficients given in array inputcoef. The components (up to the number of samples given by setNumberOfSamples())are stored in the 1D signal outputvector starting at position atX.

Parameters
[in]atXorigin of the signal for this projection (relative to outputvector origin).
[in]inputcoefinput array of coefficients (as 1D signal) representing the vector to be reconstructed.
[out]outputvectorarray (as 1D signal) that receives the reconstructed samples starting at position atX.
Returns
true if reconstruction is successful.
See also
setNumberOfSamples()
getNumberOfCoefficients()
projectSignal()
gcgDISCRETE1D()

Implemented in gcgDWTBASIS1D< NUMTYPE >, and gcgLEGENDREBASIS1D< NUMTYPE >.

◆ setNumberOfSamples()

template<class NUMTYPE = float>
virtual bool gcgBASIS1D< NUMTYPE >::setNumberOfSamples ( unsigned int  nsamples)
privatepure virtual

Sets the number of samples to be used in projection and reconstruction processes.

Parameters
[in]nsamplesnumber of samples to be used in projection and reconstruction processs. Depending on the basis, it might be used to discretize functions to speed up scalar products.
Returns
true if setup is successful.

Implemented in gcgDWTBASIS1D< NUMTYPE >, and gcgLEGENDREBASIS1D< NUMTYPE >.


The documentation for this class was generated from the following file: