------------------------------------------------------------------------------ Invert input square matrix A into matrix AI. Note that A is modified during the inversion. The size variable is the dimension of the matrix. Returns 0 if inverse not computed.
| 459 | // the inversion. The size variable is the dimension of the matrix. Returns 0 |
| 460 | // if inverse not computed. |
| 461 | vtkTypeBool vtkMath::InvertMatrix(double** A, double** AI, int size) |
| 462 | { |
| 463 | int iScratch[VTK_MAX_SCRATCH_ARRAY_SIZE]; |
| 464 | int* index = (size <= VTK_MAX_SCRATCH_ARRAY_SIZE ? iScratch : new int[size]); |
| 465 | double dScratch[VTK_MAX_SCRATCH_ARRAY_SIZE]; |
| 466 | double* column = (size <= VTK_MAX_SCRATCH_ARRAY_SIZE ? dScratch : new double[size]); |
| 467 | |
| 468 | vtkTypeBool retVal = vtkMath::InvertMatrix(A, AI, size, index, column); |
| 469 | |
| 470 | if (size > VTK_MAX_SCRATCH_ARRAY_SIZE) |
| 471 | { |
| 472 | delete[] index; |
| 473 | delete[] column; |
| 474 | } |
| 475 | |
| 476 | return retVal; |
| 477 | } |
| 478 | |
| 479 | //------------------------------------------------------------------------------ |
| 480 | // Factor linear equations Ax = b using LU decomposition A = LU where L is |
nothing calls this directly
no test coverage detected