private void solveForXandY ( double z ) { this . z = z ; // solve for x and y using the first two rows of B tmpA . data [ 0 ] = ( ( helper . K00 * z + helper . K01 ) * z + helper . K02 ) * z + helper . K03 ; tmpA . data [ 1 ] = ( ( helper . K04 * z + helper . K05 ) * z + helper . K06 ) * z + helper . K07 ; tmpY . data [ 0 ] = ( ( ( helper . K08 * z + helper . K09 ) * z + helper . K10 ) * z + helper . K11 ) * z + helper . K12 ; tmpA . data [ 2 ] = ( ( helper . L00 * z + helper . L01 ) * z + helper . L02 ) * z + helper . L03 ; tmpA . data [ 3 ] = ( ( helper . L04 * z + helper . L05 ) * z + helper . L06 ) * z + helper . L07 ; tmpY . data [ 1 ] = ( ( ( helper . L08 * z + helper . L09 ) * z + helper . L10 ) * z + helper . L11 ) * z + helper . L12 ; tmpA . data [ 4 ] = ( ( helper . M00 * z + helper . M01 ) * z + helper . M02 ) * z + helper . M03 ; tmpA . data [ 5 ] = ( ( helper . M04 * z + helper . M05 ) * z + helper . M06 ) * z + helper . M07 ; tmpY . data [ 2 ] = ( ( ( helper . M08 * z + helper . M09 ) * z + helper . M10 ) * z + helper . M11 ) * z + helper . M12 ; CommonOps_DDRM . scale ( - 1 , tmpY ) ; CommonOps_DDRM . solve ( tmpA , tmpY , tmpX ) ; this . x = tmpX . get ( 0 , 0 ) ; this . y = tmpX . get ( 1 , 0 ) ; }
Once z is known then x and y can be solved for using the B matrix