public void process ( DMatrixRMaj L_full , DMatrixRMaj y , double betas [ ] ) { svd . decompose ( L_full ) ; // extract null space V = svd . getV ( null , true ) ; // compute one possible solution pseudo . setA ( L_full ) ; pseudo . solve ( y , x0 ) ; // add additional constraints to reduce the number of possible solutions DMatrixRMaj alphas = solveConstraintMatrix ( ) ; // compute the final solution for ( int i = 0 ; i < x0 . numRows ; i ++ ) { for ( int j = 0 ; j < numNull ; j ++ ) { x0 . data [ i ] += alphas . data [ j ] * valueNull ( j , i ) ; } } if ( numControl == 4 ) { betas [ 0 ] = Math . sqrt ( Math . abs ( x0 . data [ 0 ] ) ) ; betas [ 1 ] = Math . sqrt ( Math . abs ( x0 . data [ 4 ] ) ) * Math . signum ( x0 . data [ 1 ] ) ; betas [ 2 ] = Math . sqrt ( Math . abs ( x0 . data [ 7 ] ) ) * Math . signum ( x0 . data [ 2 ] ) ; betas [ 3 ] = Math . sqrt ( Math . abs ( x0 . data [ 9 ] ) ) * Math . signum ( x0 . data [ 3 ] ) ; } else { betas [ 0 ] = Math . sqrt ( Math . abs ( x0 . data [ 0 ] ) ) ; betas [ 1 ] = Math . sqrt ( Math . abs ( x0 . data [ 3 ] ) ) * Math . signum ( x0 . data [ 1 ] ) ; betas [ 2 ] = Math . sqrt ( Math . abs ( x0 . data [ 5 ] ) ) * Math . signum ( x0 . data [ 2 ] ) ; } }
Estimates betas using relinearization .