00001 /*========================================================================= 00002 00003 Program: F.R.E.E. - flexible registration evaluation engine 00004 Version: v.1.0.0 00005 Date: $Date: 2006/09/01 12:00:00 $ 00006 Module: $RCSfile: freESRandomMultiParentSelector.h,v $ 00007 Language: C++ 00008 00009 00010 00011 Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics, 00012 Institute for Medical Biometry and Informatics, University of Heidelberg, 00013 Germany). All rights reserved. 00014 See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm 00015 for details. 00016 00017 This software is distributed WITHOUT ANY WARRANTY; without even 00018 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00019 PURPOSE. See the above copyright notices for more information. 00020 00021 =========================================================================*/ 00022 #ifndef __freESRandomMultiParentSelector_h 00023 #define __freESRandomMultiParentSelector_h 00024 00025 #include "freESParentSelectorBase.h" 00026 00027 #include "itkMersenneTwisterRandomVariateGenerator.h" 00028 00029 namespace FREE 00030 { 00031 namespace ES 00032 { 00033 00043 template <class TIndividual> 00044 class ITK_EXPORT RandomMultiParentSelector: 00045 public ParentSelectorBase<TIndividual> 00046 { 00047 public: 00049 typedef RandomMultiParentSelector<TIndividual> Self ; 00050 typedef ParentSelectorBase<TIndividual> Superclass; 00051 typedef itk::SmartPointer<Self> Pointer; 00052 typedef itk::SmartPointer<const Self> ConstPointer; 00053 00055 itkNewMacro(Self); 00056 00058 itkTypeMacro(RandomMultiParentSelector, ParentSelectorBase); 00059 00060 typedef typename Superclass::IndividualType IndividualType; 00061 typedef typename IndividualType::Pointer IndividualPointer; 00062 typedef Population<IndividualType> PopulationType; 00063 typedef std::vector<IndividualPointer> ParentSelectionType; 00064 00066 typedef itk::Statistics::MersenneTwisterRandomVariateGenerator VariateGeneratorType ; 00067 00068 virtual ParentSelectionType Select(const PopulationType& population) const; 00069 00070 VariateGeneratorType& GetRandomGenerator() {return *(m_RandomGenerator.GetPointer());}; 00071 00072 itkSetMacro( AllowRedraw, bool ); 00073 itkGetConstMacro( AllowRedraw, bool ); 00074 itkBooleanMacro(AllowRedraw); 00075 00076 itkSetMacro( NumberOfSelections, unsigned long ); 00077 itkGetConstMacro( NumberOfSelections, unsigned long ); 00078 00079 protected: 00080 RandomMultiParentSelector() ; 00081 00083 VariateGeneratorType::Pointer m_RandomGenerator ; 00084 00085 bool m_AllowRedraw; 00086 00087 unsigned long m_NumberOfSelections; 00088 00089 private: 00090 RandomMultiParentSelector(Self const&); // Purposely not implemented. 00091 00092 } ; // end of class 00093 00094 } // end of namespace ES 00095 } // end of namespace FREE 00096 00097 00098 #ifndef ITK_MANUAL_INSTANTIATION 00099 #include "freESRandomMultiParentSelector.txx" 00100 #endif 00101 00102 #endif
1.5.3 written by Dimitri van Heesch,
© 1997-2000