#include <SimpleTransactionReader.hpp>
Inheritance diagram for SimpleTransactionReader:
Public Types | ||||
typedef FileReprBase::params_t | params_t | |||
enum | Mode { READ, WRITE } | |||
Public Member Functions | ||||
SimpleTransactionReader (const params_t *par) | ||||
template<class BIS> | ||||
counter_t | nextTransactionBIS (BIS &transaction) | |||
template<class UAC> | ||||
counter_t | nextTransactionUAC (UAC &transaction) | |||
TransactionReader (const params_t *par) throw (std::ios_base::failure) | ||||
| ||||
void | setLargestItem (item_t largest_item) | |||
It is possible to associate the largerst item in the transaction file with the transaction reader. | ||||
item_t | getLargestItem () const | |||
It returns the largest item. | ||||
void | rewind () | |||
void | flush () | |||
std::streamsize | readFromFile (char *buffer, std::streamsize buffer_size) | |||
void | writeToFile (const char *str, std::streamsize n) | |||
Protected Attributes | ||||
item_t | largest_item | |||
std::ifstream | input_stream | |||
stream to read | ||||
std::ofstream | output_stream | |||
steam to write | ||||
char * | file_buffer | |||
the low-level buffer | ||||
std::streamsize | file_buffer_size | |||
the size of the lowest level buffer | ||||
Mode | mode | |||
operating mode | ||||
Private Member Functions | ||||
bool | getNextItem (int &item, char &c) | |||
This inline method is responsible to read in one item. |
The main purpose of this class is to provide a basic class for the tests. If the size of the input is large, and the performance is important, you should use a BufferedTransactionReader like LBufferedTransactionReader or BufferedTransactionReader For more information about the performance of the different input classes test_results.html.
Definition at line 19 of file SimpleTransactionReader.hpp.
|
Reimplemented in SimpleAssocRuleWriter, SimpleOutput, DecoderBase< BufferedNormalOutput< StreamRepr > >, SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >, BufferedNormalOutput< StreamRepr >, and OutputBase< StreamRepr >. Definition at line 21 of file StreamRepr.hpp. |
|
Definition at line 20 of file FileReprBase.hpp. |
|
Definition at line 23 of file SimpleTransactionReader.hpp. |
|
Reimplemented from FileReprBase. Definition at line 63 of file StreamRepr.hpp. References StreamRepr::output_stream. |
|
It returns the largest item.
Definition at line 123 of file TransactionReader.hpp. References TransactionReader< FR >::largest_item. |
|
This inline method is responsible to read in one item.
Definition at line 75 of file SimpleTransactionReader.hpp. References StreamRepr::input_stream. Referenced by nextTransactionBIS(), and nextTransactionUAC(). |
|
Reimplemented from TransactionReader< StreamRepr >. Definition at line 41 of file SimpleTransactionReader.hpp. References getNextItem(), and StreamRepr::input_stream. |
|
Reimplemented from TransactionReader< StreamRepr >. Definition at line 60 of file SimpleTransactionReader.hpp. References getNextItem(), and StreamRepr::input_stream. |
|
Reimplemented from FileReprBase. Definition at line 68 of file StreamRepr.hpp. References StreamRepr::input_stream. |
|
Reimplemented from FileReprBase. Definition at line 58 of file StreamRepr.hpp. References StreamRepr::input_stream. |
|
It is possible to associate the largerst item in the transaction file with the transaction reader. This method is just for the sake of the convenience (to avoid many parameter passing) Definition at line 113 of file TransactionReader.hpp. |
|
Definition at line 38 of file TransactionReader.hpp. |
|
Reimplemented from FileReprBase. Definition at line 72 of file StreamRepr.hpp. References StreamRepr::output_stream. |
|
the low-level buffer
Definition at line 89 of file FileReprBase.hpp. Referenced by FDRepr::FDRepr(), FILERepr::FILERepr(), FileReprBase::FileReprBase(), FDRepr::flush(), StreamRepr::StreamRepr(), FDRepr::writeToFile(), and FileReprBase::~FileReprBase(). |
|
the size of the lowest level buffer
Definition at line 91 of file FileReprBase.hpp. Referenced by FDRepr::FDRepr(), and FDRepr::flush(). |
|
stream to read
Definition at line 78 of file StreamRepr.hpp. Referenced by getNextItem(), nextTransactionBIS(), nextTransactionUAC(), StreamRepr::readFromFile(), StreamRepr::rewind(), StreamRepr::StreamRepr(), and StreamRepr::~StreamRepr(). |
|
Definition at line 127 of file TransactionReader.hpp. |
|
operating mode
Definition at line 93 of file FileReprBase.hpp. Referenced by SimpleOutputTester::doTest(), FileReprBase::FileReprBase(), and FDRepr::~FDRepr(). |
|
steam to write
Definition at line 80 of file StreamRepr.hpp. Referenced by StreamRepr::flush(), StreamRepr::StreamRepr(), SimpleAssocRuleWriter::writeAssocRule(), SimpleOutput::writeItemsetAndCounter(), StreamRepr::writeToFile(), and StreamRepr::~StreamRepr(). |