fasttext::QMatrix Class Reference

`#include <qmatrix.h>`

## Public Member Functions

| QMatrix ()
| QMatrix (const Matrix &, int32_t, bool)
| ~QMatrix ()
int64_t | getM () const
int64_t | getN () const
void | quantizeNorm (const Vector &)
void | quantize (const Matrix &)
void | addToVector (Vector &x, int32_t t) const
real | dotRow (const Vector &, int64_t) const
void | save (std::ostream &)
void | load (std::istream &)

## Private Attributes

std::unique_ptr< ProductQuantizer > | pq_
std::unique_ptr< ProductQuantizer > | npq_
uint8_t * | codes_
uint8_t * | norm_codes_
bool | qnorm_
int64_t | m_
int64_t | n_
int32_t | codesize_

## Constructor & Destructor Documentation

## QMatrix() [1/2]

fasttext::QMatrix::QMatrix | ( |  | ) |

## QMatrix() [2/2]

fasttext::QMatrix::QMatrix | ( | const Matrix & | mat,
|  | int32_t | dsub,
|  | bool | qnorm
| ) |  |

## ~QMatrix()

fasttext::QMatrix::~QMatrix | ( |  | ) |

## Member Function Documentation

## addToVector()

void fasttext::QMatrix::addToVector | ( | Vector & | x,
|  | int32_t | t
| ) |  | const

## dotRow()

real fasttext::QMatrix::dotRow | ( | const Vector & | vec,
|  | int64_t | i
| ) |  | const

## getM()

int64_t fasttext::QMatrix::getM | ( |  | ) | const

## getN()

int64_t fasttext::QMatrix::getN | ( |  | ) | const

## load()

void fasttext::QMatrix::load | ( | std::istream & | in | ) |

## quantize()

void fasttext::QMatrix::quantize | ( | const Matrix & | matrix | ) |

## quantizeNorm()

void fasttext::QMatrix::quantizeNorm | ( | const Vector & | norms | ) |

## save()

void fasttext::QMatrix::save | ( | std::ostream & | out | ) |

## Member Data Documentation

## codes_

uint8_t* fasttext::QMatrix::codes_

private

## codesize_

int32_t fasttext::QMatrix::codesize_

private

## m_

int64_t fasttext::QMatrix::m_

private

## n_

int64_t fasttext::QMatrix::n_

private

## norm_codes_

uint8_t* fasttext::QMatrix::norm_codes_

private

## npq_

std::unique_ptr<ProductQuantizer> fasttext::QMatrix::npq_

private

## pq_

std::unique_ptr<ProductQuantizer> fasttext::QMatrix::pq_

private

## qnorm_

bool fasttext::QMatrix::qnorm_

private

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

- /data/users/cpuhrsch/fbsource/fbcode/deeplearning/fastText/src/qmatrix.h
- /data/users/cpuhrsch/fbsource/fbcode/deeplearning/fastText/src/qmatrix.cc