35 #ifndef AIMS_POINTS_DISTRIBUTION_POINTS_DISTRIBUTION_H 36 #define AIMS_POINTS_DISTRIBUTION_POINTS_DISTRIBUTION_H 100 typedef std::map<unsigned, std::set<unsigned> >
LinkSet;
193 PointSet *
distribute(
const PointSet & pts,
unsigned nsteps=100,
198 PointSet *
distribute(
unsigned npoints,
unsigned nsteps = 100,
199 double step = 0.01 );
CoulombAndRestoringForce()
std::map< unsigned, std::set< unsigned > > LinkSet
PointSet * get_forces(const PointSet &pts)
virtual Point3df force(const Point3df &p1, const Point3df &p2, bool has_link)=0
Force between 2 points.
std::vector< Point3df > PointSet
virtual Point3df position(const Point3df &pt, const Point3df &f, double step)
The default is unconstrained: just move the requested amount.
virtual double energy(const Point3df &p1, const Point3df &p2, bool has_link)=0
Energy of the force between 2 points.
virtual ~MoveConstraints()
Move point constrained to a uinit sphere: project the force to be tangent to the sphere, move the point, then stick it onto the sphere.
virtual ~CoulombAndRestoringForce()
Utility function for sphere_distribution.
void set_links(const LinkSet &links)
Set linked points set.
double get_coulomb_energy(const PointSet &pts)
void setMoveConstraints(MoveConstraints *move_constaint)
Set the individual move constraints function.
Utility force class for sphere_distribution.
Utility function for sphere_distribution.
PointSet * distribute(const PointSet &pts, unsigned nsteps=100, double step=0.01)
get a points distribution on a sphere.
void setForceFunction(ForceFunction *force)
Set the individual force function.
Points repartition using forces in a given geometry (on a sphere for instance).
static PointSet init_points(unsigned npoints)
Randomly initialize npoints points on a unit sphere.
Utility function for sphere_distribution.
PointsDistribution(ForceFunction *force=new CoulombForce, MoveConstraints *move_constraint=new SphereMove)
Constructor.