A.I.M.S algorithms


pcastrategy_d.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 
35 #ifndef PCASTRATEGY_D_H
36 #define PCASTRATEGY_D_H
37 
39 
40 
41 template <class T>
43  aims::ClassifStrategy<T>( pcaStrat )
44 {
45  myDistance = pcaStrat.myDistance ;
46 }
47 
48 
49 template <class T>
51  DistanceType distanceType,
52  const std::vector< aims::Individuals<T> >& codeVector ) :
53  aims::ClassifStrategy<T>( nbIterations )
54 {
55  switch( distanceType ) {
56  case NORM1 :
57  myDistance = aims::Distance<T>::norm1 ;
58  break ;
59  case NORM2 :
60  myDistance = aims::Distance<T>::norm2 ;
61  break ;
62  case NORM2SQR :
63  myDistance = aims::Distance<T>::norm2sqr ;
64  break ;
65  case INFNORM :
66  myDistance = aims::Distance<T>::infiniteNorm ;
67  break ;
68  }
69 
70  // TODO
71 }
72 
73 
74 template <class T>
76 {
77 }
78 
79 
80 template <class T>
82 {
83  return new aims::PcaStrategy<T>( *this ) ;
84 }
85 
86 
87 template <class T>
88 void aims::PcaStrategy<T>::analyse( const std::vector< std::list< aims::Individuals<T> > >& classes )
89 {
90 }
91 
92 
93 template <class T>
95 {
96 
97  return this->indMin ;
98 }
99 
100 
101 template <class T>
103 {
104  if ( nbChanges == 0 ) return false ;
105  else return true ;
106 }
107 
108 
109 template <class T>
110 float aims::PcaStrategy<T>::distance( const aims::Individuals<T>& individual, int classe )
111 {
112  T::not_implemented();
113  return 0.0; // ### BEN ALORS ? IL MANQUE LE CODE DE CETTE FONCTION !
114 }
115 
116 #endif
virtual bool classificationCompleted(int nbChanges)
virtual void analyse(const std::vector< std::list< Individuals< T > > > &classes)
Definition: pcastrategy_d.h:88
virtual int agregation(const Individuals< T > &individual)
Definition: pcastrategy_d.h:94
PcaStrategy(const PcaStrategy< T > &pcaStrat)
Definition: pcastrategy_d.h:42
virtual ClassifStrategy< T > * clone() const
Definition: pcastrategy_d.h:81
virtual ~PcaStrategy()
Definition: pcastrategy_d.h:75