<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkHypersphereKernelMeanShiftModeSeeker.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __itkHypersphereKernelMeanShiftModeSeeker_h
#define __itkHypersphereKernelMeanShiftModeSeeker_h

#include "itkMeanShiftModeSeekerBase.h"

#include "itkNumericTraits.h"
#include "itkFixedArray.h"

namespace itk{ 
namespace Statistics{
  
/** \class HypersphereKernelMeanShiftModeSeeker
 * \brief Calculates the covariance matrix of the target sample data.
 *
 */

template< class TSample >
class HypersphereKernelMeanShiftModeSeeker :
    public MeanShiftModeSeekerBase< TSample >
{
public:
  /** Standard class typedefs. */
  typedef HypersphereKernelMeanShiftModeSeeker Self;
  typedef MeanShiftModeSeekerBase< TSample > Superclass ;
  typedef SmartPointer<Self> Pointer;

  /** Standard Macros */
  itkTypeMacro(HypersphereKernelMeanShiftModeSeeker, 
               MeanShiftModeSeekerBase);
  itkNewMacro(Self) ;
  
  typedef typename Superclass::MeasurementVectorType MeasurementVectorType ;
  typedef typename Superclass::SearchResultVectorType SearchResultVectorType ;
  typedef typename Superclass::MeasurementType MeasurementType ;

  itkStaticConstMacro( MeasurementVectorSize, unsigned int,
                       MeasurementVectorType::Length ) ;

//   typedef FixedArray< NumericTraits< MeasurementType >::AccumulateType, 
//                       itkGetStaticConstMacro( MeasurementVectorSize ) > 
//   MeasurementVectorSumType ;

  typedef typename NumericTraits< MeasurementType >::RealType RealMeasurementType ;
  typedef FixedArray< RealMeasurementType,
                      itkGetStaticConstMacro( MeasurementVectorSize ) > 
  MeasurementVectorSumType ;

  void SetSearchRadius(double radius) ;
  
  double GetSearchRadius()
  { return m_SearchRadius ; }

  /** Returns the covariance matrix of the target sample data */ 
  MeasurementVectorType Evolve(MeasurementVectorType instance) ;
  
protected:
  HypersphereKernelMeanShiftModeSeeker() ;
  virtual ~HypersphereKernelMeanShiftModeSeeker() ;
  void PrintSelf(std::ostream& os, Indent indent) const;
<commit_msg>BUG: VC 7.0 issues an internal compiler error when it tries to pase the MeasurementVectorSumType which uses NumericTraits< MeasurementType >::RealType.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkHypersphereKernelMeanShiftModeSeeker.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __itkHypersphereKernelMeanShiftModeSeeker_h
#define __itkHypersphereKernelMeanShiftModeSeeker_h

#include "itkMeanShiftModeSeekerBase.h"

#include "itkFixedArray.h"
#include "itkNumericTraits.h"

namespace itk{ 
namespace Statistics{
  
/** \class HypersphereKernelMeanShiftModeSeeker
 * \brief Calculates the covariance matrix of the target sample data.
 *
 */

template< class TSample >
class HypersphereKernelMeanShiftModeSeeker :
    public MeanShiftModeSeekerBase< TSample >
{
public:
  /** Standard class typedefs. */
  typedef HypersphereKernelMeanShiftModeSeeker Self;
  typedef MeanShiftModeSeekerBase< TSample > Superclass ;
  typedef SmartPointer<Self> Pointer;

  /** Standard Macros */
  itkTypeMacro(HypersphereKernelMeanShiftModeSeeker, 
               MeanShiftModeSeekerBase);
  itkNewMacro(Self) ;
  
  typedef typename Superclass::MeasurementVectorType MeasurementVectorType ;
  typedef typename Superclass::SearchResultVectorType SearchResultVectorType ;
  typedef typename Superclass::MeasurementType MeasurementType ;

  itkStaticConstMacro( MeasurementVectorSize, unsigned int,
                       MeasurementVectorType::Length ) ;

  typedef double RealMeasurementType ;
  typedef FixedArray< RealMeasurementType,
                      itkGetStaticConstMacro( MeasurementVectorSize ) > 
  MeasurementVectorSumType ;

  void SetSearchRadius(double radius) ;
  
  double GetSearchRadius()
  { return m_SearchRadius ; }

  /** Returns the covariance matrix of the target sample data */ 
  MeasurementVectorType Evolve(MeasurementVectorType instance) ;
  
protected:
  HypersphereKernelMeanShiftModeSeeker() ;
  virtual ~HypersphereKernelMeanShiftModeSeeker() ;
  void PrintSelf(std::ostream& os, Indent indent) const;

{'fraction_non_alphanumeric': 0.11672342035565646, 'fraction_numerical': 0.0018917896329928112, 'mean_word_length': 4.835540838852097, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5325477', 'n_tokens_mistral': 1539, 'n_tokens_neox': 1371, 'n_words': 358}