queso-0.53.0
Public Member Functions | Public Attributes | List of all members
ANNorthHalfSpace Class Reference

#include <ANNx.h>

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 132 of file ANNx.h.

Constructor & Destructor Documentation

ANNorthHalfSpace::ANNorthHalfSpace ( )
inline

Definition at line 138 of file ANNx.h.

References cd, cv, and sd.

139  { cd = 0; cv = 0; sd = 0; }
ANNcoord cv
Definition: ANNx.h:135
ANNorthHalfSpace::ANNorthHalfSpace ( int  cdd,
ANNcoord  cvv,
int  sdd 
)
inline

Definition at line 141 of file ANNx.h.

References cd, cv, and sd.

145  { cd = cdd; cv = cvv; sd = sdd; }
ANNcoord cv
Definition: ANNx.h:135

Member Function Documentation

ANNdist ANNorthHalfSpace::dist ( ANNpoint  q) const
inline

Definition at line 153 of file ANNx.h.

References ANN_POW, cd, and cv.

154  { return (ANNdist) ANN_POW(q[cd] - cv); }
ANNcoord cv
Definition: ANNx.h:135
double ANNdist
Definition: ANN.h:159
#define ANN_POW(v)
Definition: ANN.h:360
ANNbool ANNorthHalfSpace::in ( ANNpoint  q) const
inline

Definition at line 147 of file ANNx.h.

References cd, cv, and sd.

148  { return (ANNbool) ((q[cd] - cv)*sd >= 0); }
ANNbool
Definition: ANN.h:132
ANNcoord cv
Definition: ANNx.h:135
ANNbool ANNorthHalfSpace::out ( ANNpoint  q) const
inline

Definition at line 150 of file ANNx.h.

References cd, cv, and sd.

Referenced by project().

151  { return (ANNbool) ((q[cd] - cv)*sd < 0); }
ANNbool
Definition: ANN.h:132
ANNcoord cv
Definition: ANNx.h:135
void ANNorthHalfSpace::project ( ANNpoint q)
inline

Definition at line 162 of file ANNx.h.

References cd, cv, and out().

Referenced by annBnds2Box(), and recReadTree().

163  { if (out(q)) q[cd] = cv; }
ANNcoord cv
Definition: ANNx.h:135
ANNbool out(ANNpoint q) const
Definition: ANNx.h:150
void ANNorthHalfSpace::setLowerBound ( int  d,
ANNpoint  p 
)
inline

Definition at line 156 of file ANNx.h.

References cd, cv, and sd.

157  { cd = d; cv = p[d]; sd = +1; }
ANNcoord cv
Definition: ANNx.h:135
void ANNorthHalfSpace::setUpperBound ( int  d,
ANNpoint  p 
)
inline

Definition at line 159 of file ANNx.h.

References cd, cv, and sd.

160  { cd = d; cv = p[d]; sd = -1; }
ANNcoord cv
Definition: ANNx.h:135

Member Data Documentation

int ANNorthHalfSpace::cd
ANNcoord ANNorthHalfSpace::cv

Definition at line 135 of file ANNx.h.

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

int ANNorthHalfSpace::sd

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

Generated on Thu Jun 11 2015 13:52:33 for queso-0.53.0 by  doxygen 1.8.5