SNAP Library 4.1, User Reference
2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Iterator class for TTable rows. More...
#include <table.h>
Public Member Functions | |
TRowIterator () | |
Default constructor. More... | |
TRowIterator (TInt RowIdx, const TTable *TablePtr) | |
Constructs iterator to row RowIds of TablePtr . More... | |
TRowIterator (const TRowIterator &RowI) | |
Copy constructor. More... | |
TRowIterator & | operator++ (int) |
Increments the iterator. More... | |
TRowIterator & | Next () |
Increments the iterator (For Python compatibility). More... | |
bool | operator< (const TRowIterator &RowI) const |
Checks if this iterator points to a row that is before the one pointed by RowI . More... | |
bool | operator== (const TRowIterator &RowI) const |
Checks if this iterator points to the same row pointed by RowI . More... | |
TInt | GetRowIdx () const |
Gets the id of the row pointed by this iterator. More... | |
TInt | GetIntAttr (TInt ColIdx) const |
Returns value of integer attribute specified by integer column index for current row. More... | |
TFlt | GetFltAttr (TInt ColIdx) const |
Returns value of floating point attribute specified by float column index for current row. More... | |
TStr | GetStrAttr (TInt ColIdx) const |
Returns value of string attribute specified by string column index for current row. More... | |
TInt | GetStrMapById (TInt ColIdx) const |
Returns integer mapping of a string attribute value specified by string column index for current row. More... | |
TInt | GetIntAttr (const TStr &Col) const |
Returns value of integer attribute specified by attribute name for current row. More... | |
TFlt | GetFltAttr (const TStr &Col) const |
Returns value of float attribute specified by attribute name for current row. More... | |
TStr | GetStrAttr (const TStr &Col) const |
Returns value of string attribute specified by attribute name for current row. More... | |
TInt | GetStrMapByName (const TStr &Col) const |
Returns integer mapping of string attribute specified by attribute name for current row. More... | |
TBool | CompareAtomicConst (TInt ColIdx, const TPrimitive &Val, TPredComp Cmp) |
Compares value in column ColIdx with given primitive Val . More... | |
TBool | CompareAtomicConstTStr (TInt ColIdx, const TStr &Val, TPredComp Cmp) |
Compares value in column ColIdx with given TStr Val . More... | |
Private Attributes | |
TInt | CurrRowIdx |
Physical row index of current row pointed by iterator. More... | |
const TTable * | Table |
Reference to table containing this row. More... | |
Iterator class for TTable rows.
An iterator class to iterate over all currently existing rows. Iteration over the rows should be done using only this iterator.
|
inline |
Default constructor.
Definition at line 335 of file table.h.
Constructs iterator to row RowIds
of TablePtr
.
Definition at line 337 of file table.h.
|
inline |
Copy constructor.
Definition at line 339 of file table.h.
TBool TRowIterator::CompareAtomicConst | ( | TInt | ColIdx, |
const TPrimitive & | Val, | ||
TPredComp | Cmp | ||
) |
Compares value in column ColIdx
with given primitive Val
.
Definition at line 190 of file table.cpp.
Compares value in column ColIdx
with given TStr Val
.
Definition at line 208 of file table.cpp.
Returns value of floating point attribute specified by float column index for current row.
Definition at line 159 of file table.cpp.
Returns value of float attribute specified by attribute name for current row.
Definition at line 172 of file table.cpp.
Returns value of integer attribute specified by integer column index for current row.
Definition at line 155 of file table.cpp.
Returns value of integer attribute specified by attribute name for current row.
Definition at line 167 of file table.cpp.
TInt TRowIterator::GetRowIdx | ( | ) | const |
Gets the id of the row pointed by this iterator.
Definition at line 151 of file table.cpp.
Returns value of string attribute specified by string column index for current row.
Definition at line 163 of file table.cpp.
Returns value of string attribute specified by attribute name for current row.
Definition at line 177 of file table.cpp.
Returns integer mapping of a string attribute value specified by string column index for current row.
Definition at line 186 of file table.cpp.
Returns integer mapping of string attribute specified by attribute name for current row.
Definition at line 181 of file table.cpp.
TRowIterator & TRowIterator::Next | ( | ) |
Increments the iterator (For Python compatibility).
Definition at line 135 of file table.cpp.
TRowIterator & TRowIterator::operator++ | ( | int | ) |
Increments the iterator.
Definition at line 131 of file table.cpp.
bool TRowIterator::operator< | ( | const TRowIterator & | RowI | ) | const |
Checks if this iterator points to a row that is before the one pointed by RowI
.
Definition at line 141 of file table.cpp.
bool TRowIterator::operator== | ( | const TRowIterator & | RowI | ) | const |
Checks if this iterator points to the same row pointed by RowI
.
Definition at line 147 of file table.cpp.
|
private |
|
private |