BICO  1.1
 All Classes Namespaces Files Functions Variables Typedefs Pages
discreteboundedspace.h
Go to the documentation of this file.
1 #ifndef DISCRETEBOUNDEDSPACE_H
2 #define DISCRETEBOUNDEDSPACE_H
3 
4 namespace CluE
5 {
6 
12 template<typename VectorType, typename size_space> class DiscreteBoundedSpace
13 {
14 public:
15  typedef VectorType V;
16 
17  virtual DiscreteBoundedSpace<V, size_space>* clone() const = 0;
18 
22  virtual V getVector(std::vector<size_space> coordinates) const = 0;
23 
27  virtual std::vector<size_space> getCoordinates(V const & vector) const = 0;
28 
32  virtual size_t dimension() const = 0;
33 
37  virtual size_space n() const = 0;
38 
42  virtual size_space uBound() const
43  {
44  return n()-1;
45  }
46 
50  virtual VectorType origin() const = 0;
51 };
52 
53 }
54 
55 #endif
virtual size_space n() const =0
Number of discrete coordinates per dimension.
virtual V getVector(std::vector< size_space > coordinates) const =0
Returns the vector represented by the given coordinates.
virtual DiscreteBoundedSpace< V, size_space > * clone() const =0
Interface to extend a template type to provide discrete (bounded) space {0, ..., n-1}^d features...
virtual size_space uBound() const
Upper bound = n-1.
virtual size_t dimension() const =0
Space dimension.
virtual std::vector< size_space > getCoordinates(V const &vector) const =0
Returns the coordinates of the given vector.
virtual VectorType origin() const =0
Returns the space's origin.