KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
IntPair Struct Reference

A lightweight integer 2-tuple class. More...

#include <IntPair.h>

Public Member Functions

 IntPair (int _a, int _b)
 
 IntPair (const IntPair &t)
 
bool operator== (const IntPair &t) const
 
bool operator!= (const IntPair &t) const
 
bool operator< (const IntPair &t) const
 
void set (int _a, int _b)
 
int operator[] (int i) const
 
int & operator[] (int i)
 
int getIndex (int x) const
 
bool contains (int x) const
 
bool contains (int x, int &index) const
 
int count (int x) const
 
void operator+= (int ofs)
 
void operator-= (int ofs)
 

Public Attributes

union {
   int   data [2]
 
   struct {
      int   a
 
      int   b
 
   } 
 
}; 
 

Detailed Description

A lightweight integer 2-tuple class.


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