operator=() for SparseMatrix?

19 views
Skip to first unread message

tshun

unread,
Apr 9, 2015, 10:52:39 AM4/9/15
to linbo...@googlegroups.com
Hi,

Judging from
http://www.linalg.org/linbox-html/class_lin_box_1_1_sparse_matrix.html,
it seems that there is no operator=() for  SparseMatrix.

(1) (Assuming I am correct on that point,) why is it?
Because other matrices (e.g. BlasMatrix) have operator=(),
I am wondering why SparseMatrix is designed so.

(2) Suppose I have SparseMatrices $A$ and $B$ where $A$ is $n$ by $n$
and $B$ is $(n+1)$ by $(n+1)$. What is a best way to embed $A$ in $B$?
In other words, what is a best way to alternate the following sentence?
for ( int i=0; i<n; ++i ) for ( int j=0; j<n; ++j ) B.setEntry(i,j,A.getEntry(i,j));

(3) Can I "resize" the SparseMatrices in linbox?
It seems natural for matrices to "get fat" in a loop.

Thank you in advance.

Sincerely,
Shunsuke

Shunsuke Tsuchioka

unread,
Apr 9, 2015, 11:05:17 AM4/9/15
to linbo...@googlegroups.com
What I meant is the non-existence of
"SparseMatrix::operator=( const SparseMatrix & );".
Sorry for a mistake.

Best,
Shunsuke


2015年4月9日木曜日 23時52分39秒 UTC+9 Shunsuke Tsuchioka:
Reply all
Reply to author
Forward
0 new messages