fasttext::Matrix Class Reference

`#include <matrix.h>`

## Public Member Functions

| Matrix ()
| Matrix (int64_t, int64_t)
| Matrix (const Matrix &)
Matrix & | operator= (const Matrix &)
| ~Matrix ()
const real & | at (int64_t i, int64_t j) const
real & | at (int64_t i, int64_t j)
void | zero ()
void | uniform (real)
real | dotRow (const Vector &, int64_t) const
void | addRow (const Vector &, int64_t, real)
void | multiplyRow (const Vector &nums, int64_t ib=0, int64_t ie=-1)
void | divideRow (const Vector &denoms, int64_t ib=0, int64_t ie=-1)
real | l2NormRow (int64_t i) const
void | l2NormRow (Vector &norms) const
void | save (std::ostream &)
void | load (std::istream &)

## Public Attributes

real * | data_
int64_t | m_
int64_t | n_

## Constructor & Destructor Documentation

## Matrix() [1/3]

fasttext::Matrix::Matrix | ( |  | ) |

## Matrix() [2/3]

fasttext::Matrix::Matrix | ( | int64_t | m,
|  | int64_t | n
| ) |  |

## Matrix() [3/3]

fasttext::Matrix::Matrix | ( | const Matrix & | other | ) |

## ~Matrix()

fasttext::Matrix::~Matrix | ( |  | ) |

## Member Function Documentation

## addRow()

void fasttext::Matrix::addRow | ( | const Vector & | vec,
|  | int64_t | i,
|  | real | a
| ) |  |

## at() [1/2]

const real& fasttext::Matrix::at | ( | int64_t | i,
|  | int64_t | j
| ) |  | const

inline

## at() [2/2]

real& fasttext::Matrix::at | ( | int64_t | i,
|  | int64_t | j
| ) |  |

inline

## divideRow()

void fasttext::Matrix::divideRow | ( | const Vector & | denoms,
|  | int64_t | ib = `0`,
|  | int64_t | ie = `-1`
| ) |  |

## dotRow()

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

## l2NormRow() [1/2]

real fasttext::Matrix::l2NormRow | ( | int64_t | i | ) | const

## l2NormRow() [2/2]

void fasttext::Matrix::l2NormRow | ( | Vector & | norms | ) | const

## load()

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

## multiplyRow()

void fasttext::Matrix::multiplyRow | ( | const Vector & | nums,
|  | int64_t | ib = `0`,
|  | int64_t | ie = `-1`
| ) |  |

## operator=()

Matrix & fasttext::Matrix::operator= | ( | const Matrix & | other | ) |

## save()

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

## uniform()

void fasttext::Matrix::uniform | ( | real | a | ) |

## zero()

void fasttext::Matrix::zero | ( |  | ) |

## Member Data Documentation

## data_

real* fasttext::Matrix::data_

## m_

int64_t fasttext::Matrix::m_

## n_

int64_t fasttext::Matrix::n_

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

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