Public Member Functions | Static Public Member Functions | Public Attributes

RowCol Class Reference

Object with row and col. RowCol has most functions in common with BinID, so template-based functions can be based on both classes. More...

List of all members.

Public Member Functions

 RowCol (int r, int c)
 RowCol (const RowCol &)
 RowCol (const BinID &)
 RowCol (const int64_t &)
 RowCol ()
bool operator== (const RowCol &) const
bool operator!= (const RowCol &) const
RowCol operator+ (const RowCol &) const
RowCol operator- (const RowCol &) const
RowCol operator+ () const
RowCol operator- () const
RowCol operator* (const RowCol &) const
RowCol operator* (int) const
RowCol operator/ (const RowCol &) const
RowCol operator/ (int) const
const RowColoperator+= (const RowCol &)
const RowColoperator-= (const RowCol &)
const RowColoperator*= (const RowCol &)
const RowColoperator*= (int)
const RowColoperator/= (const RowCol &)
int & operator[] (int idx)
int operator[] (int idx) const
void fill (char *) const
bool use (const char *)
int64_t toInt64 () const
void fromInt64 (int64_t)
int toInt32 () const
void fromInt32 (int)
int sqDistTo (const RowCol &) const
bool isNeighborTo (const RowCol &, const RowCol &, bool eightconnectivity=true) const
RowCol getDirection () const
float angleTo (const RowCol &) const
float clockwiseAngleTo (const RowCol &rc) const
float counterClockwiseAngleTo (const RowCol &) const
int64_t getSerialized () const
 Legacy. Use toInt64 instead.
void setSerialized (int64_t)
 Legacy. Use fromInt64 instead.

Static Public Member Functions

static const TypeSet< RowCol > & clockWiseSequence ()

Public Attributes

int row
int col

Detailed Description

Object with row and col. RowCol has most functions in common with BinID, so template-based functions can be based on both classes.


Constructor & Destructor Documentation

RowCol::RowCol ( int  r,
int  c 
) [inline]
RowCol::RowCol ( const RowCol rc  )  [inline]
RowCol::RowCol ( const BinID  ) 
RowCol::RowCol ( const int64_t &  ser  )  [inline]
RowCol::RowCol (  )  [inline]

Member Function Documentation

float RowCol::angleTo ( const RowCol  )  const
Returns:
the smallest angle between the vector going from 0,0 to the object and the vector going from 0,0 to rc.
float RowCol::clockwiseAngleTo ( const RowCol rc  )  const
Returns:
the angle between the vector going from 0,0 to the object and the vector going from 0,0 to rc in the clockwise direction.
static const TypeSet<RowCol>& RowCol::clockWiseSequence (  )  [static]
float RowCol::counterClockwiseAngleTo ( const RowCol  )  const
Returns:
the angle between the vector going from 0,0 to the object and the vector going from 0,0 to rc in the counterclockwise direction.
void RowCol::fill ( char *   )  const
void RowCol::fromInt32 ( int  ll  )  [inline]
void RowCol::fromInt64 ( int64_t  serialized  )  [inline]
RowCol RowCol::getDirection (  )  const
Returns:
a rowcol where row/col are either -1, 0 or 1 where depending on if row/col of the object is negative, zero or positive.
int64_t RowCol::getSerialized (  )  const

Legacy. Use toInt64 instead.

bool RowCol::isNeighborTo ( const RowCol ,
const RowCol ,
bool  eightconnectivity = true 
) const
bool RowCol::operator!= ( const RowCol rc  )  const [inline]
RowCol RowCol::operator* ( int  factor  )  const [inline]
RowCol RowCol::operator* ( const RowCol rc  )  const [inline]
const RowCol & RowCol::operator*= ( const RowCol rc  )  [inline]
const RowCol & RowCol::operator*= ( int  factor  )  [inline]
RowCol RowCol::operator+ (  )  const [inline]
RowCol RowCol::operator+ ( const RowCol rc  )  const [inline]
const RowCol & RowCol::operator+= ( const RowCol rc  )  [inline]
RowCol RowCol::operator- ( const RowCol rc  )  const [inline]
RowCol RowCol::operator- (  )  const [inline]
const RowCol & RowCol::operator-= ( const RowCol rc  )  [inline]
RowCol RowCol::operator/ ( const RowCol rc  )  const [inline]
RowCol RowCol::operator/ ( int  denominator  )  const [inline]
const RowCol & RowCol::operator/= ( const RowCol rc  )  [inline]
bool RowCol::operator== ( const RowCol rc  )  const [inline]
int & RowCol::operator[] ( int  idx  )  [inline]
int RowCol::operator[] ( int  idx  )  const [inline]
void RowCol::setSerialized ( int64_t   ) 

Legacy. Use fromInt64 instead.

int RowCol::sqDistTo ( const RowCol rc  )  const [inline]
int RowCol::toInt32 (  )  const [inline]
int64_t RowCol::toInt64 (  )  const [inline]
bool RowCol::use ( const char *   ) 

Member Data Documentation