SNAP Library 6.0, User Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
table.h File Reference

Go to the source code of this file.

Classes

class  TAtomicPredicate
 Atomic predicate - encapsulates comparison operations. More...
 
class  TPredicateNode
 Predicate node - represents a binary predicate operation on two predicate nodes. More...
 
class  TPredicate
 Predicate - encapsulates comparison operations. More...
 
class  TTableContext
 Execution context. More...
 
class  TPrimitive
 Primitive class: Wrapper around primitive data types. More...
 
class  TTableRow
 Table Row (Record) More...
 
class  GroupStmt
 A class representing a cached grouping statement identifier. More...
 
class  TRowIterator
 Iterator class for TTable rows. More...
 
class  TRowIteratorWithRemove
 Iterator class for TTable rows, that allows logical row removal while iterating. More...
 
class  TTableIterator
 Iterator over a vector of tables. More...
 
class  TTable
 Table class: Relational table with columnar data storage. More...
 
class  TTable::TLoadVecInit
 

Namespaces

 TSnap
 Main namespace for all the Snap global entities.
 

Typedefs

typedef TPt< TTablePTable
 
typedef TPair< TIntV, TFltVTGroupKey
 Represents grouping key with IntV for integer and string attributes and FltV for float attributes. More...
 
typedef TVec< TPair< TStr, TAttrType > > Schema
 A table schema is a vector of pairs <attribute name, attribute type>. More...
 
typedef TPair< TStr, TAttrTypeTStrTypPr
 

Enumerations

enum  TPredOp { NOT, AND, OR, NOP }
 Boolean operators for selection predicates. More...
 
enum  TPredComp {
  LT = 0, LTE, EQ, NEQ,
  GTE, GT, SUBSTR, SUPERSTR
}
 Comparison operators for selection predicates. More...
 
enum  TSimType { L1Norm, L2Norm, Jaccard, Haversine }
 Distance metrics for similarity joins. More...
 
enum  TAttrAggr {
  aaMin, aaMax, aaFirst, aaLast,
  aaMean, aaMedian, aaSum, aaCount
}
 Possible policies for aggregating node attributes. More...
 
enum  TArithOp {
  aoAdd, aoSub, aoMul, aoDiv,
  aoMod, aoMin, aoMax
}
 Possible column-wise arithmetic operations. More...
 

Functions

template<class PGraph >
PGraph TSnap::ToGraph (PTable Table, const TStr &SrcCol, const TStr &DstCol, TAttrAggr AggrPolicy)
 Sequentially converts the table into a graph with links from nodes in SrcCol to those in DstCol. More...
 
template<class PGraph >
PGraph TSnap::ToNetwork (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &SrcAttrV, TStrV &DstAttrV, TStrV &EdgeAttrV, TAttrAggr AggrPolicy)
 Converts the Table into a graph with edges from SrcCol to DstCol, and attribute vector defined by the arguments. More...
 
template<class PGraph >
PGraph TSnap::ToNetwork (PTable Table, const TStr &SrcCol, const TStr &DstCol, TAttrAggr AggrPolicy)
 Calls ToNetwork with an empty attribute vector. Convenience wrapper. More...
 
template<class PGraph >
PGraph TSnap::ToNetwork (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &EdgeAttrV, TAttrAggr AggrPolicy)
 Converts table to a network sequentially. Use if network has only edge attributes. More...
 
template<class PGraph >
PGraph TSnap::ToNetwork (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &EdgeAttrV, PTable NodeTable, const TStr &NodeCol, TStrV &NodeAttrV, TAttrAggr AggrPolicy)
 Converts table to network sequentially. Takes edges from Table and nodes explicitly from NodeCol in NodeTable, with attribute vectors passed as columns in corresponding tables. More...
 
int TSnap::LoadCrossNet (TCrossNet &Graph, PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &EdgeAttrV)
 Loads the edges from the TTable and EdgeAttrV specifies columns containing edge attributes. More...
 
