#include <AsciiVMatrix.h>
Inheritance diagram for PLearn::AsciiVMatrix:
Public Member Functions | |
AsciiVMatrix () | |
default constructor (for automatic deserialization) | |
AsciiVMatrix (const string &fname, bool readwrite=true) | |
AsciiVMatrix (const string &fname, int the_width, const TVec< string > &fieldnames=TVec< string >(), const string &the_comment="") | |
virtual void | appendRow (Vec v) |
Append a row at the end of the file. | |
virtual void | put (int i, int j, real value) |
These methods send an error message since, by choice, we accept only to append row at the end of the file. | |
virtual void | putSubRow (int i, int j, Vec v) |
virtual void | putRow (int i, Vec v) |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual | ~AsciiVMatrix () |
PLEARN_DECLARE_OBJECT (AsciiVMatrix) | |
Declares name and deepCopy methods. | |
Protected Member Functions | |
virtual void | getNewRow (int i, const Vec &v) const |
This is the only method requiring implementation. | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
string | filename |
fstream * | file |
vector< streampos > | pos_rows |
streampos | vmatlength_pos |
bool | readwritemode |
bool | newfile |
bool | rewrite_length |
int | length_max |
Private Types | |
typedef RowBufferedVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::RowBufferedVMatrix. Definition at line 51 of file AsciiVMatrix.h. Referenced by AsciiVMatrix(). |
|
default constructor (for automatic deserialization)
Definition at line 48 of file AsciiVMatrix.cc. |
|
Definition at line 53 of file AsciiVMatrix.cc. |
|
Definition at line 60 of file AsciiVMatrix.cc. References PLearn::endl(), file, filename, fname, inherited, PLearn::isfile(), k, PLearn::TVec< T >::length(), length_max, PLERROR, PLearn::space_to_underscore(), vmatlength_pos, and PLearn::VMatrix::width(). |
|
Definition at line 306 of file AsciiVMatrix.cc. References file. |
|
Append a row at the end of the file.
Reimplemented from PLearn::VMatrix. Definition at line 263 of file AsciiVMatrix.cc. References PLearn::endl(), file, PLearn::VMatrix::length(), PLearn::TVec< T >::length(), length_max, PLERROR, pos_rows, readwritemode, rewrite_length, vmatlength_pos, and PLearn::VMatrix::width(). |
|
Should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object. Reimplemented from PLearn::VMatrix. Definition at line 107 of file AsciiVMatrix.cc. References build_(). Referenced by AsciiVMatrix(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 113 of file AsciiVMatrix.cc. References PLearn::countNonBlankLinesOfFile(), file, filename, PLearn::getNextNonBlankLine(), PLearn::isfile(), length_max, PLearn::log(), newfile, PLERROR, PLWARNING, pos_rows, PLearn::pow(), PLearn::removeblanks(), PLearn::removenewline(), rewrite_length, PLearn::split(), PLearn::toint(), vmatlength_pos, and PLearn::ws(). Referenced by build(). |
|
Declares this class' options.
Reimplemented from PLearn::VMatrix. Definition at line 299 of file AsciiVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
This is the only method requiring implementation.
Implements PLearn::RowBufferedVMatrix. Definition at line 249 of file AsciiVMatrix.cc. References file, PLearn::TVec< T >::length(), PLearn::VMatrix::length(), PLERROR, pos_rows, PLearn::Vec, and PLearn::VMatrix::width(). |
|
Declares name and deepCopy methods.
|
|
These methods send an error message since, by choice, we accept only to append row at the end of the file.
Reimplemented from PLearn::VMatrix. Definition at line 292 of file AsciiVMatrix.cc. References PLERROR. |
|
Reimplemented from PLearn::VMatrix. Definition at line 296 of file AsciiVMatrix.cc. References PLERROR. |
|
It is suggested that this method be implemented in subclasses of writable matrices to speed up accesses (default version repeatedly calls put(i,j,value) which may have a significant overhead) Reimplemented from PLearn::VMatrix. Definition at line 294 of file AsciiVMatrix.cc. References PLERROR. |
|
Definition at line 55 of file AsciiVMatrix.h. Referenced by appendRow(), AsciiVMatrix(), build_(), getNewRow(), and ~AsciiVMatrix(). |
|
Definition at line 54 of file AsciiVMatrix.h. Referenced by AsciiVMatrix(), and build_(). |
|
Definition at line 61 of file AsciiVMatrix.h. Referenced by appendRow(), AsciiVMatrix(), and build_(). |
|
Definition at line 59 of file AsciiVMatrix.h. Referenced by build_(). |
|
Definition at line 56 of file AsciiVMatrix.h. Referenced by appendRow(), build_(), and getNewRow(). |
|
Definition at line 58 of file AsciiVMatrix.h. Referenced by appendRow(). |
|
Definition at line 60 of file AsciiVMatrix.h. Referenced by appendRow(), and build_(). |
|
Definition at line 57 of file AsciiVMatrix.h. Referenced by appendRow(), AsciiVMatrix(), and build_(). |