CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
discreteboundedrealspaceprovider.h
Go to the documentation of this file.
1 #ifndef DISCRETEBOUNDEDREALSPACEPROVIDER_H
2 #define DISCRETEBOUNDEDREALSPACEPROVIDER_H
3 
4 #include "../point/point.h"
5 #include "../base/discreteboundedspace.h"
6 
7 namespace CluE
8 {
9 
15 class DiscreteBoundedRealSpaceProvider : public DiscreteBoundedSpace<Point, unsigned long long>
16 {
17 public:
18  DiscreteBoundedRealSpaceProvider(size_t dimension, unsigned long long n, Point minimum, double length);
19 
20  virtual DiscreteBoundedRealSpaceProvider* clone() const;
21 
22  virtual Point getVector(std::vector<unsigned long long> coordinates) const;
23 
24  virtual std::vector<unsigned long long> getCoordinates(Point const & vector) const;
25 
26  virtual size_t dimension() const
27  {
28  return _dimension;
29  }
30 
31  virtual unsigned long long n() const
32  {
33  return _n;
34  }
35 
36  virtual Point origin() const
37  {
38  return minimum;
39  }
40 
41 private:
42  size_t _dimension;
43  int _n;
45  double length;
46  std::vector<double> stepSize;
47 };
48 
49 }
50 
51 #endif
virtual size_t dimension() const
Space dimension.
DiscreteBoundedRealSpaceProvider(size_t dimension, unsigned long long n, Point minimum, double length)
virtual unsigned long long n() const
Number of discrete coordinates per dimension.
virtual DiscreteBoundedRealSpaceProvider * clone() const
Provides discrete bounded space features for Point.
Interface to extend a template type to provide discrete (bounded) space {0, ..., n-1}^d features...
virtual Point origin() const
Returns the space's origin.
virtual Point getVector(std::vector< unsigned long long > coordinates) const
Returns the vector represented by the given coordinates.
Weighted point of arbitrary dimension.
Definition: point.h:17
virtual std::vector< unsigned long long > getCoordinates(Point const &vector) const
Returns the coordinates of the given vector.