18 #ifndef __itkPSMCostFunction_h 19 #define __itkPSMCostFunction_h 21 #include "itkLightObject.h" 22 #include "itkObjectFactory.h" 23 #include "itkWeakPointer.h" 24 #include "itkPSMParticleSystem.h" 25 #include "vnl/vnl_vector_fixed.h" 51 template <
unsigned int VDimension>
57 typedef SmartPointer<Self> Pointer;
58 typedef SmartPointer<const Self> ConstPointer;
59 typedef LightObject Superclass;
79 virtual VectorType
Evaluate(
unsigned int ,
unsigned int,
const ParticleSystemType *,
80 double &maxtimestep)
const = 0;
81 virtual VectorType
Evaluate(
unsigned int ,
unsigned int,
const ParticleSystemType *,
82 double &maxtimestep,
double &energy)
const = 0;
83 virtual double Energy(
unsigned int,
unsigned int,
const ParticleSystemType *)
const = 0;
102 virtual void BeforeEvaluate(
unsigned int ,
unsigned int,
const ParticleSystemType *) {}
107 { m_ParticleSystem = p; }
108 virtual ParticleSystemType *GetParticleSystem()
const 109 {
return m_ParticleSystem; }
110 virtual void SetDomainNumber(
unsigned int i)
111 { m_DomainNumber = i; }
112 virtual int GetDomainNumber()
const 113 {
return m_DomainNumber; }
121 ParticleSystemType *m_ParticleSystem;
122 unsigned int m_DomainNumber;
virtual void ResetBuffers()
virtual void BeforeEvaluate(unsigned int, unsigned int, const ParticleSystemType *)
virtual VectorType Evaluate(unsigned int, unsigned int, const ParticleSystemType *, double &maxtimestep) const =0
virtual void SetParticleSystem(ParticleSystemType *p)
A facade class that manages interactions with a particle system.
virtual void AfterIteration()
vnl_vector_fixed< double, VDimension > VectorType
virtual void BeforeIteration()
PSMParticleSystem< VDimension > ParticleSystemType
itkStaticConstMacro(Dimension, unsigned int, VDimension)