libgenua
Basic Geometry, Numerical Algorithms and Interfaces
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Protected Member Functions | List of all members
Dop4d16< Type > Class Template Reference

Detailed Description

template<class Type>
class Dop4d16< Type >

16-plane discrete polytope in 4D.

A four-dimensional 32-DOP.

Todo:
Implementation note: pcoef() is not optimized away, which means that c[16] (stack) is actually filled and read again once, resulting in a lot of uneccessary mov instructions. Need to find an alternative implementation which guarantees inlining.

#include <kdop.h>

Inheritance diagram for Dop4d16< Type >:
[legend]
Collaboration diagram for Dop4d16< Type >:
[legend]

Public Member Functions

 Dop4d16 ()
 reset on construction
 
void enclose (const Dop4d16< Type > &b)
 enclose another DOP
 
void addVariance (const Type ctr[], const Type p[], Type var[]) const
 add variance measure of 4D point p to var
 
- Public Member Functions inherited from DopBase< Type, 16 >
 DopBase ()
 initialize DOP
 
 DopBase (const Type pmin[], const Type pmax[])
 initialize DOP
 
force_inline const FloatType * pointer () const
 pointer to first coefficient (stored serially)
 
force_inline FloatType * pointer ()
 pointer to first coefficient (stored serially)
 
force_inline Type minCoef (int k) const
 minimum coefficient for plane k
 
force_inline Type maxCoef (int k) const
 maximum coefficient for plane k
 
void setCoef (const Type fmin[], const Type fmax[])
 set coefficients explicitely
 
force_inline bool inside (const Type p[]) const
 test whether point p is inside or on box boundary
 
force_inline Type minCoefDistance (const Type c[])
 (under-) estimate the distance of c(p) from bounding volume
 
force_inline Type eclDistance (const Type p[], Type ds[]) const
 determine euclidean distance of point from box, return squared norm
 
force_inline Type eclDistance (const Type c[]) const
 determine euclidean distance of point from box, return squared norm
 
force_inline void adapt (uint k, Type c)
 adapt min and max of axis k to enclose c
 
force_inline void adapt (const Type c[])
 adapt min and max for all axes
 
int longestAxis () const
 determine index of longest axis
 
force_inline void reset ()
 make box undefined
 
force_inline void expand (Type dx)
 expand box by a fixed amount in each direction
 
force_inline void center (Type ctr[]) const
 center coordinates
 
force_inline Type sqsize () const
 compute a box size (sum of squares of plane distances)
 
force_inline void invalidate ()
 set all coefficients to huge value
 
force_inline bool intersects (const DopBase< Type, N > &b) const
 test for intersection with another DOP
 
force_inline void enclose (const DopBase< Type, N > &b)
 enclose another DOP
 
bool operator== (const DopBase< Type, N > &b)
 equality
 

Protected Member Functions

void pcoef (const Type p[], Type c[]) const
 compute 16 coefficients for a point
 

Additional Inherited Members

- Static Public Member Functions inherited from DopBase< Type, 16 >
static int naxes ()
 number of axes
 
static force_inline void fit (const Type c[], Type fmin[], Type fmax[])
 Helper method to be used/specialized by child classes. More...
 
- Protected Attributes inherited from DopBase< Type, 16 >
Type coef [2 *N]
 min/max coefficients for each plane
 

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