include/lshkit/matrix.h File Reference

Dataset management. A dataset is maintained as a matrix in memory. More...

#include <fstream>
#include <boost/dynamic_bitset.hpp>
#include <lshkit/matrix-io.h>

Go to the source code of this file.

Namespaces

namespace  lshkit

Classes

class  lshkit::Matrix< T >
 Matrix. More...
class  lshkit::Matrix< T >::Accessor
 An accessor class to be used with LSH index. More...

Typedefs

typedef Matrix< float > lshkit::FloatMatrix


Detailed Description

Dataset management. A dataset is maintained as a matrix in memory.

LSHKIT is a main memory indexing data structure and doesn't assume any particular file format. However, the standalone tools come with the LSHKIT package use the following simple binary file format.

The file contains N D-dimensional vectors of single precision floating point numbers.

In the beginning of the file are three 32-bit unsigned integers: ELEM-SIZE, SIZE, DIM. ELEM-SIZE is the size of the element, and currently the only valid value is 4, which is the size of float. SIZE is the number of vectors in the file and DIM is the dimension.

The rest of the file is SIZE vectors stored consecutively, and the total size is SIZE * DIM * 4 bytes.

Such binary files can be accessed using lshkit::Matrix<float>.


Get LSHKIT at SourceForge.net. Fast, secure and Free Open Source software downloads doxygen