i have a linear system which i want to solve via dposv_(). But i have problem to understand how to give the matrix.
Until now i linearized all matrices in a simple array and put it as an argument. For example:
A = [1,2;3,4] -> A[1,2,3,4].
So for general formats i linearized row-wise. The routine dposv needs only:
On entry, the symmetric matrix A. If UPLO = 'U', the leading
* N-by-N upper triangular part of A contains the upper
* triangular part of the matrix A, and the strictly lower
* triangular part of A is not referenced.
How should i put the matrix in the array? Is lapack that intelligent that it internally extract the correct column values?
So for example if i have the matrix:
would that be:
A[1,2,3,-1,-2,-3] with the character UPLO="L"
a correct input for dposv? How should i linearize a triangular matrix?
Thanks for any advice.