etags --members -l c++ *.cc *.h
folding: misc.o interval.o gaussian.o fusion_sort.o global.o tools.o \
- progress_bar.o chrono.o \
+ progress_bar.o \
jpeg_misc.o rgb_image.o rgb_image_subpixel.o param_parser.o \
shared.o \
storable.o \
+++ /dev/null
-
-///////////////////////////////////////////////////////////////////////////
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the version 3 of the GNU General Public License //
-// as published by the Free Software Foundation. //
-// //
-// This program is distributed in the hope that it will be useful, but //
-// WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
-// General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see <http://www.gnu.org/licenses/>. //
-// //
-// Written by Francois Fleuret //
-// (C) Idiap Research Institute //
-// //
-// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
-///////////////////////////////////////////////////////////////////////////
-
-#include <string.h>
-
-#include "chrono.h"
-
-Chrono::Chrono() : _nb_ticks_per_second(scalar_t(sysconf(_SC_CLK_TCK))),
- _nb(0), _current(-1) { }
-
-void Chrono::print(ostream *os) {
- scalar_t total_durations = 0;
- for(int n = 0; n < _nb; n++) total_durations += _durations[n];
- for(int n = 0; n < _nb; n++)
- (*os) << "INFO CHRONO_" << _labels[n]
- << " " << scalar_t(_durations[n] * 100) / total_durations << "%"
- << " " << _durations[n] << " seconds"
- << endl;
-}
-
-void Chrono::start(const char *label) {
- if(_current >= 0) {
- struct tms tmp;
- times(&tmp);
- _durations[_current] += scalar_t(tmp.tms_stime - _last.tms_stime)/_nb_ticks_per_second;
- }
-
- if(label) {
- _current = 0;
- while(_current < _nb && strcmp(_labels[_current], label) != 0)
- _current++;
- if(_current == _nb) {
- if(_nb < _nb_max) {
- strncpy(_labels[_nb], label, buffer_size);
- _durations[_nb] = 0;
- _nb++;
- } else {
- cerr << "Too many timers." << endl;
- exit(1);
- }
- }
- } else _current = -1;
-
- times(&_last);
-}
-
-void Chrono::stop() { start(0); }
+++ /dev/null
-
-///////////////////////////////////////////////////////////////////////////
-// This program is free software: you can redistribute it and/or modify //
-// it under the terms of the version 3 of the GNU General Public License //
-// as published by the Free Software Foundation. //
-// //
-// This program is distributed in the hope that it will be useful, but //
-// WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
-// General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program. If not, see <http://www.gnu.org/licenses/>. //
-// //
-// Written by Francois Fleuret //
-// (C) Idiap Research Institute //
-// //
-// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
-///////////////////////////////////////////////////////////////////////////
-
-#ifndef CHRONO_H
-#define CHRONO_H
-
-#include <sys/times.h>
-#include "misc.h"
-
-class Chrono {
- struct tms _last;
- scalar_t _nb_ticks_per_second;
- static const int _nb_max = 32;
- int _nb, _current;
- char _labels[_nb_max][buffer_size];
- scalar_t _durations[_nb_max];
-public:
- Chrono();
- void print(ostream *os);
- void start(const char *label);
- void stop();
-};
-
-#endif
#include "pose_cell_hierarchy.h"
#include "boosted_classifier.h"
#include "parsing_pool.h"
-#include "chrono.h"
#include "materials.h"
void compute_errors_on_one_image(int level,
#include <iostream>
#include "misc.h"
+// This function is not trivial because it has to handle numerical
+// pitfalls due to the very large number of samples.
+
scalar_t robust_sampling(int nb, scalar_t *weights, int nb_to_sample, int *sampled);
void print_roc_small_pos(ostream *out,