A.I.M.S algorithms


aims::knn::Database Class Reference

#include <aims/math/knn.h>

Inheritance diagram for aims::knn::Database:
Collaboration diagram for aims::knn::Database:

Classes

class  DatabaseCompare
 
class  iterator
 
class  Vector
 

Public Types

typedef double * value_type
 
typedef double ** pointer
 
typedef double *& reference
 

Public Member Functions

 Database ()
 
 Database (double *data, unsigned int size, unsigned int dim)
 
virtual ~Database ()
 
void init (double *data, unsigned int size, unsigned int dim)
 
int search (const std::vector< double > &v, unsigned int dim) const
 
int search_with_hole (const std::vector< double > &v, unsigned int dim) const
 
iterator begin (void)
 
iterator end (void)
 
unsigned int size (void) const
 
unsigned int dim (void) const
 
double operator() (unsigned int x, unsigned int y) const
 
double * operator[] (unsigned int ind)
 
const double * operator[] (unsigned int ind) const
 
double variance_along_dim (unsigned int dim) const
 
void sort (unsigned int dim)
 
const std::vector< bool > & holes () const
 
void setHole (unsigned int ind, bool status)
 
void removeHoles (void)
 

Protected Attributes

double * _data
 
unsigned int _size
 
unsigned int _dim
 
std::vector< bool > _holes
 

Detailed Description

Definition at line 165 of file knn.h.

Member Typedef Documentation

typedef double** aims::knn::Database::pointer

Definition at line 169 of file knn.h.

Definition at line 170 of file knn.h.

Definition at line 168 of file knn.h.

Constructor & Destructor Documentation

aims::knn::Database::Database ( )
aims::knn::Database::Database ( double *  data,
unsigned int  size,
unsigned int  dim 
)
virtual aims::knn::Database::~Database ( )
inlinevirtual

Definition at line 175 of file knn.h.

Member Function Documentation

iterator aims::knn::Database::begin ( void  )
inline

Definition at line 381 of file knn.h.

unsigned int aims::knn::Database::dim ( void  ) const
inline

Definition at line 396 of file knn.h.

References _dim.

Referenced by aims::knn::Database::Vector::init(), and aims::knn::Database::Vector::operator()().

iterator aims::knn::Database::end ( void  )
inline

Definition at line 386 of file knn.h.

References _size.

const std::vector<bool>& aims::knn::Database::holes ( ) const
inline

Definition at line 420 of file knn.h.

References _holes.

void aims::knn::Database::init ( double *  data,
unsigned int  size,
unsigned int  dim 
)
double aims::knn::Database::operator() ( unsigned int  x,
unsigned int  y 
) const
inline

Definition at line 401 of file knn.h.

References _data, and _dim.

double* aims::knn::Database::operator[] ( unsigned int  ind)
inline

Definition at line 406 of file knn.h.

References _data, and _dim.

const double* aims::knn::Database::operator[] ( unsigned int  ind) const
inline

Definition at line 411 of file knn.h.

References _data, and _dim.

void aims::knn::Database::removeHoles ( void  )
inline

Definition at line 430 of file knn.h.

References _holes, and _size.

int aims::knn::Database::search ( const std::vector< double > &  v,
unsigned int  dim 
) const
int aims::knn::Database::search_with_hole ( const std::vector< double > &  v,
unsigned int  dim 
) const
void aims::knn::Database::setHole ( unsigned int  ind,
bool  status 
)
inline

Definition at line 425 of file knn.h.

References _holes.

unsigned int aims::knn::Database::size ( void  ) const
inline

Definition at line 391 of file knn.h.

References _size.

Referenced by aims::knn::Database::iterator::operator++().

void aims::knn::Database::sort ( unsigned int  dim)
double aims::knn::Database::variance_along_dim ( unsigned int  dim) const

Member Data Documentation

double* aims::knn::Database::_data
protected

Definition at line 436 of file knn.h.

Referenced by operator()(), and operator[]().

unsigned int aims::knn::Database::_dim
protected

Definition at line 438 of file knn.h.

Referenced by dim(), operator()(), and operator[]().

std::vector<bool> aims::knn::Database::_holes
protected

Definition at line 439 of file knn.h.

Referenced by holes(), removeHoles(), and setHole().

unsigned int aims::knn::Database::_size
protected

Definition at line 437 of file knn.h.

Referenced by end(), removeHoles(), and size().


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