STIR
6.2.0
|
a templated class for 2-dimensional coordinates. More...
#include "stir/Coordinate2D.h"
Public Member Functions | |
Coordinate2D (const coordT &, const coordT &) | |
Coordinate2D (const BasicCoordinate< 2, coordT > &c) | |
Coordinate2D & | operator= (const BasicCoordinate< 2, coordT > &c) |
Public Member Functions inherited from stir::BasicCoordinate< 2, coordT > | |
BasicCoordinate () | |
default constructor. NO initialisation | |
BasicCoordinate (const coordT &) | |
constructor that sets all elements equal to value. | |
BasicCoordinate (const BasicCoordinate< num_dimensions, coordT2 > &c) | |
constructor from different type of coordT More... | |
BasicCoordinate & | operator= (const BasicCoordinate &c) |
assignment | |
bool | operator== (const BasicCoordinate &c) const |
comparison | |
bool | operator< (const BasicCoordinate &c) const |
less-than (using lexical ordering) | |
coordT & | operator[] (const int d) |
Return value at index t (which is 1-based) | |
coordT const & | operator[] (const int d) const |
Return value at index t (which is 1-based) if the BasicCoordinate object is const. More... | |
coordT & | at (const int d) |
Return value at index t (which is 1-based), but with range checking (throws std::out_of_range) | |
coordT const & | at (const int d) const |
Return value at index t (which is 1-based) if the BasicCoordinate object is const, but with range checking (throws std::out_of_range) | |
bool | empty () const |
BasicCoordinate & | operator+= (const BasicCoordinate &c) |
BasicCoordinate & | operator+= (const coordT &a) |
BasicCoordinate & | operator-= (const BasicCoordinate &c) |
BasicCoordinate & | operator-= (const coordT &a) |
BasicCoordinate & | operator*= (const BasicCoordinate &c) |
BasicCoordinate & | operator*= (const coordT &a) |
BasicCoordinate & | operator/= (const BasicCoordinate &c) |
BasicCoordinate & | operator/= (const coordT &a) |
BasicCoordinate | operator+ (const BasicCoordinate &c) const |
BasicCoordinate | operator- (const BasicCoordinate &c) const |
BasicCoordinate | operator* (const BasicCoordinate &c) const |
BasicCoordinate | operator/ (const BasicCoordinate &c) const |
BasicCoordinate | operator+ (const coordT &a) const |
BasicCoordinate | operator- (const coordT &a) const |
BasicCoordinate | operator- () const |
BasicCoordinate | operator* (const coordT &a) const |
BasicCoordinate | operator/ (const coordT &a) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | fill (const coordT &) |
fill elements with value | |
Protected Types | |
typedef BasicCoordinate< 2, coordT > | base_type |
Additional Inherited Members | |
Public Types inherited from stir::BasicCoordinate< 2, coordT > | |
typedef std::random_access_iterator_tag | iterator_category |
typedef coordT | value_type |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef value_type * | iterator |
typedef value_type * | pointer |
typedef const value_type * | const_iterator |
typedef std::ptrdiff_t | difference_type |
typedef std::size_t | size_type |
Static Public Member Functions inherited from stir::BasicCoordinate< 2, coordT > | |
static int | get_min_index () |
static int | get_max_index () |
static unsigned | size () |
a templated class for 2-dimensional coordinates.
The only new method is a constructor Coordinate2D<coordT>(c1,c2)