CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pointweightmodifier.h
Go to the documentation of this file.
1 #ifndef POINTWEIGHTMODIFIER_H
2 #define POINTWEIGHTMODIFIER_H
3 
4 #include "../base/weightmodifier.h"
5 #include "../point/point.h"
6 
7 namespace CluE
8 {
9 
15 class PointWeightModifier : public WeightModifier<Point>
16 {
17 public:
18  virtual PointWeightModifier* clone() const;
19 
20  virtual double getWeight(Point&);
21  virtual void setWeight(Point&, double);
22 };
23 
24 inline
26 {
27  return new PointWeightModifier(*this);
28 }
29 
30 inline
32 {
33  return p.getWeight();
34 }
35 
36 inline
38 {
39  p.setWeight(w);
40 }
41 
42 }
43 
44 #endif
virtual PointWeightModifier * clone() const
make an exact copy of this object The clone method creates a copy of this object and returns a pointe...
Modifies the weight of a Point.
virtual void setWeight(Point &, double)
Abstract base class to modify the weight of weighted objects.
virtual double getWeight(Point &)
Weighted point of arbitrary dimension.
Definition: point.h:17
virtual double getWeight() const
Definition: point.h:92
virtual void setWeight(double w)
Definition: point.h:97