int TSnap::LoadMode (TModeNet &Graph, PTable Table, const TStr &NCol, TStrV &NodeAttrV)
 Loads the nodes specified in column NCol from the TTable with the attributes specified in NodeAttrV. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToGraphMP (PTable Table, const TStr &SrcCol, const TStr &DstCol)
 Performs table to graph conversion in parallel using the sort-first algorithm. This is the recommended method to use. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToGraphMP3 (PTable Table, const TStr &SrcCol, const TStr &DstCol)
 Performs table to graph conversion in parallel. Uses the hash-first method, which is less optimal, use ToGraphMP instead. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToNetworkMP (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &SrcAttrV, TStrV &DstAttrV, TStrV &EdgeAttrV, TAttrAggr AggrPolicy)
 Does Table to Network conversion in parallel using the sort-first algorithm. This is the recommended method to use. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToNetworkMP2 (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &SrcAttrV, TStrV &DstAttrV, TStrV &EdgeAttrV, TAttrAggr AggrPolicy)
 Implements table to network conversion in parallel. Not the recommended algorithm, using ToNetworkMP instead. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToNetworkMP (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &EdgeAttrV, TAttrAggr AggrPolicy)
 Converts table to network in parallel. Use if network has only edge attributes. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToNetworkMP (PTable Table, const TStr &SrcCol, const TStr &DstCol, TAttrAggr AggrPolicy)
 Calls ToNetworkMP with empty attribute vector. Convenience wrapper. More...
 
template<class PGraphMP >
PGraphMP TSnap::ToNetworkMP (PTable Table, const TStr &SrcCol, const TStr &DstCol, TStrV &EdgeAttrV, PTable NodeTable, const TStr &NodeCol, TStrV &NodeAttrV, TAttrAggr AggrPolicy)
 Converts table to network in parallel. Takes edges from Table and nodes explicitly from NodeCol in NodeTable, with attribute vectors passed as columns in corresponding tables. More...
 

Typedef Documentation

typedef TPt<TTable> PTable

Definition at line 141 of file table.h.

A table schema is a vector of pairs <attribute name, attribute type>.

Definition at line 262 of file table.h.

Represents grouping key with IntV for integer and string attributes and FltV for float attributes.

Definition at line 145 of file table.h.

Definition at line 1530 of file table.h.

Enumeration Type Documentation

enum TArithOp

Possible column-wise arithmetic operations.

Enumerator
aoAdd 
aoSub 
aoMul 
aoDiv 
aoMod 
aoMin 
aoMax 

Definition at line 259 of file table.h.

Definition: table.h:259
Definition: table.h:259
Definition: table.h:259
TArithOp
Possible column-wise arithmetic operations.
Definition: table.h:259
Definition: table.h:259
Definition: table.h:259
Definition: table.h:259
Definition: table.h:259
enum TAttrAggr

Possible policies for aggregating node attributes.

Enumerator
aaMin 
aaMax 
aaFirst 
aaLast 
aaMean 
aaMedian 
aaSum 
aaCount 

Definition at line 257 of file table.h.

Definition: table.h:257
TAttrAggr
Possible policies for aggregating node attributes.
Definition: table.h:257
Definition: table.h:257
Definition: table.h:257
Definition: table.h:257
Definition: table.h:257
Definition: table.h:257
Definition: table.h:257
enum TPredComp

Comparison operators for selection predicates.

Enumerator
LT 
LTE 
EQ 
NEQ 
GTE 
GT 
SUBSTR 
SUPERSTR 

Definition at line 7 of file table.h.

7 {LT = 0, LTE, EQ, NEQ, GTE, GT, SUBSTR, SUPERSTR} TPredComp;
TPredComp
Comparison operators for selection predicates.
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
Definition: table.h:7
enum TPredOp

Boolean operators for selection predicates.

Enumerator
NOT 
AND 
OR 
NOP 

Definition at line 5 of file table.h.

5 {NOT, AND, OR, NOP} TPredOp;
Definition: table.h:5
TPredOp
Boolean operators for selection predicates.
Definition: table.h:5
Definition: table.h:5
Definition: table.h:5
Definition: table.h:5
enum TSimType

Distance metrics for similarity joins.

Enumerator
L1Norm 
L2Norm 
Jaccard 
Haversine 

Definition at line 149 of file table.h.

TSimType
Distance metrics for similarity joins.
Definition: table.h:149
Definition: table.h:149
Definition: table.h:149
Definition: table.h:149