\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.9 - 2D Periodic Triangulations
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Periodic_2Offset_2 Concept Reference

Definition

The concept Periodic_2Offset_2 describes a two-/dimensional integer vector with some specialized access functions and operations.

Has Models:
CGAL::Periodic_2_offset_2
See Also
Periodic_2TriangulationTraits_2
Periodic_2DelaunayTriangulationTraits_2

Related Functions

(Note that these are not member functions.)

istream & operator>> (istream &is, Periodic_2Offset_2 &off)
 Inputs an offset from is.
 
ostream & operator<< (ostream &os, Periodic_2Offset_2 &off) const
 Outputs an offset from os.
 

Creation

 Periodic_2Offset_2 ()
 Default constructor.
 
 Periodic_2Offset_2 (int x, int y)
 Constructs the offset (x,y).
 

Operations

Periodic_2Offset_2 operator+ (const Periodic_2Offset_2 &o) const
 Return the vector sum of this and o.
 
Periodic_2Offset_2 operator- (const Periodic_2Offset_2 &o) const
 Return the vector difference of this and o.
 
Periodic_2Offset_2 operator- () const
 Return the negative vector of this.
 
void operator+= (const Periodic_2Offset_2 &o) const
 Add o to this using vector addition.
 
void operator-= (const Periodic_2Offset_2 &o) const
 Subtract o from this using vector subtraction.
 
bool operator== (const Periodic_2Offset_2 &o) const
 Return true if o and this represent the same vector.
 
bool operator!= (const Periodic_2Offset_2 &o) const
 Return true if o and this do not represent the same vector.
 
bool operator< (const Periodic_2Offset_2 &o) const
 Compare this and o lexicographically.
 

Access Functions

int operator[] (int i)
 Return the \( i\)-th entry of this. More...
 
int x () const
 Return the \( x\)-entry of this.
 
int y () const
 Return the \( y\)-entry of this.
 
bool is_null () const
 Returns true if this is equal to (0,0).
 
bool is_zero () const
 Returns true if this is equal to (0,0).
 

Member Function Documentation

int Periodic_2Offset_2::operator[] ( int  i)

Return the \( i\)-th entry of this.

Precondition
\( i\in\{0,1\}\)