Ejemplo n.º 1
0
// covert a single value
double LinearData::CnvtLinearInv(double data,int32 ch)
{
double temp;

if (y2 == 0L) return data;

if (sizes[ch] < 18) splint_0(curves[ch],values[ch],y3[ch],sizes[ch],data,&temp);
else piceLin_0(curves[ch],values[ch],y3[ch],sizes[ch],data,&temp);

return temp;
}
Ejemplo n.º 2
0
// convert values to linear values
McoStatus LinearData::CnvtLinearInv(double *data, int32 num, int32 ch)
{
int i;

if (y2 == 0L) return MCO_OBJECT_NOT_INITIALIZED;

for (i=0; i<num; i++)
	{
	if (sizes[ch] < 18) splint(curves[ch]-1,values[ch]-1,y3[ch]-1,sizes[ch],data[i],&data[i]);
	else piceLin_0(curves[ch],values[ch],y3[ch],sizes[ch],data[i],&data[i]);
	}
return MCO_SUCCESS;
}
Ejemplo n.º 3
0
McoStatus CalCurves::_build18PerCurve(double *curve,int n)
{
int i;
double x[51];
double a;

for (i=0; i<51; i++) x[i] = i*2;

for (i=0; i< n; i++)
	{
	piceLin_0(x,data18Per,0L,51,100*(double)i/(n-1),&a);
	curve[i] = a;
	}

return MCO_SUCCESS;
}