Public Member Functions | Public Attributes

ANNorthHalfSpace Class Reference

#include <ANNx.h>

List of all members.

Public Member Functions

 ANNorthHalfSpace ()
 ANNorthHalfSpace (int cdd, ANNcoord cvv, int sdd)
ANNbool in (ANNpoint q) const
ANNbool out (ANNpoint q) const
ANNdist dist (ANNpoint q) const
void setLowerBound (int d, ANNpoint p)
void setUpperBound (int d, ANNpoint p)
void project (ANNpoint &q)

Public Attributes

int cd
ANNcoord cv
int sd

Detailed Description

Definition at line 133 of file ANNx.h.


Constructor & Destructor Documentation

ANNorthHalfSpace::ANNorthHalfSpace (  ) [inline]

Definition at line 139 of file ANNx.h.

References cd, cv, and sd.

        {  cd = 0; cv = 0;  sd = 0;  }
ANNorthHalfSpace::ANNorthHalfSpace ( int  cdd,
ANNcoord  cvv,
int  sdd 
) [inline]

Definition at line 142 of file ANNx.h.

References cd, cv, and sd.

        {  cd = cdd;  cv = cvv;  sd = sdd;  }

Member Function Documentation

ANNdist ANNorthHalfSpace::dist ( ANNpoint  q ) const [inline]

Definition at line 154 of file ANNx.h.

References ANN_POW, cd, and cv.

        {  return  (ANNdist) ANN_POW(q[cd] - cv);  }
ANNbool ANNorthHalfSpace::in ( ANNpoint  q ) const [inline]

Definition at line 148 of file ANNx.h.

References cd, cv, and sd.

        {  return  (ANNbool) ((q[cd] - cv)*sd >= 0);  }
ANNbool ANNorthHalfSpace::out ( ANNpoint  q ) const [inline]

Definition at line 151 of file ANNx.h.

References cd, cv, and sd.

Referenced by project().

        {  return  (ANNbool) ((q[cd] - cv)*sd < 0);  }
void ANNorthHalfSpace::project ( ANNpoint q ) [inline]

Definition at line 163 of file ANNx.h.

References cd, cv, and out().

Referenced by annBnds2Box().

        {  if (out(q)) q[cd] = cv;  }
void ANNorthHalfSpace::setLowerBound ( int  d,
ANNpoint  p 
) [inline]

Definition at line 157 of file ANNx.h.

References cd, cv, and sd.

        {  cd = d;  cv = p[d];  sd = +1;  }
void ANNorthHalfSpace::setUpperBound ( int  d,
ANNpoint  p 
) [inline]

Definition at line 160 of file ANNx.h.

References cd, cv, and sd.

        {  cd = d;  cv = p[d];  sd = -1;  }

Member Data Documentation

Definition at line 136 of file ANNx.h.

Referenced by annBox2Bnds(), ANNorthHalfSpace(), dist(), in(), out(), project(), setLowerBound(), and setUpperBound().


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