HomologieValue& HomologieValue::operator-=(const HomologieValue& rhs) { if (dimension() != rhs.dimension()) { throw DimensionException(); } for (unsigned int i = 0; i < dim; ++i) { base[i] -= rhs[i]; } return *this; }
void buildmatrix(RAIteratorI i_it, RAIteratorJ j_it, RAIteratorV v_it, IndexType n, AccumT accum = AccumT()) { for (IndexType idx = 0; idx < n; ++idx) { IndexType i = i_it[idx]; IndexType j = j_it[idx]; if ((i >= m_num_rows) || (j >= m_num_cols)) { throw DimensionException(); } set_value_at(i, j, accum(get_value_at(i, j), v_it[idx])); } }