Ngram Class Reference

`#include <ngram.h>`

Collaboration diagram for Ngram:

## Public Member Functions

| Ngram (const int N)
| ~Ngram ()
int | getN () const
std::string | getNgram (const int n) const
void | setNgram (const int n, const std::string str)
bool | operator< (const Ngram &) const
Ngram & | operator= (const Ngram &)
std::string | toString () const

## Private Attributes

int | N
std::string * | ngrams

## Friends

std::ostream & | operator<< (std::ostream &, const Ngram &)

## Detailed Description

Definition at line 32 of file ngram.h.

## Constructor & Destructor Documentation

## Ngram()

Ngram::Ngram | ( | const int | N | ) |

Definition at line 27 of file ngram.cpp.

References N, and ngrams.

## ~Ngram()

Ngram::~Ngram | ( |  | ) |

Definition at line 34 of file ngram.cpp.

References ngrams.

## Member Function Documentation

## getN()

int Ngram::getN | ( |  | ) | const

Definition at line 85 of file ngram.cpp.

References N.

## getNgram()

std::string Ngram::getNgram | ( | const int | n | ) | const

Definition at line 73 of file ngram.cpp.

References N, and ngrams.

## operator<()

bool Ngram::operator< | ( | const Ngram & | other | ) | const

Definition at line 51 of file ngram.cpp.

References N, and ngrams.

## operator=()

Ngram & Ngram::operator= | ( | const Ngram & | other | ) |

Definition at line 39 of file ngram.cpp.

References N, and ngrams.

## setNgram()

void Ngram::setNgram | ( | const int | n,
|  | const std::string | str
| ) |  |

Definition at line 79 of file ngram.cpp.

References N, and ngrams.

## toString()

std::string Ngram::toString | ( |  | ) | const

Definition at line 64 of file ngram.cpp.

References N, and ngrams.

Referenced by operator<<().

Here is the caller graph for this function:

## Friends And Related Function Documentation

## operator<<

std::ostream& operator<< | ( | std::ostream & | output,
|  | const Ngram & | b
| ) |  |

friend

Definition at line 90 of file ngram.cpp.

## Member Data Documentation

## N

int Ngram::N

private

Definition at line 68 of file ngram.h.

Referenced by getN(), getNgram(), Ngram(), operator<(), operator=(), setNgram(), and toString().

## ngrams

std::string* Ngram::ngrams

private

Definition at line 69 of file ngram.h.

Referenced by getNgram(), Ngram(), operator<(), operator=(), setNgram(), toString(), and ~Ngram().

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

- /build/presage-hvZ4Ld/presage-0.9.1/src/tools/ngram.h
- /build/presage-hvZ4Ld/presage-0.9.1/src/tools/ngram.cpp