PLearn 0.1
Public Member Functions | Public Attributes
PLearn::IntPair Class Reference

Example of class that can be used as key. More...

#include <Hash.h>

Collaboration diagram for PLearn::IntPair:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IntPair ()
 IntPair (int j0, int j1)
 IntPair (const IntPair &b)
 operator char * () const
int size () const
size_t byteLength () const
bool operator!= (const IntPair &b) const
bool operator== (const IntPair &b) const
intoperator[] (int i)

Public Attributes

int i0
int i1

Detailed Description

Example of class that can be used as key.

Definition at line 651 of file Hash.h.


Constructor & Destructor Documentation

PLearn::IntPair::IntPair ( ) [inline]

Definition at line 656 of file Hash.h.

References i0, and i1.

{ i0=i1=0; }
PLearn::IntPair::IntPair ( int  j0,
int  j1 
) [inline]

Definition at line 657 of file Hash.h.

: i0(j0), i1(j1) {}
PLearn::IntPair::IntPair ( const IntPair b) [inline]

Definition at line 658 of file Hash.h.

: i0(b.i0), i1(b.i1) { }

Member Function Documentation

size_t PLearn::IntPair::byteLength ( ) const [inline]

Definition at line 662 of file Hash.h.

{ return 2*sizeof(int); }
PLearn::IntPair::operator char * ( ) const [inline]

Definition at line 659 of file Hash.h.

References i0.

{ return (char*)(&i0); }
bool PLearn::IntPair::operator!= ( const IntPair b) const [inline]

Definition at line 663 of file Hash.h.

References i0, and i1.

{ return (i0!=b.i0 || i1!=b.i1); }
bool PLearn::IntPair::operator== ( const IntPair b) const [inline]

Definition at line 664 of file Hash.h.

References i0, and i1.

{ return (i0==b.i0 && i1==b.i1); }
int& PLearn::IntPair::operator[] ( int  i) [inline]

Definition at line 665 of file Hash.h.

References i0, and i1.

{ if (i==0) return i0; else return i1; }
int PLearn::IntPair::size ( ) const [inline]

Definition at line 660 of file Hash.h.

{ return 2; }

Member Data Documentation

Definition at line 653 of file Hash.h.

Referenced by IntPair(), operator char *(), operator!=(), operator==(), and operator[]().

Definition at line 654 of file Hash.h.

Referenced by IntPair(), operator!=(), operator==(), and operator[]().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines