Aurelon Open API 8.1.1
Loading...
Searching...
No Matches
AOI_Function.cpp
1#include "./AOI_Function.h"
2#include "../Function.h"
3
4using namespace aur;
5using namespace aur::PDF;
6
56{
57 return FunctionPtr(this)->GetInputSize();
58}
59
67{
68 return FunctionPtr(this)->GetOutputSize();
69}
70
81void AOI_Function::Transform( double *in, double *out ) const
82{
83 FunctionPtr(this)->Transform( in, out );
84}
85
95{
96 return ((StitchingFunction*)this)->GetBounds();
97}
98
110bool AOI_Function::GetInfo( uint32_t& nrBounds, double* bounds )
111{
112 if( auto sf = dynamic_cast<StitchingFunction*>( FunctionPtr(this) ) )
113 {
114 auto b = sf->GetBounds();
115 nrBounds = sf->NrOfFunctions() + 1;
116 if( bounds )
117 ::memcpy( bounds, b, nrBounds * sizeof( double ) );
118 for( uint32_t e = 0; e != nrBounds-1; ++e )
119 if( dynamic_cast<SampledFunction*>(sf->GetFunction(e)) == NULL )
120 return false;
121 return true;
122 }
123 else
124 {
125 if( bounds )
126 {
127 bounds[0]=0;
128 bounds[1]=1;
129 }
130 nrBounds = 2;
131 return dynamic_cast<SampledFunction*>(FunctionPtr(this)) != NULL;
132 }
133}
const double * GetBounds() const
int GetOutputSize() const
bool GetInfo(uint32_t &nrBounds, double *bounds)
void Transform(double *in, double *out) const
int GetInputSize() const