queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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 cd, and cv.

154  { return (ANNdist) ANN_POW(q[cd] - cv); }
double ANNdist
Definition: ANN.h:159
ANNcoord cv
Definition: ANNx.h:135
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); }
ANNcoord cv
Definition: ANNx.h:135
ANNbool
Definition: ANN.h:132
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); }
ANNcoord cv
Definition: ANNx.h:135
ANNbool
Definition: ANN.h:132
void ANNorthHalfSpace::project ( ANNpoint q)
inline

Definition at line 162 of file ANNx.h.

References cd, cv, and out().

Referenced by annBnds2Box().

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

Definition at line 134 of file ANNx.h.

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

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

Definition at line 136 of file ANNx.h.

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


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

Generated on Tue Jun 5 2018 19:48:57 for queso-0.57.1 by  doxygen 1.8.5