brainrat-private  5.1.2
dice.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2013 CEA
2  *
3  * This software and supporting documentation were developed by
4  * bioPICSEL
5  * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6  * 18, route du Panorama
7  * 92265 Fontenay-aux-Roses
8  * France
9  */
10 
11 
12 #ifndef BRAINRAT_OVERLAP_DICE_H
13 #define BRAINRAT_OVERLAP_DICE_H
14 
15 #include <aims/data/data.h>
17 
18 template< class T >
19 class Dice : public Overlap_Method<T>
20 {
21 public:
22 
23  Dice() ;
24  virtual ~Dice() { }
25 
26 // virtual double doit(T ref, T test, T true_positive, T ); --> pr calcul specificity
27  virtual double doit(T ref, T test, T true_positive);
28 
29 };
30 
31 template< class T > inline
33 {
34 }
35 
36 
37 template< class T > inline
38 // double Dice< T >::doit(T ref, T test, T true_positive, T ) --> pr calcul specificity
39 double Dice< T >::doit(T ref, T test, T true_positive)
40 {
41  double out;
42  out = 2 * (double)true_positive /
43  ( (double)ref + (double)test );
44  return (out);
45 }
46 
47 #endif
Definition: dice.h:20
virtual double doit(T ref, T test, T true_positive)
Definition: dice.h:39
Dice()
Definition: dice.h:32
virtual ~Dice()
Definition: dice.h:24