dlr::numeric::Index2D Class Reference

The Index2D class represents a 2 dimensional index in (row, column) format, such as (0, 1), (23, 7), or (-4, 2). More...

#include <index2D.h>

List of all members.

Public Member Functions

 Index2D ()
 The default constructor initializes to (0, 0).
 Index2D (int row, int column)
 This constructor explicitly sets the indices.
 Index2D (const Index2D &other)
 The copy constructor deep copies its argument.
 ~Index2D ()
 The destructor destroys the Index2D instance.
void setValue (int row, int column)
 This member function explicitly sets the sets the indices.
int getColumn () const
 This member function returns the first component of the Index2D by value.
int getRow () const
 This member function returns the second component of the Index2D by value.
Index2Doperator= (const Index2D &other)
 The assignment operator deep copies its argument.
Index2Doperator *= (int scalar)
 This operator multiplies each component of the Index2D instance by a scalar.
Index2Doperator/= (int scalar)
 This operator divides each component of the Index2D instance by a scalar.
Index2Doperator+= (const Index2D &other)
 This operator adds a scalar to each component of the Index2D instance.
Index2Doperator-= (const Index2D &other)
 This operator subtracts a scalar from each component of the Index2D instance.
Index2D operator- ()
 This operator returns an Index2D equal to *this, but with each element negated.


Detailed Description

The Index2D class represents a 2 dimensional index in (row, column) format, such as (0, 1), (23, 7), or (-4, 2).

Definition at line 29 of file index2D.h.


Constructor & Destructor Documentation

dlr::numeric::Index2D::Index2D (  )  [inline]

The default constructor initializes to (0, 0).

Definition at line 35 of file index2D.h.

Referenced by operator-().

dlr::numeric::Index2D::Index2D ( int  row,
int  column 
) [inline]

This constructor explicitly sets the indices.

Parameters:
uIndex The first component of the Index2D.
uIndex The second component of the Index2D.

Definition at line 46 of file index2D.h.

dlr::numeric::Index2D::Index2D ( const Index2D other  )  [inline]

The copy constructor deep copies its argument.

Parameters:
other This argument is the Index2D instance to be copied.

Definition at line 56 of file index2D.h.

dlr::numeric::Index2D::~Index2D (  )  [inline]

The destructor destroys the Index2D instance.

Definition at line 63 of file index2D.h.


Member Function Documentation

void dlr::numeric::Index2D::setValue ( int  row,
int  column 
) [inline]

This member function explicitly sets the sets the indices.

Parameters:
row The first component of the Index2D.
column The second component of the Index2D.

Definition at line 73 of file index2D.h.

Referenced by operator=(), and dlr::numeric::operator>>().

int dlr::numeric::Index2D::getColumn (  )  const [inline]

This member function returns the first component of the Index2D by value.

Returns:
The return value is the first (U) coordinate.

Definition at line 84 of file index2D.h.

Referenced by dlr::numeric::correlate2D(), dlr::numeric::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), and dlr::numeric::sum().

int dlr::numeric::Index2D::getRow (  )  const [inline]

This member function returns the second component of the Index2D by value.

Returns:
The return value is the second (V) coordinate.

Definition at line 93 of file index2D.h.

Referenced by dlr::numeric::correlate2D(), dlr::numeric::operator *(), dlr::numeric::operator+(), dlr::numeric::operator-(), dlr::numeric::operator/(), dlr::numeric::operator<<(), dlr::numeric::operator==(), and dlr::numeric::sum().

Index2D& dlr::numeric::Index2D::operator= ( const Index2D other  )  [inline]

The assignment operator deep copies its argument.

Parameters:
other This argument is the Index2D instance to be copied.
Returns:
The return value is a reference to *this after the operation has been performed.

Definition at line 105 of file index2D.h.

References m_column, m_row, and setValue().

Index2D& dlr::numeric::Index2D::operator *= ( int  scalar  )  [inline]

This operator multiplies each component of the Index2D instance by a scalar.

Parameters:
scalar This argument is the scalar by which to multiply.
Returns:
The return value is a reference to *this after the operation has been performed.

Definition at line 120 of file index2D.h.

Index2D& dlr::numeric::Index2D::operator/= ( int  scalar  )  [inline]

This operator divides each component of the Index2D instance by a scalar.

Parameters:
scalar This argument is the scalar by which to divide.
Returns:
The return value is a reference to *this after the operation has been performed.

Definition at line 134 of file index2D.h.

References DLR_THROW.

Index2D& dlr::numeric::Index2D::operator+= ( const Index2D other  )  [inline]

This operator adds a scalar to each component of the Index2D instance.

Parameters:
scalar This argument is the scalar to be added.
Returns:
The return value is a reference to *this after the operation has been performed.

Definition at line 152 of file index2D.h.

References m_column, and m_row.

Index2D& dlr::numeric::Index2D::operator-= ( const Index2D other  )  [inline]

This operator subtracts a scalar from each component of the Index2D instance.

Parameters:
scalar This argument is the scalar to be subtracted.
Returns:
The return value is a reference to *this after the operation has been performed.

Definition at line 166 of file index2D.h.

References m_column, and m_row.

Index2D dlr::numeric::Index2D::operator- (  )  [inline]

This operator returns an Index2D equal to *this, but with each element negated.

Returns:
The return value is a negated copy of *this.

Definition at line 177 of file index2D.h.

References Index2D().


The documentation for this class was generated from the following file:
Generated on Mon Jul 9 20:34:21 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2