BICO 1.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

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
CluE::DiscreteBoundedSpace::n
virtual size_space n() const =0
Number of discrete coordinates per dimension.
CluE::DiscreteBoundedSpace::getVector
virtual V getVector(std::vector< size_space > coordinates) const =0
Returns the vector represented by the given coordinates.
CluE::DiscreteBoundedSpace::clone
virtual DiscreteBoundedSpace< V, size_space > * clone() const =0
CluE::DiscreteBoundedSpace
Interface to extend a template type to provide discrete (bounded) space {0, ..., n-1}^d features...
Definition: discreteboundedspace.h:12
CluE::DiscreteBoundedSpace::uBound
virtual size_space uBound() const
Upper bound = n-1.
Definition: discreteboundedspace.h:42
CluE::DiscreteBoundedSpace::dimension
virtual size_t dimension() const =0
Space dimension.
CluE::DiscreteBoundedSpace::V
VectorType V
Definition: discreteboundedspace.h:15
CluE::DiscreteBoundedSpace::getCoordinates
virtual std::vector< size_space > getCoordinates(V const &vector) const =0
Returns the coordinates of the given vector.
CluE::DiscreteBoundedSpace::origin
virtual VectorType origin() const =0
Returns the space's origin.