Changeset 1208 for trunk/lib/Vector.cc


Ignore:
Timestamp:
Oct 7, 2010, 5:33:36 AM (12 years ago)
Author:
Peter Johansson
Message:

Changed value type of SparseVector? to be (signed) int. Use
Vector::iterator when printing Vector's data instead of using
operator[]
refs #475

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vector.cc

    r1194 r1208  
    2929  {
    3030    result.clear();
    31     unsigned int value = 0;
    32     for (SumVector::const_iterator iter = vec.begin(); iter!=vec.end();++iter) {
     31    int value = 0;
     32    for (SparseVector::const_iterator iter = vec.begin();
     33         iter!=vec.end();++iter) {
    3334      value += iter->second;
     35      assert(value>=0);
    3436      result.set(iter->first, value);
    3537    }
Note: See TracChangeset for help on using the changeset viewer.