Boost logo

Boost Users :

Subject: [Boost-users] [accumulators] Help required for using UDT as Sample
From: dhruva (dhruva_at_[hidden])
Date: 2009-02-24 23:58:38


Hi, I am using boost::accumulator for finding min (among other things). It works fine when I use a POD as Sample. ex: accumulator_set< double, features <tag::min> > acc; acc(1.0); acc(5.0); .... I have my own data type, time stamp and value. I would like to get the min Sample with corresponding time stamp. class time_val { public: time_t _time; double _value; /* I have overloaded operators: <, >, ==, != */ /* Have provided copy constructor */ }; When I try: accumulator_set< time_val, features <tag::min> > acc; I get a whole lot of compilation errors. Is there any way I can make a UDT as a sample? regards, -dhruva Bollywood news, movie reviews, film trailers and more! Go to http://in.movies.yahoo.com/


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net