本文整理汇总了C++中Polynomial::A方法的典型用法代码示例。如果您正苦于以下问题:C++ Polynomial::A方法的具体用法?C++ Polynomial::A怎么用?C++ Polynomial::A使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Polynomial
的用法示例。
在下文中一共展示了Polynomial::A方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rkPoly
void IntpAkimaUniform2<Real>::Construct (Polynomial& rkPoly, Real aafF[2][2],
Real aafFX[2][2], Real aafFY[2][2], Real aafFXY[2][2])
{
Real fDX = m_fXSpacing;
Real fDY = m_fYSpacing;
Real fInvDX = ((Real)1.0)/fDX, fInvDX2 = fInvDX*fInvDX;
Real fInvDY = ((Real)1.0)/fDY, fInvDY2 = fInvDY*fInvDY;
Real fB0, fB1, fB2, fB3;
rkPoly.A(0,0) = aafF[0][0];
rkPoly.A(1,0) = aafFX[0][0];
rkPoly.A(0,1) = aafFY[0][0];
rkPoly.A(1,1) = aafFXY[0][0];
fB0 = (aafF[1][0] - rkPoly(0,0,fDX,(Real)0.0))*fInvDX2;
fB1 = (aafFX[1][0] - rkPoly(1,0,fDX,(Real)0.0))*fInvDX;
rkPoly.A(2,0) = ((Real)3.0)*fB0 - fB1;
rkPoly.A(3,0) = (-((Real)2.0)*fB0 + fB1)*fInvDX;
fB0 = (aafF[0][1] - rkPoly(0,0,(Real)0.0,fDY))*fInvDY2;
fB1 = (aafFY[0][1] - rkPoly(0,1,(Real)0.0,fDY))*fInvDY;
rkPoly.A(0,2) = ((Real)3.0)*fB0 - fB1;
rkPoly.A(0,3) = (-((Real)2.0)*fB0 + fB1)*fInvDY;
fB0 = (aafFY[1][0] - rkPoly(0,1,fDX,(Real)0.0))*fInvDX2;
fB1 = (aafFXY[1][0] - rkPoly(1,1,fDX,(Real)0.0))*fInvDX;
rkPoly.A(2,1) = ((Real)3.0)*fB0 - fB1;
rkPoly.A(3,1) = (-((Real)2.0)*fB0 + fB1)*fInvDX;
fB0 = (aafFX[0][1] - rkPoly(1,0,(Real)0.0,fDY))*fInvDY2;
fB1 = (aafFXY[0][1] - rkPoly(1,1,(Real)0.0,fDY))*fInvDY;
rkPoly.A(1,2) = ((Real)3.0)*fB0 - fB1;
rkPoly.A(1,3) = (-((Real)2.0)*fB0 + fB1)*fInvDY;
fB0 = (aafF[1][1] - rkPoly(0,0,fDX,fDY))*fInvDX2*fInvDY2;
fB1 = (aafFX[1][1] - rkPoly(1,0,fDX,fDY))*fInvDX*fInvDY2;
fB2 = (aafFY[1][1] - rkPoly(0,1,fDX,fDY))*fInvDX2*fInvDY;
fB3 = (aafFXY[1][1] - rkPoly(1,1,fDX,fDY))*fInvDX*fInvDY;
rkPoly.A(2,2) = ((Real)9.0)*fB0 - ((Real)3.0)*fB1 - ((Real)3.0)*fB2 + fB3;
rkPoly.A(3,2) = (-((Real)6.0)*fB0 + ((Real)3.0)*fB1 + ((Real)2.0)*fB2 -
fB3)*fInvDX;
rkPoly.A(2,3) = (-((Real)6.0)*fB0 + ((Real)2.0)*fB1 + ((Real)3.0)*fB2 -
fB3)*fInvDY;
rkPoly.A(3,3) = (((Real)4.0)*fB0 - ((Real)2.0)*fB1 - ((Real)2.0)*fB2 +
fB3)*fInvDX*fInvDY;
}
示例2: rkPoly
//----------------------------------------------------------------------------
void Interp2DAkimaUniform::Construct (Polynomial& rkPoly, Real aafF[2][2],
Real aafFX[2][2], Real aafFY[2][2], Real aafFXY[2][2])
{
Real fDX = m_fXSpacing;
Real fDY = m_fYSpacing;
Real fInvDX = 1.0f/fDX, fInvDX2 = fInvDX*fInvDX;
Real fInvDY = 1.0f/fDY, fInvDY2 = fInvDY*fInvDY;
Real fB0, fB1, fB2, fB3;
rkPoly.A(0,0) = aafF[0][0];
rkPoly.A(1,0) = aafFX[0][0];
rkPoly.A(0,1) = aafFY[0][0];
rkPoly.A(1,1) = aafFXY[0][0];
fB0 = (aafF[1][0] - rkPoly(0,0,fDX,0.0f))*fInvDX2;
fB1 = (aafFX[1][0] - rkPoly(1,0,fDX,0.0f))*fInvDX;
rkPoly.A(2,0) = 3.0f*fB0 - fB1;
rkPoly.A(3,0) = (-2.0f*fB0 + fB1)*fInvDX;
fB0 = (aafF[0][1] - rkPoly(0,0,0.0f,fDY))*fInvDY2;
fB1 = (aafFY[0][1] - rkPoly(0,1,0.0f,fDY))*fInvDY;
rkPoly.A(0,2) = 3.0f*fB0 - fB1;
rkPoly.A(0,3) = (-2.0f*fB0 + fB1)*fInvDY;
fB0 = (aafFY[1][0] - rkPoly(0,1,fDX,0.0f))*fInvDX2;
fB1 = (aafFXY[1][0] - rkPoly(1,1,fDX,0.0f))*fInvDX;
rkPoly.A(2,1) = 3.0f*fB0 - fB1;
rkPoly.A(3,1) = (-2.0f*fB0 + fB1)*fInvDX;
fB0 = (aafFX[0][1] - rkPoly(1,0,0.0f,fDY))*fInvDY2;
fB1 = (aafFXY[0][1] - rkPoly(1,1,0.0f,fDY))*fInvDY;
rkPoly.A(1,2) = 3.0f*fB0 - fB1;
rkPoly.A(1,3) = (-2.0f*fB0 + fB1)*fInvDY;
fB0 = (aafF[1][1] - rkPoly(0,0,fDX,fDY))*fInvDX2*fInvDY2;
fB1 = (aafFX[1][1] - rkPoly(1,0,fDX,fDY))*fInvDX*fInvDY2;
fB2 = (aafFY[1][1] - rkPoly(0,1,fDX,fDY))*fInvDX2*fInvDY;
fB3 = (aafFXY[1][1] - rkPoly(1,1,fDX,fDY))*fInvDX*fInvDY;
rkPoly.A(2,2) = 9.0f*fB0 - 3.0f*fB1 - 3.0f*fB2 + fB3;
rkPoly.A(3,2) = (-6.0f*fB0 + 3.0f*fB1 + 2.0f*fB2 - fB3)*fInvDX;
rkPoly.A(2,3) = (-6.0f*fB0 + 2.0f*fB1 + 3.0f*fB2 - fB3)*fInvDY;
rkPoly.A(3,3) = (4.0f*fB0 - 2.0f*fB1 - 2.0f*fB2 + fB3)*fInvDX*fInvDY;
}