Public Types | Public Member Functions

point_t< CoordType, CoordinateSystem > Class Template Reference

Represents an arbitrary point in the underlying coordinate system. More...

#include <point.hpp>

Public Types

enum  { dim = CoordinateSystem::dim }
 

Publish the geometric dimension of the point.

More...
typedef CoordType value_type
 Publish the underlying numberic type of coordinates.
typedef dim_type size_type
 STL-compatible typedef for the value returned by size().

Public Member Functions

 point_t ()
 Default constructor. Sets all entries to zero.
 point_t (CoordType x, CoordType y=0, CoordType z=0)
 Convenience constructor, initializing the point components with values.
template<typename CoordType2 , typename CoordinateSystem2 >
 point_t (point_t< CoordType2, CoordinateSystem2 > const &p2)
 Constructor taking a point given in a different coordinate system.
 point_t (point_t const &other)
 Copy constructor. Copies the entries.
point_toperator= (point_t const &p2)
 Assignment operator for a point with the same coordinate system.
template<typename CoordType2 , typename CoordinateSystem2 >
point_toperator= (point_t< CoordType2, CoordinateSystem2 > const &p2)
 Assignment operator for a point given in a different coordinate system.
CoordType & operator[] (size_type index)
 Read/Write access to the coordinate at position 'index'.
CoordType const & operator[] (size_type index) const
 Read access to the coordinate at position 'index'.
CoordType at (size_type index)
 STL-type checked read/write access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.
CoordType const & at (size_type index) const
 STL-type checked read access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.
size_type size () const
 Returns the geometric dimension of the point.
point_t operator+ (point_t const &other) const
 Convenience overload for the addition of points.
point_toperator+= (point_t const &other)
 Convenience overload for the inplace addition of points.
point_t operator- (point_t const &other) const
 Convenience overload for the subtraction of points.
point_toperator-= (point_t const &other)
 Convenience overload for the inplace subtraction of points.
point_toperator*= (CoordType factor)
 Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
point_toperator/= (CoordType factor)
 Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
point_t operator* (CoordType factor) const
 Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.
point_t operator/ (CoordType factor) const
 Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.

Detailed Description

template<typename CoordType, typename CoordinateSystem>
class viennagrid::point_t< CoordType, CoordinateSystem >

Represents an arbitrary point in the underlying coordinate system.

Template Parameters:
CoordType Type of each coordinate entry (usually double or float)
d Geometric dimension of the underlying coordinate system
CoordinateSystem The underlying coordinate system of the point.

Member Typedef Documentation

STL-compatible typedef for the value returned by size().

typedef CoordType value_type

Publish the underlying numberic type of coordinates.


Member Enumeration Documentation

anonymous enum

Publish the geometric dimension of the point.

Enumerator:
dim 

Constructor & Destructor Documentation

point_t (  )  [inline]

Default constructor. Sets all entries to zero.

point_t ( CoordType  x,
CoordType  y = 0,
CoordType  z = 0 
) [inline]

Convenience constructor, initializing the point components with values.

point_t ( point_t< CoordType2, CoordinateSystem2 > const &  p2  )  [inline]

Constructor taking a point given in a different coordinate system.

point_t ( point_t< CoordType, CoordinateSystem > const &  other  )  [inline]

Copy constructor. Copies the entries.


Member Function Documentation

CoordType at ( size_type  index  )  [inline]

STL-type checked read/write access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.

CoordType const& at ( size_type  index  )  const [inline]

STL-type checked read access to the coordinate at position 'index'. Throws an exception if 'index' is invalid.

point_t operator* ( CoordType  factor  )  const [inline]

Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.

point_t& operator*= ( CoordType  factor  )  [inline]

Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.

point_t operator+ ( point_t< CoordType, CoordinateSystem > const &  other  )  const [inline]

Convenience overload for the addition of points.

point_t& operator+= ( point_t< CoordType, CoordinateSystem > const &  other  )  [inline]

Convenience overload for the inplace addition of points.

point_t operator- ( point_t< CoordType, CoordinateSystem > const &  other  )  const [inline]

Convenience overload for the subtraction of points.

point_t& operator-= ( point_t< CoordType, CoordinateSystem > const &  other  )  [inline]

Convenience overload for the inplace subtraction of points.

point_t operator/ ( CoordType  factor  )  const [inline]

Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.

point_t& operator/= ( CoordType  factor  )  [inline]

Convenience overload for stretching the vector given by the point. The vector is stretched in the Euclidian space - thus coordinates are transformed appropriately if required.

point_t& operator= ( point_t< CoordType, CoordinateSystem > const &  p2  )  [inline]

Assignment operator for a point with the same coordinate system.

point_t& operator= ( point_t< CoordType2, CoordinateSystem2 > const &  p2  )  [inline]

Assignment operator for a point given in a different coordinate system.

CoordType& operator[] ( size_type  index  )  [inline]

Read/Write access to the coordinate at position 'index'.

CoordType const& operator[] ( size_type  index  )  const [inline]

Read access to the coordinate at position 'index'.

size_type size (  )  const [inline]

Returns the geometric dimension of the point.


The documentation for this class was generated from the following file: