...
Please note that the difference is already too big. There is something
wrong already at this stage.
...
> The result I get in Matlab is the correct one. Why does the results in
> Taucs are slightly different?
I would not say slightly. They are just different. Hard to say for sure
but it would be necessary to check how you specify the matrix. As the
matrix vector product is already different, this shows that something is
wrong.
I will try to make a driver that reads the matrix in the Matrix Market
format and runs TAUCS. If all goes well, over the weekend. It may help
to find a problem.
For a symmetric matrix to store the lower part by columns is the same
that to store the upper part by rows. So, I guess you have the upper
part by columns, that corresponds to the lower part by rows.
If I have understood you correctly, you may try Bebop
http://bebop.cs.berkeley.edu/smc/features.html
It is stated that it converts compressed row storage to compressed
column storage.
You'll also have to take the transpose so that the indices are for the
lower triangle instead of for the upper triangle. In fact I think the
SMC has a "matrix transpose" function that does exactly this.
mfh
-----Mensaje original-----
>>For a symmetric matrix to store the lower part by columns is the same
>>that to store the upper part by rows. So, I guess you have the upper
>>part by columns, that corresponds to the lower part by rows.
>>If I have understood you correctly, you may try Bebop
>>http://bebop.cs.berkeley.edu/smc/features.html
>>It is stated that it converts compressed row storage to compressed
>>column storage.
Why do you need to use a converter? I usually use the upper part of a
symmetric matrix and then use the same vector that points to the diagonal
and the one that has the column indices to use "as is" in TAUCS_LOWER.
Let us consider the matrix from your example
http://matrixprogramming.com/TAUCS/src/test_taucs.cpp
TAUCS assumes that one uses compressed columns storage. That is, ia
contains actually the indices for columns and jn are the rows. So, TAUCS
assumes that the matrix is as follows
1.0
0.5 1.0
0.5 1.0
0.5 1.0
that is, it is the lower part indeed. On the other hand, if you assume
that ia contains indices for rows and jn are the columns (compressed row
format), we obtain
1.0 0.5
1.0 0.5
1.0 0.5
1.0
This what I have said, that if one stores a lower part of a symmetric
matrix by columns, it is exactly the same as to store the upper part by
rows.
Yet, imagine that one has stored the upper part by columns or the low
part by rows. Then the transformation is needed.