Hi Everyone,

I have a question about adding values to the matrix. The code I have is


for (int i=0;i<row.size();i++) {
MatSetValue(A,row[i],column[i],h[i],INSERT_VALUES);
}

where row.size() is a large number. It seems the running time of this procedure 
does not scale linearly with row.size(). As row.size() gets bigger, the time it 
takes increases exponentially. Am I doing something wrong and can I do better 
than that?

Thanks and stay healthy!

Cheers,

Yang Bo
________________________________

CONFIDENTIALITY: This email is intended solely for the person(s) named and may 
be confidential and/or privileged. If you are not the intended recipient, 
please delete it, notify us and do not copy, use, or disclose its contents.
Towards a sustainable earth: Print only when necessary. Thank you.

Reply via email to