Base class for implementation of point classes.  
More...
#include <gpoint.hh>
List of all members.
| 
Public Types | 
| typedef Gpoint< void > | category | 
| typedef E | exact_t | 
| 
Protected Member Functions | 
|  | Gpoint () | 
| 
Related Functions | 
| (Note that these are not member functions.)  
 
 | 
| template<typename P , typename D > | 
| P | operator+ (const Gpoint< P > &p, const Gdpoint< D > &dp) | 
|  | Add a delta-point rhsto a grid pointlhs.
 | 
| template<typename P , typename D > | 
| P & | operator+= (Gpoint< P > &p, const Gdpoint< D > &dp) | 
|  | Shift a point bya delta-pointdp.
 | 
| template<typename L , typename R > | 
| L::delta | operator- (const Gpoint< L > &lhs, const Gpoint< R > &rhs) | 
|  | Difference between a couple of grid point lhsandrhs.
 | 
| template<typename P , typename D > | 
| P & | operator-= (Gpoint< P > &p, const Gdpoint< D > &dp) | 
|  | Shift a point bythe negate of a delta-pointdp.
 | 
| template<typename P , typename D > | 
| P | operator/ (const Gpoint< P > &p, const value::scalar_< D > &dp) | 
|  | Divise a point bya scalars.
 | 
| template<typename P > | 
| std::ostream & | operator<< (std::ostream &ostr, const Gpoint< P > &p) | 
|  | Print a grid point pinto the output streamostr.
 | 
| template<typename L , typename R > | 
| bool | operator== (const Gpoint< L > &lhs, const Gpoint< R > &rhs) | 
|  | Equality comparison between a couple of grid point lhsandrhs.
 | 
Detailed Description
template<typename E>
 struct mln::Gpoint< E >
Base class for implementation of point classes. 
A point is an element of a space.
For instance, mln::point2d is the type of elements defined on the discrete square grid of the 2D plane. 
Member Typedef Documentation
Constructor & Destructor Documentation
Friends And Related Function Documentation
template<typename P , typename D > 
      
        
          | P operator+ | ( | const Gpoint< P > & | p, | 
        
          |  |  | const Gdpoint< D > & | dp |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Add a delta-point rhs to a grid point lhs. 
- Parameters:
- 
  
    | [in] | p | A grid point. |  | [in] | dp | A delta-point. |  
 
The type of dp has to compatible with the type of p.
- Returns:
- A point (temporary object).
- See also:
- mln::Gdpoint 
 
 
template<typename P , typename D > 
      
        
          | P & operator+= | ( | Gpoint< P > & | p, | 
        
          |  |  | const Gdpoint< D > & | dp |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Shift a point by a delta-point dp. 
- Parameters:
- 
  
    | [in,out] | p | The targeted point. |  | [in] | dp | A delta-point. |  
 
- Returns:
- A reference to the point ponce translated bydp.
- Precondition:
- The type of dphas to be compatible with the type ofp.
 
 
template<typename L , typename R > 
      
        
          | L::delta operator- | ( | const Gpoint< L > & | lhs, | 
        
          |  |  | const Gpoint< R > & | rhs |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Difference between a couple of grid point lhs and rhs. 
- Parameters:
- 
  
    | [in] | lhs | A first grid point. |  | [in] | rhs | A second grid point. |  
 
- Warning:
- There is no type promotion in Milena so the client has to make sure that both points are defined with the same type of coordinates.
- Precondition:
- Both lhsandrhshave to be defined on the same topology and with the same type of coordinates; otherwise this test does not compile.
- Postcondition:
- The result, dp, is such aslhs==rhs+dp.
- Returns:
- A delta point (temporary object).
- See also:
- mln::Gdpoint 
 
 
template<typename P , typename D > 
      
        
          | P & operator-= | ( | Gpoint< P > & | p, | 
        
          |  |  | const Gdpoint< D > & | dp |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Shift a point by the negate of a delta-point dp. 
- Parameters:
- 
  
    | [in,out] | p | The targeted point. |  | [in] | dp | A delta-point. |  
 
- Returns:
- A reference to the point ponce translated by -dp.
- Precondition:
- The type of dphas to be compatible with the type ofp.
 
 
template<typename P , typename D > 
      
 
Divise a point by a scalar s. 
- Parameters:
- 
  
    | [in,out] | p | The targeted point. |  | [in] | dp | A scalar. |  
 
- Returns:
- A reference to the point ponce divised bys.
 
 
template<typename P > 
      
        
          | std::ostream & operator<< | ( | std::ostream & | ostr, | 
        
          |  |  | const Gpoint< P > & | p |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Print a grid point p into the output stream ostr. 
- Parameters:
- 
  
    | [in,out] | ostr | An output stream. |  | [in] | p | A grid point. |  
 
- Returns:
- The modified output stream ostr.
 
 
template<typename L , typename R > 
      
        
          | bool operator== | ( | const Gpoint< L > & | lhs, | 
        
          |  |  | const Gpoint< R > & | rhs |  | 
        
          |  | ) |  |  |  [related] | 
      
 
Equality comparison between a couple of grid point lhs and rhs. 
- Parameters:
- 
  
    | [in] | lhs | A first grid point. |  | [in] | rhs | A second grid point. |  
 
- Precondition:
- Both lhsandrhshave to be defined on the same topology; otherwise this test does not compile.
- Returns:
- True if both grid points have the same coordinates, otherwise false.