aimsalgo 6.0.0
Neuroimaging image processing
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
41template <class T>
43 aims::ClassifStrategy<T>( pcaStrat )
44{
45 myDistance = pcaStrat.myDistance ;
46}
47
48
49template <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 :
67 break ;
68 }
69
70 // TODO
71}
72
73
74template <class T>
78
79
80template <class T>
85
86
87template <class T>
88void aims::PcaStrategy<T>::analyse( const std::vector< std::list< aims::Individuals<T> > >& classes )
89{
90}
91
92
93template <class T>
95{
96
97 return this->indMin ;
98}
99
100
101template <class T>
103{
104 if ( nbChanges == 0 ) return false ;
105 else return true ;
106}
107
108
109template <class T>
110float 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
ClassifStrategy(int maxNbOfIterations=50)
static float norm1(const std::vector< T > &ind1, const std::vector< T > &ind2, unsigned int beginIndex, unsigned int endIndex)
Definition distance_d.h:54
static float infiniteNorm(const std::vector< T > &ind1, const std::vector< T > &ind2, unsigned int beginIndex, unsigned int endIndex)
Definition distance_d.h:102
static float norm2sqr(const std::vector< T > &ind1, const std::vector< T > &ind2, unsigned int beginIndex, unsigned int endIndex)
Definition distance_d.h:86
static float norm2(const std::vector< T > &ind1, const std::vector< T > &ind2, unsigned int beginIndex, unsigned int endIndex)
Definition distance_d.h:70
virtual void analyse(const std::vector< std::list< Individuals< T > > > &classes)
virtual ~PcaStrategy()
virtual bool classificationCompleted(int nbChanges)
PcaStrategy(const PcaStrategy< T > &pcaStrat)
virtual ClassifStrategy< T > * clone() const
virtual int agregation(const Individuals< T > &individual)