CommonWords class.
More...
#include <common_words.h>
CommonWords class.
Definition of a class to find all the common words across multiple files
- Author
- Zach Widder
- Date
- October 2014
| CommonWords::CommonWords |
( |
const std::vector< std::string > & |
filenames | ) |
|
Constructs a CommonWords object from a vector of filenames.
- Parameters
-
| filenames | The list of filenames to read. |
| vector< string > CommonWords::get_common_words |
( |
unsigned int |
n | ) |
const |
- Parameters
-
| n | The number of times to word has to appear. |
- Returns
- A vector of strings. The vector contains all words that appear in each file >= n times.
| void CommonWords::init_file_word_maps |
( |
const vector< string > & |
filenames | ) |
|
|
private |
Initializes file_word_maps.
- Parameters
-
| filenames | The vector of names of the files that will be used |
| vector< string > CommonWords::file_to_vector |
( |
const string & |
filename | ) |
const |
|
private |
Takes a filename and transforms it to a vector of all words in that file.
- Parameters
-
| filename | The name of the file that will fill the vector |
The documentation for this class was generated from the following files: