CSparseMatrixOperator<T>::CSparseMatrixOperator (const CSparseMatrixOperator<T>& orig) : CMatrixOperator<T>(orig.get_dimension()) { init(); typedef SGSparseVector<T> vector; typedef SGSparseVectorEntry<T> entry; m_operator=SGSparseMatrix<T>(orig.m_operator.num_vectors, orig.m_operator.num_features); vector* rows=SG_MALLOC(vector, m_operator.num_features); for (index_t i=0; i<m_operator.num_vectors; ++i) { entry* features=SG_MALLOC(entry, orig.m_operator[i].num_feat_entries); for (index_t j=0; j<orig.m_operator[i].num_feat_entries; ++j) { features[j].feat_index=orig.m_operator[i].features[j].feat_index; features[j].entry=orig.m_operator[i].features[j].entry; } rows[i].features=features; rows[i].num_feat_entries=m_operator[i].num_feat_entries; } m_operator.sparse_matrix=rows; SG_SGCDEBUG("%s deep copy created (%p)\n", this->get_name(), this); }
CIterativeLinearSolver<T, ST>::CIterativeLinearSolver() : CLinearSolver<T, ST>() { init(); SG_SGCDEBUG("%s created (%p)\n", this->get_name(), this); }
CIterativeLinearSolver<T, ST>::~CIterativeLinearSolver() { SG_SGCDEBUG("%s destroyed (%p)\n", this->get_name(), this); }