OTB  9.0.0
Orfeo Toolbox
otbSOMLearningBehaviorFunctor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 
23 #ifndef otbSOMLearningBehaviorFunctor_h
24 #define otbSOMLearningBehaviorFunctor_h
25 
26 namespace otb
27 {
28 
29 namespace Functor
30 {
31 
48 {
49 public:
52  {
53  }
55  {
56  }
58 
60  virtual double operator()(unsigned int currentIteration, unsigned int numberOfIterations, double betaInit, double betaEnd) const
61  {
62  return betaInit + (betaEnd - betaInit) * static_cast<double>(currentIteration) / static_cast<double>(numberOfIterations);
63  }
64 
65 }; // end of class SOMLearningBehaviorFunctor
66 
67 } // end namespace Functor
68 
69 } // end namespace otb
70 
71 #endif
otb::Functor::SOMLearningBehaviorFunctor::SOMLearningBehaviorFunctor
SOMLearningBehaviorFunctor()
Definition: otbSOMLearningBehaviorFunctor.h:51
otb::Functor::SOMLearningBehaviorFunctor::operator()
virtual double operator()(unsigned int currentIteration, unsigned int numberOfIterations, double betaInit, double betaEnd) const
Definition: otbSOMLearningBehaviorFunctor.h:60
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Functor::SOMLearningBehaviorFunctor
Classical Beta behavior over SOM training phase.
Definition: otbSOMLearningBehaviorFunctor.h:47
otb::Functor::SOMLearningBehaviorFunctor::~SOMLearningBehaviorFunctor
virtual ~SOMLearningBehaviorFunctor()
Definition: otbSOMLearningBehaviorFunctor.h:54