protected DMatrixRMaj solveConstraintMatrix ( ) { int rowAA = 0 ; for ( int i = 0 ; i < numControl ; i ++ ) { for ( int j = i + 1 ; j < numControl ; j ++ ) { for ( int k = j ; k < numControl ; k ++ , rowAA ++ ) { // x_{ii}*x_{jk} = x_{ik}*x_{ji} extractXaXb ( getIndex ( i , i ) , getIndex ( j , k ) , XiiXjk ) ; extractXaXb ( getIndex ( i , k ) , getIndex ( j , i ) , XikXji ) ; for ( int l = 1 ; l <= AA . numCols ; l ++ ) { AA . set ( rowAA , l - 1 , XikXji [ l ] - XiiXjk [ l ] ) ; } yy . set ( rowAA , XiiXjk [ 0 ] - XikXji [ 0 ] ) ; } } } // AA.print(); CommonOps_DDRM . solve ( AA , yy , xx ) ; return xx ; }
Apply additional constraints to reduce the number of possible solutions