#ifndef __PSOPARTICLE_H__
#define __PSOPARTICLE_H__

/// particle in the PSO
struct psoparticle
{
  double x;      ///< x position
  double y;      ///< y position
  double vx;     ///< x speed
  double vy;     ///< y speed
  double cscore; ///< current score
  
  double bx;     ///< best x transformation
  double by;     ///< best y transformation
  double bscore; ///< bestscore
  
  int cnum;      ///< the kmeans cluster it is in
  int imnum;     ///< image number in the stack
  int imparnum;  ///< particle number in the image

  int newpt;     ///< flag if this point is new
  int pid;       ///< particle id in database
};

// particle in the PSO
struct psoparticle_cluster
{
  double x;      ///< x center position
  double y;      ///< y position
  double var_x;  ///< x variance of particles
  double var_y;  ///< y variance 
  int size;      ///< current cluster size
  double sizef;  ///< fractional size
  
  double bx;     ///< best x transformation within cluster
  double by;     ///< best y transformation
  double bscore; ///< bestscore
};

struct box
{
  double lowx;
  double lowy;
  double highx;
  double highy;
};

#endif
