Ignore:
Timestamp:
Sep 27, 2008, 12:37:33 AM (13 years ago)
Author:
Peter
Message:

refs #368 - redesign to solve some issues regarding mutable functionality in WeightedIterator?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/iterator_test.cc

    r1532 r1537  
    2727#include "yat/classifier/MatrixLookupWeighted.h"
    2828#include "yat/utility/Container2DIterator.h"
     29#include "yat/utility/DataWeight.h"
    2930#include "yat/utility/DataIterator.h"
    3031#include "yat/utility/Matrix.h"
     
    377378  suite.add(! (iter7<iter));
    378379
     380  typename RandomAccessIterator::value_type tmp = iter[0];
     381  typename RandomAccessIterator::value_type tmp2 = *iter;
     382  tmp = tmp; // avoid compiler warning
     383  if (!suite.add(tmp == tmp2))
     384    suite.err() << "operator[] failed" << std::endl;
    379385  if (!suite.add(iter[0] == *iter))
    380386    suite.err() << "operator[] failed" << std::endl;
     
    410416  std::vector<double> vec(3,1);
    411417  typedef std::vector<double>::iterator Iter;
    412   utility::WeightedIterator<Iter, Iter> iter(vec.begin(), vec.begin());
    413 
     418  typedef utility::WeightedIterator<Iter, Iter> WIter;
     419  WIter iter(vec.begin(), vec.begin());
     420
     421  utility::DataWeight tmp = *iter;
     422
     423  test_bidirectional_iterator(iter, suite);
    414424  test_random_access_iterator(iter, suite);
    415 
    416 }
     425  //std::vector<double> data(vec.size());
     426  //std::vector<double> weight(vec.size());
     427  //WIter iter2(data.begin(), weight.begin());
     428  //  std::copy(iter, iter+3, iter2);
     429  //suite.add(suite.equal(data.front(), 1));
     430}
Note: See TracChangeset for help on using the changeset viewer.