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

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkDensityFunction.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 __itkDensityFunction_h
#define __itkDensityFunction_h

#include "itkObject.h"

namespace itk{ 
  namespace Statistics{

/** \class DensityFunction
 * \brief DensityFunction class represents  Density Function.
 *
 * This class keeps parameter to define  Density Function  and has
 * method to return the probability density 
 * of an instance.  MeasurementVectorSize is the dimension of measurement space.
 * double is type of measurement. 
 */

template< class TMeasurementVector >
class ITK_EXPORT DensityFunction :
      public Object
{
public:
  /** Standard class typedefs */
  typedef DensityFunction Self;
  typedef Object Superclass ;
  typedef SmartPointer<Self> Pointer;

  /** Strandard macros */
  itkTypeMacro(DensityFunction, Object);
  itkNewMacro(Self);

  /** Typedef alias for the measurement vectors */
  typedef TMeasurementVector MeasurementVectorType ;

 /** Method to get probability of an instance. The return value is the
  * value of the density function, not probability. */
  virtual double Evaluate(MeasurementVectorType measurement) = 0 ;
  

protected:
  DensityFunction(void) {}
  virtual ~DensityFunction(void) {}
  void PrintSelf(std::ostream& os, Indent indent) const
  { Superclass::PrintSelf(os,indent) ; }
} ; // end of class

  } // end of namespace Statistics
} // end namespace itk

#endif<commit_msg>PERF: Evaluate function accepts reference argument to avoid copy vector values<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkDensityFunction.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 __itkDensityFunction_h
#define __itkDensityFunction_h

#include "itkObject.h"

namespace itk{ 
  namespace Statistics{

/** \class DensityFunction
 * \brief DensityFunction class represents  Density Function.
 *
 * This class keeps parameter to define  Density Function  and has
 * method to return the probability density 
 * of an instance.  MeasurementVectorSize is the dimension of measurement space.
 * double is type of measurement. 
 */

template< class TMeasurementVector >
class ITK_EXPORT DensityFunction :
      public Object
{
public:
  /** Standard class typedefs */
  typedef DensityFunction Self;
  typedef Object Superclass ;
  typedef SmartPointer<Self> Pointer;

  /** Strandard macros */
  itkTypeMacro(DensityFunction, Object);
  itkNewMacro(Self);

  /** Typedef alias for the measurement vectors */
  typedef TMeasurementVector MeasurementVectorType ;

 /** Method to get probability of an instance. The return value is the
  * value of the density function, not probability. */
  virtual double Evaluate(MeasurementVectorType &measurement) = 0 ;
  

protected:
  DensityFunction(void) {}
  virtual ~DensityFunction(void) {}
  void PrintSelf(std::ostream& os, Indent indent) const
  { Superclass::PrintSelf(os,indent) ; }
} ; // end of class

  } // end of namespace Statistics
} // end namespace itk

#endif
{'fraction_non_alphanumeric': 0.14098201263976665, 'fraction_numerical': 0.0024307243558580457, 'mean_word_length': 4.323415265200517, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3424535', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1031, 'n_words': 381}