SNAP Library 4.0, User Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Directed multigraph with node edge attributes. More...
#include <network.h>
Inherited by TModeNet.
Classes | |
class | LoadHashOfVecFunctor |
class | LoadTNodeFunctor |
class | LoadVecFunctor |
class | LoadVecOfVecFunctor |
class | TAFltI |
Node/edge float attribute iterator. Iterates through all nodes/edges for one float attribute. More... | |
class | TAIntI |
Node/edge integer attribute iterator. Iterates through all nodes/edges for one integer attribute. More... | |
class | TAIntVI |
class | TAStrI |
Node/edge string attribute iterator. Iterates through all nodes/edges for one string attribute. More... | |
class | TEdge |
class | TEdgeI |
Edge iterator. Only forward iteration (operator++) is supported. More... | |
class | TNode |
class | TNodeI |
Node iterator. Only forward iteration (operator++) is supported. More... | |
Public Types | |
typedef TNEANet | TNet |
typedef TPt< TNEANet > | PNet |
Public Member Functions | |
TNEANet () | |
TNEANet (const int &Nodes, const int &Edges) | |
Constructor that reserves enough memory for a graph of nodes and edges. More... | |
TNEANet (const TNEANet &Graph) | |
TNEANet (TSIn &SIn) | |
Constructor for loading the graph from a (binary) stream SIn. More... | |
void | Save (TSOut &SOut) const |
Saves the graph to a (binary) stream SOut. Expects data structures for sparse attributes. More... | |
void | Save_V1 (TSOut &SOut) const |
Saves the graph to a (binary) stream SOut. Available for backwards compatibility. More... | |
void | Save_V2 (TSOut &SOut) const |
Saves the graph without any sparse data structures. Available for backwards compatibility. More... | |
void | LoadNetworkShM (TShMIn &ShMIn) |
load network from shared memory for this network More... | |
void | ConvertToSparse () |
bool | HasFlag (const TGraphFlag &Flag) const |
Allows for run-time checking the type of the graph (see the TGraphFlag for flags). More... | |
TNEANet & | operator= (const TNEANet &Graph) |
int | GetNodes () const |
Returns the number of nodes in the network. More... | |
int | AddNode (int NId=-1) |
Adds a node of ID NId to the network. More... | |
int | AddNodeUnchecked (int NId=-1) |
Adds a node of ID NId to the network, noop if the node already exists. More... | |
int | AddNode (const TNodeI &NodeI) |
Adds a node of ID NodeI.GetId() to the graph. More... | |
virtual void | DelNode (const int &NId) |
Deletes node of ID NId from the graph. More... | |
void | DelNode (const TNode &NodeI) |
Deletes node of ID NodeI.GetId() from the graph. More... | |
bool | IsNode (const int &NId) const |
Tests whether ID NId is a node. More... | |
TNodeI | BegNI () const |
Returns an iterator referring to the first node in the graph. More... | |
TNodeI | EndNI () const |
Returns an iterator referring to the past-the-end node in the graph. More... | |
TNodeI | GetNI (const int &NId) const |
Returns an iterator referring to the node of ID NId in the graph. More... | |
TAIntI | BegNAIntI (const TStr &attr) const |
Returns an iterator referring to the first node's int attribute. More... | |
TAIntI | EndNAIntI (const TStr &attr) const |
Returns an iterator referring to the past-the-end node's attribute. More... | |
TAIntI | GetNAIntI (const TStr &attr, const int &NId) const |
Returns an iterator referring to the node of ID NId in the graph. More... | |
TAIntVI | BegNAIntVI (const TStr &attr) const |
Returns an iterator referring to the first node's int attribute. More... | |
TAIntVI | EndNAIntVI (const TStr &attr) const |
Returns an iterator referring to the past-the-end node's attribute. More... | |
TAIntVI | GetNAIntVI (const TStr &attr, const int &NId) const |
Returns an iterator referring to the node of ID NId in the graph. More... | |
TAStrI | BegNAStrI (const TStr &attr) const |
Returns an iterator referring to the first node's str attribute. More... | |
TAStrI | EndNAStrI (const TStr &attr) const |
Returns an iterator referring to the past-the-end node's attribute. More... | |
TAStrI | GetNAStrI (const TStr &attr, const int &NId) const |
Returns an iterator referring to the node of ID NId in the graph. More... | |
TAFltI | BegNAFltI (const TStr &attr) const |
Returns an iterator referring to the first node's flt attribute. More... | |
TAFltI | EndNAFltI (const TStr &attr) const |
Returns an iterator referring to the past-the-end node's attribute. More... | |
TAFltI | GetNAFltI (const TStr &attr, const int &NId) const |
Returns an iterator referring to the node of ID NId in the graph. More... | |
void | AttrNameNI (const TInt &NId, TStrV &Names) const |
Returns a vector of attr names for node NId. More... | |
void | AttrNameNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Names) const |
void | AttrValueNI (const TInt &NId, TStrV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | AttrValueNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Values) const |
void | IntAttrNameNI (const TInt &NId, TStrV &Names) const |
Returns a vector of int attr names for node NId. More... | |
void | IntAttrNameNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Names) const |
void | IntAttrValueNI (const TInt &NId, TIntV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | IntAttrValueNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TIntV &Values) const |
void | IntVAttrNameNI (const TInt &NId, TStrV &Names) const |
Returns a vector of int attr names for node NId. More... | |
void | IntVAttrNameNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Names) const |
void | IntVAttrValueNI (const TInt &NId, TVec< TIntV > &Values) const |
Returns a vector of attr values for node NId. More... | |
void | IntVAttrValueNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TVec< TIntV > &Values) const |
void | StrAttrNameNI (const TInt &NId, TStrV &Names) const |
Returns a vector of str attr names for node NId. More... | |
void | StrAttrNameNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Names) const |
void | StrAttrValueNI (const TInt &NId, TStrV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | StrAttrValueNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Values) const |
void | FltAttrNameNI (const TInt &NId, TStrV &Names) const |
Returns a vector of int attr names for node NId. More... | |
void | FltAttrNameNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TStrV &Names) const |
void | FltAttrValueNI (const TInt &NId, TFltV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | FltAttrValueNI (const TInt &NId, TStrIntPrH::TIter NodeHI, TFltV &Values) const |
void | AttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of attr names for edge EId. More... | |
void | AttrNameEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Names) const |
void | AttrValueEI (const TInt &EId, TStrV &Values) const |
Returns a vector of attr values for edge EId. More... | |
void | AttrValueEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Values) const |
void | IntAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of int attr names for edge EId. More... | |
void | IntAttrNameEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Names) const |
void | IntAttrValueEI (const TInt &EId, TIntV &Values) const |
Returns a vector of attr values for edge EId. More... | |
void | IntAttrValueEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TIntV &Values) const |
void | IntVAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of int attr names for edge EId. More... | |
void | IntVAttrNameEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Names) const |
void | IntVAttrValueEI (const TInt &EId, TVec< TIntV > &Values) const |
Returns a vector of attr values for edge EId. More... | |
void | IntVAttrValueEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TVec< TIntV > &Values) const |
void | StrAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of str attr names for node NId. More... | |
void | StrAttrNameEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Names) const |
void | StrAttrValueEI (const TInt &EId, TStrV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | StrAttrValueEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Values) const |
void | FltAttrNameEI (const TInt &EId, TStrV &Names) const |
Returns a vector of int attr names for node NId. More... | |
void | FltAttrNameEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TStrV &Names) const |
void | FltAttrValueEI (const TInt &EId, TFltV &Values) const |
Returns a vector of attr values for node NId. More... | |
void | FltAttrValueEI (const TInt &EId, TStrIntPrH::TIter EdgeHI, TFltV &Values) const |
TAIntI | BegEAIntI (const TStr &attr) const |
Returns an iterator referring to the first edge's int attribute. More... | |
TAIntI | EndEAIntI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAIntI | GetEAIntI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
TAIntVI | BegEAIntVI (const TStr &attr) const |
Returns an iterator referring to the first edge's int attribute. More... | |
TAIntVI | EndEAIntVI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAIntVI | GetEAIntVI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
TAStrI | BegEAStrI (const TStr &attr) const |
Returns an iterator referring to the first edge's str attribute. More... | |
TAStrI | EndEAStrI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAStrI | GetEAStrI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
TAFltI | BegEAFltI (const TStr &attr) const |
Returns an iterator referring to the first edge's flt attribute. More... | |
TAFltI | EndEAFltI (const TStr &attr) const |
Returns an iterator referring to the past-the-end edge's attribute. More... | |
TAFltI | GetEAFltI (const TStr &attr, const int &EId) const |
Returns an iterator referring to the edge of ID EId in the graph. More... | |
int | GetMxNId () const |
Returns an ID that is larger than any node ID in the network. More... | |
int | GetMxEId () const |
Returns an ID that is larger than any edge ID in the network. More... | |
int | GetEdges () const |
Returns the number of edges in the graph. More... | |
int | AddEdge (const int &SrcNId, const int &DstNId, int EId=-1) |
Adds an edge with ID EId between node IDs SrcNId and DstNId to the graph. More... | |
int | AddEdge (const TEdgeI &EdgeI) |
Adds an edge between EdgeI.GetSrcNId() and EdgeI.GetDstNId() to the graph. More... | |
void | DelEdge (const int &EId) |
Deletes an edge with edge ID EId from the graph. More... | |
void | DelEdge (const int &SrcNId, const int &DstNId, const bool &IsDir=true) |
Deletes all edges between node IDs SrcNId and DstNId from the graph. More... | |
bool | IsEdge (const int &EId) const |
Tests whether an edge with edge ID EId exists in the graph. More... | |
bool | IsEdge (const int &SrcNId, const int &DstNId, const bool &IsDir=true) const |
Tests whether an edge between node IDs SrcNId and DstNId exists in the graph. More... | |
bool | IsEdge (const int &SrcNId, const int &DstNId, int &EId, const bool &IsDir=true) const |
Tests whether an edge between node IDs SrcNId and DstNId exists in the graph. if an edge exists, return its edge ID in EId. More... | |
int | GetEId (const int &SrcNId, const int &DstNId) const |
Returns an edge ID between node IDs SrcNId and DstNId, if such an edge exists. Otherwise, return -1. More... | |
TEdgeI | BegEI () const |
Returns an iterator referring to the first edge in the graph. More... | |
TEdgeI | EndEI () const |
Returns an iterator referring to the past-the-end edge in the graph. More... | |
TEdgeI | GetEI (const int &EId) const |
Returns an iterator referring to edge with edge ID EId. More... | |
TEdgeI | GetEI (const int &SrcNId, const int &DstNId) const |
Returns an iterator referring to edge (SrcNId, DstNId) in the graph. More... | |
int | GetRndNId (TRnd &Rnd=TInt::Rnd) |
Returns an ID of a random node in the graph. More... | |
TNodeI | GetRndNI (TRnd &Rnd=TInt::Rnd) |
Returns an interator referring to a random node in the graph. More... | |
int | GetRndEId (TRnd &Rnd=TInt::Rnd) |
Returns an ID of a random edge in the graph. More... | |
TEdgeI | GetRndEI (TRnd &Rnd=TInt::Rnd) |
Returns an interator referring to a random edge in the graph. More... | |
void | GetNIdV (TIntV &NIdV) const |
Gets a vector IDs of all nodes in the graph. More... | |
void | GetEIdV (TIntV &EIdV) const |
Gets a vector IDs of all edges in the graph. More... | |
bool | Empty () const |
Tests whether the graph is empty (has zero nodes). More... | |
void | Clr () |
Deletes all nodes and edges from the graph. More... | |
void | Reserve (const int &Nodes, const int &Edges) |
Reserves memory for a graph of Nodes nodes and Edges edges. More... | |
void | Defrag (const bool &OnlyNodeLinks=false) |
Defragments the graph. More... | |
bool | IsOk (const bool &ThrowExcept=true) const |
Checks the graph data structure for internal consistency. More... | |
void | Dump (FILE *OutF=stdout) const |
Print the graph in a human readable form to an output stream OutF. More... | |
int | AddIntAttrDatN (const TNodeI &NodeI, const TInt &value, const TStr &attr) |
Attribute based add function for attr to Int value. More... | |
int | AddIntAttrDatN (const int &NId, const TInt &value, const TStr &attr) |
int | AddStrAttrDatN (const TNodeI &NodeI, const TStr &value, const TStr &attr) |
Attribute based add function for attr to Str value. More... | |
int | AddStrAttrDatN (const int &NId, const TStr &value, const TStr &attr) |
int | AddFltAttrDatN (const TNodeI &NodeI, const TFlt &value, const TStr &attr) |
Attribute based add function for attr to Flt value. More... | |
int | AddFltAttrDatN (const int &NId, const TFlt &value, const TStr &attr) |
int | AddIntVAttrDatN (const TNodeI &NodeI, const TIntV &value, const TStr &attr) |
Attribute based add function for attr to IntV value. More... | |
int | AddIntVAttrDatN (const int &NId, const TIntV &value, const TStr &attr, TBool UseDense=true) |
int | AppendIntVAttrDatN (const TNodeI &NodeI, const TInt &value, const TStr &attr) |
Appends value onto the TIntV attribute for the given node. More... | |
int | AppendIntVAttrDatN (const int &NId, const TInt &value, const TStr &attr, TBool UseDense=true) |
int | DelFromIntVAttrDatN (const TNodeI &NodeI, const TInt &value, const TStr &attr) |
Deletes value from the TIntV attribute for the given node. More... | |
int | DelFromIntVAttrDatN (const int &NId, const TInt &value, const TStr &attr) |
int | AddIntAttrDatE (const TEdgeI &EdgeI, const TInt &value, const TStr &attr) |
Attribute based add function for attr to Int value. More... | |
int | AddIntAttrDatE (const int &EId, const TInt &value, const TStr &attr) |
int | AddStrAttrDatE (const TEdgeI &EdgeI, const TStr &value, const TStr &attr) |
Attribute based add function for attr to Str value. More... | |
int | AddStrAttrDatE (const int &EId, const TStr &value, const TStr &attr) |
int | AddFltAttrDatE (const TEdgeI &EdgeI, const TFlt &value, const TStr &attr) |
Attribute based add function for attr to Flt value. More... | |
int | AddFltAttrDatE (const int &EId, const TFlt &value, const TStr &attr) |
int | AddIntVAttrDatE (const TEdgeI &EdgeI, const TIntV &value, const TStr &attr) |
Attribute based add function for attr to IntV value. More... | |
int | AddIntVAttrDatE (const int &EId, const TIntV &value, const TStr &attr, TBool UseDense=true) |
int | AppendIntVAttrDatE (const TEdgeI &EdgeI, const TInt &value, const TStr &attr) |
Appends value onto the TIntV attribute for the given node. More... | |
int | AppendIntVAttrDatE (const int &EId, const TInt &value, const TStr &attr, TBool UseDense=true) |
TInt | GetIntAttrDatN (const TNodeI &NodeI, const TStr &attr) |
Gets the value of int attr from the node attr value vector. More... | |
TInt | GetIntAttrDatN (const int &NId, const TStr &attr) |
TStr | GetStrAttrDatN (const TNodeI &NodeI, const TStr &attr) |
Gets the value of str attr from the node attr value vector. More... | |
TStr | GetStrAttrDatN (const int &NId, const TStr &attr) |
TFlt | GetFltAttrDatN (const TNodeI &NodeI, const TStr &attr) |
Gets the value of flt attr from the node attr value vector. More... | |
TFlt | GetFltAttrDatN (const int &NId, const TStr &attr) |
TIntV | GetIntVAttrDatN (const TNodeI &NodeI, const TStr &attr) const |
Gets the value of the intv attr from the node attr value vector. More... | |
TIntV | GetIntVAttrDatN (const int &NId, const TStr &attr) const |
int | GetIntAttrIndN (const TStr &attr) |
Gets the index of the node attr value vector specified by attr (same as GetAttrIndN for compatibility reasons). More... | |
int | GetAttrIndN (const TStr &attr) |
Gets the index of the node attr value vector specified by attr . More... | |
TInt | GetIntAttrIndDatN (const TNodeI &NodeI, const int &index) |
Gets the value of an int node attr specified by node iterator NodeI and the attr index . More... | |
TInt | GetIntAttrIndDatN (const int &NId, const int &index) |
Gets the value of an int node attr specified by node ID NId and the attr index . More... | |
TStr | GetStrAttrIndDatN (const TNodeI &NodeI, const int &index) |
Gets the value of a string node attr specified by node iterator NodeI and the attr index . More... | |
TStr | GetStrAttrIndDatN (const int &NId, const int &index) |
Gets the value of a string node attr specified by node ID NId and the attr index . More... | |
TFlt | GetFltAttrIndDatN (const TNodeI &NodeI, const int &index) |
Gets the value of a float node attr specified by node iterator NodeI and the attr index . More... | |
TFlt | GetFltAttrIndDatN (const int &NId, const int &index) |
Gets the value of a float node attr specified by node ID NId and the attr index . More... | |
TInt | GetIntAttrDatE (const TEdgeI &EdgeI, const TStr &attr) |
Gets the value of int attr from the edge attr value vector. More... | |
TInt | GetIntAttrDatE (const int &EId, const TStr &attr) |
TStr | GetStrAttrDatE (const TEdgeI &EdgeI, const TStr &attr) |
Gets the value of str attr from the edge attr value vector. More... | |
TStr | GetStrAttrDatE (const int &EId, const TStr &attr) |
TFlt | GetFltAttrDatE (const TEdgeI &EdgeI, const TStr &attr) |
Gets the value of flt attr from the edge attr value vector. More... | |
TFlt | GetFltAttrDatE (const int &EId, const TStr &attr) |
TIntV | GetIntVAttrDatE (const TEdgeI &EdgeI, const TStr &attr) |
Gets the value of the intv attr from the edge attr value vector. More... | |
TIntV | GetIntVAttrDatE (const int &EId, const TStr &attr) |
int | GetIntAttrIndE (const TStr &attr) |
Gets the index of the edge attr value vector specified by attr (same as GetAttrIndE for compatibility reasons). More... | |
int | GetAttrIndE (const TStr &attr) |
Gets the index of the edge attr value vector specified by attr . More... | |
TInt | GetIntAttrIndDatE (const TEdgeI &EdgeI, const int &index) |
Gets the value of an int edge attr specified by edge iterator EdgeI and the attr index . More... | |
TInt | GetIntAttrIndDatE (const int &EId, const int &index) |
Gets the value of an int edge attr specified by edge ID EId and the attr index . More... | |
TFlt | GetFltAttrIndDatE (const TEdgeI &EdgeI, const int &index) |
Gets the value of a float edge attr specified by edge iterator EdgeI and the attr index . More... | |
TFlt | GetFltAttrIndDatE (const int &EId, const int &index) |
Gets the value of an int edge attr specified by edge ID EId and the attr index . More... | |
TStr | GetStrAttrIndDatE (const TEdgeI &EdgeI, const int &index) |
Gets the value of a string edge attr specified by edge iterator EdgeI and the attr index . More... | |
TStr | GetStrAttrIndDatE (const int &EId, const int &index) |
Gets the value of an int edge attr specified by edge ID EId and the attr index . More... | |
int | DelAttrDatN (const TNodeI &NodeI, const TStr &attr) |
Deletes the node attribute for NodeI. More... | |
int | DelAttrDatN (const int &NId, const TStr &attr) |
int | DelAttrDatE (const TEdgeI &EdgeI, const TStr &attr) |
Deletes the edge attribute for NodeI. More... | |
int | DelAttrDatE (const int &EId, const TStr &attr) |
int | AddIntAttrN (const TStr &attr, TInt defaultValue=TInt::Mn) |
Adds a new Int node attribute to the hashmap. More... | |
int | AddStrAttrN (const TStr &attr, TStr defaultValue=TStr::GetNullStr()) |
Adds a new Str node attribute to the hashmap. More... | |
int | AddFltAttrN (const TStr &attr, TFlt defaultValue=TFlt::Mn) |
Adds a new Flt node attribute to the hashmap. More... | |
int | AddIntVAttrN (const TStr &attr, TBool UseDense=true) |
Adds a new IntV node attribute to the hashmap. More... | |
int | AddIntAttrE (const TStr &attr, TInt defaultValue=TInt::Mn) |
Adds a new Int edge attribute to the hashmap. More... | |
int | AddStrAttrE (const TStr &attr, TStr defaultValue=TStr::GetNullStr()) |
Adds a new Str edge attribute to the hashmap. More... | |
int | AddFltAttrE (const TStr &attr, TFlt defaultValue=TFlt::Mn) |
Adds a new Flt edge attribute to the hashmap. More... | |
int | AddIntVAttrE (const TStr &attr, TBool UseDense=true) |
Adds a new IntV edge attribute to the hashmap. More... | |
int | DelAttrN (const TStr &attr) |
Removes all the values for node attr. More... | |
int | DelAttrE (const TStr &attr) |
Removes all the values for edge attr. More... | |
bool | IsAttrDeletedN (const int &NId, const TStr &attr) const |
Returns true if attr exists for node NId and has default value. More... | |
bool | IsIntAttrDeletedN (const int &NId, const TStr &attr) const |
Returns true if Int attr exists for node NId and has default value. More... | |
bool | IsIntVAttrDeletedN (const int &NId, const TStr &attr) const |
Returns true if IntV attr exists for node NId and is an empty vector. More... | |
bool | IsStrAttrDeletedN (const int &NId, const TStr &attr) const |
Returns true if Str attr exists for node NId and has default value. More... | |
bool | IsFltAttrDeletedN (const int &NId, const TStr &attr) const |
Returns true if Flt attr exists for node NId and has default value. More... | |
bool | NodeAttrIsDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns true if NId attr deleted for current node attr iterator. More... | |
bool | NodeAttrIsIntDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns true if NId attr deleted value for current node int attr iterator. More... | |
bool | NodeAttrIsIntVDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns true if NId attr deleted value for current node int vector attr iterator. More... | |
bool | NodeAttrIsStrDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns true if NId attr deleted value for current node str attr iterator. More... | |
bool | NodeAttrIsFltDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns true if NId attr deleted value for current node flt attr iterator. More... | |
bool | IsAttrDeletedE (const int &EId, const TStr &attr) const |
Returns true if attr exists for edge EId and has default value. More... | |
bool | IsIntAttrDeletedE (const int &EId, const TStr &attr) const |
Returns true if Int attr exists for edge EId and has default value. More... | |
bool | IsIntVAttrDeletedE (const int &EId, const TStr &attr) const |
Returns true if IntV attr exists for edge EId and is an empty vector. More... | |
bool | IsStrAttrDeletedE (const int &EId, const TStr &attr) const |
Returns true if Str attr exists for edge NId and has default value. More... | |
bool | IsFltAttrDeletedE (const int &EId, const TStr &attr) const |
Returns true if Flt attr exists for edge NId and has default value. More... | |
bool | EdgeAttrIsDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns true if EId attr deleted for current edge attr iterator. More... | |
bool | EdgeAttrIsIntDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns true if EId attr deleted for current edge int attr iterator. More... | |
bool | EdgeAttrIsIntVDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns true if EId attr deleted for current edge int vector attr iterator. More... | |
bool | EdgeAttrIsStrDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns true if EId attr deleted for current edge str attr iterator. More... | |
bool | EdgeAttrIsFltDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns true if EId attr deleted for current edge flt attr iterator. More... | |
TStr | GetNodeAttrValue (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
Returns node attribute value, converted to Str type. More... | |
TStr | GetEdgeAttrValue (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
Returns edge attribute value, converted to Str type. More... | |
TFlt | GetWeightOutEdges (const TNodeI &NI, const TStr &attr) |
Gets the sum of the weights of all the outgoing edges of the node. More... | |
bool | IsFltAttrE (const TStr &attr) |
Checks if there is an edge attribute with name attr. More... | |
bool | IsIntAttrE (const TStr &attr) |
Checks if there is an edge attribute with name attr. More... | |
bool | IsStrAttrE (const TStr &attr) |
Checks if there is an edge attribute with name attr. More... | |
TVec< TFlt > & | GetFltAttrVecE (const TStr &attr) |
Gets Vector for the Flt Attribute attr. More... | |
int | GetFltKeyIdE (const int &EId) |
Gets keyid for edge with id EId. More... | |
void | GetWeightOutEdgesV (TFltV &OutWeights, const TFltV &AttrVal) |
Fills OutWeights with the outgoing weight from each node. More... | |
void | GetAttrNNames (TStrV &IntAttrNames, TStrV &FltAttrNames, TStrV &StrAttrNames) const |
Fills each of the vectors with the names of node attributes of the given type. More... | |
void | GetAttrENames (TStrV &IntAttrNames, TStrV &FltAttrNames, TStrV &StrAttrNames) const |
Fills each of the vectors with the names of edge attributes of the given type. More... | |
int | AddSAttrDatN (const TInt &NId, const TStr &AttrName, const TInt &Val) |
Adds Int sparse attribute with name AttrName to the given node with id NId . More... | |
int | AddSAttrDatN (const TInt &NId, const TInt &AttrId, const TInt &Val) |
Adds Int sparse attribute with id AttrId to the given node with id NId . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, const TInt &Val) |
Adds Int sparse attribute with name AttrName to NodeI . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, const TInt &Val) |
Adds Int sparse attribute with id AttrId to NodeI . More... | |
int | AddSAttrDatN (const TInt &NId, const TStr &AttrName, const TFlt &Val) |
Adds Flt sparse attribute with name AttrName to the given node with id NId . More... | |
int | AddSAttrDatN (const TInt &NId, const TInt &AttrId, const TFlt &Val) |
Adds Flt sparse attribute with id AttrId to the given node with id NId . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, const TFlt &Val) |
Adds Flt sparse attribute with name AttrName to NodeI . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, const TFlt &Val) |
Adds Flt sparse attribute with id AttrId to NodeI . More... | |
int | AddSAttrDatN (const TInt &NId, const TStr &AttrName, const TStr &Val) |
Adds Str sparse attribute with name AttrName to the given node with id NId . More... | |
int | AddSAttrDatN (const TInt &NId, const TInt &AttrId, const TStr &Val) |
Adds Str sparse attribute with id AttrId to the given node with id NId . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, const TStr &Val) |
Adds Str sparse attribute with name AttrName to NodeI . More... | |
int | AddSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, const TStr &Val) |
Adds Str sparse attribute with id AttrId to NodeI . More... | |
int | GetSAttrDatN (const TInt &NId, const TStr &AttrName, TInt &ValX) const |
Gets Int sparse attribute with name AttrName from node with id NId . More... | |
int | GetSAttrDatN (const TInt &NId, const TInt &AttrId, TInt &ValX) const |
Gets Int sparse attribute with id AttrId from node with id NId . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, TInt &ValX) const |
Gets Int sparse attribute with name AttrName from NodeI . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, TInt &ValX) const |
Gets Int sparse attribute with id AttrId from NodeI . More... | |
int | GetSAttrDatN (const TInt &NId, const TStr &AttrName, TFlt &ValX) const |
Gets Flt sparse attribute with name AttrName from node with id NId . More... | |
int | GetSAttrDatN (const TInt &NId, const TInt &AttrId, TFlt &ValX) const |
Gets Flt sparse attribute with id AttrId from node with id NId . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, TFlt &ValX) const |
Gets Flt sparse attribute with name AttrName from NodeI . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, TFlt &ValX) const |
Gets Flt sparse attribute with id AttrId from NodeI . More... | |
int | GetSAttrDatN (const TInt &NId, const TStr &AttrName, TStr &ValX) const |
Gets Str sparse attribute with name AttrName from node with id NId . More... | |
int | GetSAttrDatN (const TInt &NId, const TInt &AttrId, TStr &ValX) const |
Gets Str sparse attribute with id AttrId from node with id NId . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TStr &AttrName, TStr &ValX) const |
Gets Str sparse attribute with name AttrName from NodeI . More... | |
int | GetSAttrDatN (const TNodeI &NodeI, const TInt &AttrId, TStr &ValX) const |
Gets Str sparse attribute with id AttrId from NodeI . More... | |
int | DelSAttrDatN (const TInt &NId, const TStr &AttrName) |
Deletes sparse attribute with name AttrName from node with id NId . More... | |
int | DelSAttrDatN (const TInt &NId, const TInt &AttrId) |
Deletes sparse attribute with id AttrId from node with id NId . More... | |
int | DelSAttrDatN (const TNodeI &NodeI, const TStr &AttrName) |
Deletes sparse attribute with name AttrName from NodeI . More... | |
int | DelSAttrDatN (const TNodeI &NodeI, const TInt &AttrId) |
Deletes sparse attribute with id AttrId from NodeI . More... | |
int | GetSAttrVN (const TInt &NId, const TAttrType AttrType, TAttrPrV &AttrV) const |
Gets a list of all sparse attributes of type AttrType for node with id NId . More... | |
int | GetSAttrVN (const TNodeI &NodeI, const TAttrType AttrType, TAttrPrV &AttrV) const |
Gets a list of all sparse attributes of type AttrType for NodeI . More... | |
int | GetIdVSAttrN (const TStr &AttrName, TIntV &IdV) const |
Gets a list of all nodes that have a sparse attribute with name AttrName . More... | |
int | GetIdVSAttrN (const TInt &AttrId, TIntV &IdV) const |
Gets a list of all nodes that have a sparse attribute with id AttrId . More... | |
int | AddSAttrN (const TStr &Name, const TAttrType &AttrType, TInt &AttrId) |
Adds mapping for sparse attribute with name Name and type AttrType . More... | |
int | GetSAttrIdN (const TStr &Name, TInt &AttrIdX, TAttrType &AttrTypeX) const |
Gets id and type for attribute with name Name . More... | |
int | GetSAttrNameN (const TInt &AttrId, TStr &NameX, TAttrType &AttrTypeX) const |
Gets name and type for attribute with id AttrId . More... | |
int | AddSAttrDatE (const TInt &EId, const TStr &AttrName, const TInt &Val) |
Adds Int sparse attribute with name AttrName to the given edge with id EId . More... | |
int | AddSAttrDatE (const TInt &EId, const TInt &AttrId, const TInt &Val) |
Adds Int sparse attribute with id AttrId to the given edge with id EId . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, const TInt &Val) |
Adds Int sparse attribute with name AttrName to EdgeI . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, const TInt &Val) |
Adds Int sparse attribute with id AttrId to EdgeI . More... | |
int | AddSAttrDatE (const TInt &EId, const TStr &AttrName, const TFlt &Val) |
Adds Flt sparse attribute with name AttrName to the given edge with id EId . More... | |
int | AddSAttrDatE (const TInt &EId, const TInt &AttrId, const TFlt &Val) |
Adds Flt sparse attribute with id AttrId to the given edge with id EId . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, const TFlt &Val) |
Adds Flt sparse attribute with name AttrName to EdgeI . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, const TFlt &Val) |
Adds Flt sparse attribute with id AttrId to EdgeI . More... | |
int | AddSAttrDatE (const TInt &EId, const TStr &AttrName, const TStr &Val) |
Adds Str sparse attribute with name AttrName to the given edge with id EId . More... | |
int | AddSAttrDatE (const TInt &EId, const TInt &AttrId, const TStr &Val) |
Adds Str sparse attribute with id AttrId to the given edge with id EId . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, const TStr &Val) |
Adds Str sparse attribute with name AttrName to EdgeI . More... | |
int | AddSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, const TStr &Val) |
Adds Str sparse attribute with id AttrId to EdgeI . More... | |
int | GetSAttrDatE (const TInt &EId, const TStr &AttrName, TInt &ValX) const |
Gets Int sparse attribute with name AttrName from edge with id EId . More... | |
int | GetSAttrDatE (const TInt &EId, const TInt &AttrId, TInt &ValX) const |
Gets Int sparse attribute with id AttrId from edge with id EId . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, TInt &ValX) const |
Gets Int sparse attribute with name AttrName from EdgeI . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, TInt &ValX) const |
Gets Int sparse attribute with id AttrId from EdgeI . More... | |
int | GetSAttrDatE (const TInt &EId, const TStr &AttrName, TFlt &ValX) const |
Gets Flt sparse attribute with name AttrName from edge with id EId . More... | |
int | GetSAttrDatE (const TInt &EId, const TInt &AttrId, TFlt &ValX) const |
Gets Flt sparse attribute with id AttrId from edge with id EId . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, TFlt &ValX) const |
Gets Flt sparse attribute with name AttrName from EdgeI . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, TFlt &ValX) const |
Gets Flt sparse attribute with id AttrId from EdgeI . More... | |
int | GetSAttrDatE (const TInt &EId, const TStr &AttrName, TStr &ValX) const |
Gets Str sparse attribute with name AttrName from edge with id EId . More... | |
int | GetSAttrDatE (const TInt &EId, const TInt &AttrId, TStr &ValX) const |
Gets Str sparse attribute with id AttrId from edge with id EId . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName, TStr &ValX) const |
Gets Str sparse attribute with name AttrName from EdgeI . More... | |
int | GetSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId, TStr &ValX) const |
Gets Str sparse attribute with id AttrId from EdgeI . More... | |
int | DelSAttrDatE (const TInt &EId, const TStr &AttrName) |
Deletes sparse attribute with name AttrName from edge with id EId . More... | |
int | DelSAttrDatE (const TInt &EId, const TInt &AttrId) |
Deletes sparse attribute with id AttrId from edge with id EId . More... | |
int | DelSAttrDatE (const TEdgeI &EdgeI, const TStr &AttrName) |
Deletes sparse attribute with name AttrName from EdgeI . More... | |
int | DelSAttrDatE (const TEdgeI &EdgeI, const TInt &AttrId) |
Deletes sparse attribute with id AttrId from EdgeI . More... | |
int | GetSAttrVE (const TInt &EId, const TAttrType AttrType, TAttrPrV &AttrV) const |
Gets a list of all sparse attributes of type AttrType for edge with id EId . More... | |
int | GetSAttrVE (const TEdgeI &EdgeI, const TAttrType AttrType, TAttrPrV &AttrV) const |
Gets a list of all sparse attributes of type AttrType for EdgeI . More... | |
int | GetIdVSAttrE (const TStr &AttrName, TIntV &IdV) const |
Gets a list of all edges that have a sparse attribute with name AttrName . More... | |
int | GetIdVSAttrE (const TInt &AttrId, TIntV &IdV) const |
Gets a list of all edges that have a sparse attribute with id AttrId . More... | |
int | AddSAttrE (const TStr &Name, const TAttrType &AttrType, TInt &AttrId) |
Adds mapping for sparse attribute with name Name and type AttrType . More... | |
int | GetSAttrIdE (const TStr &Name, TInt &AttrIdX, TAttrType &AttrTypeX) const |
Gets id and type for attribute with name Name . More... | |
int | GetSAttrNameE (const TInt &AttrId, TStr &NameX, TAttrType &AttrTypeX) const |
Gets name and type for attribute with id AttrId . More... | |
Static Public Member Functions | |
static PNEANet | New () |
Static cons returns pointer to graph. Ex: PNEANet Graph=TNEANet::New(). More... | |
static PNEANet | New (const int &Nodes, const int &Edges) |
Static constructor that returns a pointer to the graph and reserves enough memory for Nodes nodes and Edges edges. More... | |
static PNEANet | Load (TSIn &SIn) |
Static constructor that loads the graph from a stream SIn and returns a pointer to it. More... | |
static PNEANet | Load_V1 (TSIn &SIn) |
Static constructor that loads the graph from a stream SIn and returns a pointer to it. Backwards compatible. More... | |
static PNEANet | Load_V2 (TSIn &SIn) |
Static constructor that loads the graph from a stream SIn and returns a pointer to it. Backwards compatible without Sparse. More... | |
static PNEANet | LoadShM (TShMIn &ShMIn) |
Static constructor that loads the network from memory. More... | |
static PNEANet | GetSmallGraph () |
Returns a small multigraph on 5 nodes and 6 edges. More... | |
Public Attributes | |
TCRef | CRef |
Protected Types | |
enum | { IntType, StrType, FltType, IntVType } |
Protected Member Functions | |
TNode & | GetNode (const int &NId) |
const TNode & | GetNode (const int &NId) const |
TEdge & | GetEdge (const int &EId) |
const TEdge & | GetEdge (const int &EId) const |
int | AddAttributes (const int NId) |
TInt | GetIntAttrDefaultN (const TStr &attribute) const |
Gets Int node attribute val. If not a proper attr, return default. More... | |
TStr | GetStrAttrDefaultN (const TStr &attribute) const |
Gets Str node attribute val. If not a proper attr, return default. More... | |
TFlt | GetFltAttrDefaultN (const TStr &attribute) const |
Gets Flt node attribute val. If not a proper attr, return default. More... | |
TInt | GetIntAttrDefaultE (const TStr &attribute) const |
Gets Int edge attribute val. If not a proper attr, return default. More... | |
TStr | GetStrAttrDefaultE (const TStr &attribute) const |
Gets Str edge attribute val. If not a proper attr, return default. More... | |
TFlt | GetFltAttrDefaultE (const TStr &attribute) const |
Gets Flt edge attribute val. If not a proper attr, return default. More... | |
TInt | CheckDenseOrSparseN (const TStr &attr) const |
Return 1 if in Dense, 0 if in Sparse, -1 if neither. More... | |
TInt | CheckDenseOrSparseE (const TStr &attr) const |
TNEANet (const TNEANet &Graph, bool modeSubGraph) | |
TNEANet (bool copyAll, const TNEANet &Graph) | |
Protected Attributes | |
TInt | MxNId |
TInt | MxEId |
THash< TInt, TNode > | NodeH |
THash< TInt, TEdge > | EdgeH |
TStrIntPrH | KeyToIndexTypeN |
KeyToIndexType[N|E]: Key->(Type,Index). More... | |
TStrIntPrH | KeyToIndexTypeE |
THash< TStr, TBool > | KeyToDenseN |
KeyToDense[N|E]: Key->(True if Vec, False if Hash) More... | |
THash< TStr, TBool > | KeyToDenseE |
THash< TStr, TInt > | IntDefaultsN |
THash< TStr, TInt > | IntDefaultsE |
THash< TStr, TStr > | StrDefaultsN |
THash< TStr, TStr > | StrDefaultsE |
THash< TStr, TFlt > | FltDefaultsN |
THash< TStr, TFlt > | FltDefaultsE |
TVec< TIntV > | VecOfIntVecsN |
TVec< TIntV > | VecOfIntVecsE |
TVec< TStrV > | VecOfStrVecsN |
TVec< TStrV > | VecOfStrVecsE |
TVec< TFltV > | VecOfFltVecsN |
TVec< TFltV > | VecOfFltVecsE |
TVec< TVec< TIntV > > | VecOfIntVecVecsN |
TVec< TVec< TIntV > > | VecOfIntVecVecsE |
TVec< THash< TInt, TIntV > > | VecOfIntHashVecsN |
TVec< THash< TInt, TIntV > > | VecOfIntHashVecsE |
TAttr | SAttrN |
TAttr | SAttrE |
Friends | |
class | TPt< TNEANet > |
Directed multigraph with node edge attributes.
Node IDs can be arbitrary non-negative integers. Edges have IDs. There can be more than one directed edge from one source node to a destination node. Self loops (one per node) are allowed as well as multiple (parallel) edges. Nodes and edges can have attributes/data associated with them. The attributes can be added dynamically at runtime. The directed multigraph data structure is implemented using sorted adjacency lists. This means adding a node takes constant time, while adding an edge takes linear time (since adjacency list is kept sorted) in the node degree. Accessing arbitrary node takes constant time and accessing any edge takes logarithmic time in the node degree. The attributes are organized in a columnar store, where each attribute column is defined for all the nodes or edges in the network.
typedef TPt<TNEANet> TNEANet::PNet |
typedef TNEANet TNEANet::TNet |
|
protected |
Enumerator | |
---|---|
IntType | |
StrType | |
FltType | |
IntVType |
Definition at line 2043 of file network.h.
|
inline |
Definition at line 2097 of file network.h.
|
inlineexplicit |
Constructor that reserves enough memory for a graph of nodes and edges.
Definition at line 2104 of file network.h.
|
inline |
Definition at line 2111 of file network.h.
|
inline |
Constructor for loading the graph from a (binary) stream SIn.
Definition at line 2118 of file network.h.
|
inlineprotected |
Definition at line 2125 of file network.h.
|
inlineprotected |
Definition at line 2131 of file network.h.
|
protected |
Definition at line 468 of file network.cpp.
int TNEANet::AddEdge | ( | const int & | SrcNId, |
const int & | DstNId, | ||
int | EId = -1 |
||
) |
Adds an edge with ID EId between node IDs SrcNId and DstNId to the graph.
Returns the ID of the edge being added. If EId is -1, edge ID is automatically assigned. Aborts, if an edge with ID EId already exists. Aborts, if SrcNId or DstNId are not nodes in the graph.
Definition at line 622 of file network.cpp.
|
inline |
Adds an edge between EdgeI.GetSrcNId() and EdgeI.GetDstNId() to the graph.
Definition at line 2585 of file network.h.
Attribute based add function for attr to Flt value.
Adds the key flt value pair to the corresponding edge attribute value vector.
Definition at line 2690 of file network.h.
Definition at line 1121 of file network.cpp.
Attribute based add function for attr to Flt value.
Adds the key flt value pair to the corresponding node attribute value vector.
Definition at line 2664 of file network.h.
Definition at line 1010 of file network.cpp.
Adds a new Flt edge attribute to the hashmap.
Definition at line 1399 of file network.cpp.
Adds a new Flt node attribute to the hashmap.
Definition at line 1322 of file network.cpp.
Attribute based add function for attr to Int value.
Adds the key int value pair to the corresponding edge attribute value vector.
Definition at line 2680 of file network.h.
Definition at line 1034 of file network.cpp.
Attribute based add function for attr to Int value.
Adds the key int value pair to the corresponding node attribute value vector.
Definition at line 2654 of file network.h.
Definition at line 894 of file network.cpp.
Adds a new Int edge attribute to the hashmap.
Definition at line 1342 of file network.cpp.
Adds a new Int node attribute to the hashmap.
Definition at line 1266 of file network.cpp.
|
inline |
Attribute based add function for attr to IntV value.
Adds the key intv value pair to the corresponding edge attribute value vector.
Definition at line 2695 of file network.h.
int TNEANet::AddIntVAttrDatE | ( | const int & | EId, |
const TIntV & | value, | ||
const TStr & | attr, | ||
TBool | UseDense = true |
||
) |
Definition at line 1057 of file network.cpp.
|
inline |
Attribute based add function for attr to IntV value.
Adds the key intv value pair to the corresponding node attribute value vector.
Definition at line 2669 of file network.h.
int TNEANet::AddIntVAttrDatN | ( | const int & | NId, |
const TIntV & | value, | ||
const TStr & | attr, | ||
TBool | UseDense = true |
||
) |
Definition at line 917 of file network.cpp.
Adds a new IntV edge attribute to the hashmap.
Definition at line 1362 of file network.cpp.
Adds a new IntV node attribute to the hashmap.
Definition at line 1285 of file network.cpp.
int TNEANet::AddNode | ( | int | NId = -1 | ) |
Adds a node of ID NId to the network.
Returns the ID of the node being added. If NId is -1, node ID is automatically assigned. Aborts, if a node with ID NId already exists.
Definition at line 444 of file network.cpp.
|
inline |
Adds a node of ID NodeI.GetId() to the graph.
Definition at line 2290 of file network.h.
int TNEANet::AddNodeUnchecked | ( | int | NId = -1 | ) |
Adds a node of ID NId to the network, noop if the node already exists.
Returns -1, if the node NId already exists. Otherwise, it returns the ID of the node being added. If NId is -1, node ID is automatically assigned.
Definition at line 456 of file network.cpp.
Adds Int sparse attribute with name AttrName
to the given edge with id EId
.
Definition at line 1669 of file network.cpp.
Adds Int sparse attribute with id AttrId
to the given edge with id EId
.
Definition at line 1676 of file network.cpp.
Adds Int sparse attribute with name AttrName
to EdgeI
.
Definition at line 2991 of file network.h.
Adds Int sparse attribute with id AttrId
to EdgeI
.
Definition at line 2995 of file network.h.
Adds Flt sparse attribute with name AttrName
to the given edge with id EId
.
Definition at line 1683 of file network.cpp.
Adds Flt sparse attribute with id AttrId
to the given edge with id EId
.
Definition at line 1690 of file network.cpp.
Adds Flt sparse attribute with name AttrName
to EdgeI
.
Definition at line 3005 of file network.h.
Adds Flt sparse attribute with id AttrId
to EdgeI
.
Definition at line 3009 of file network.h.
Adds Str sparse attribute with name AttrName
to the given edge with id EId
.
Definition at line 1697 of file network.cpp.
Adds Str sparse attribute with id AttrId
to the given edge with id EId
.
Definition at line 1704 of file network.cpp.
Adds Str sparse attribute with name AttrName
to EdgeI
.
Definition at line 3019 of file network.h.
Adds Str sparse attribute with id AttrId
to EdgeI
.
Definition at line 3023 of file network.h.
Adds Int sparse attribute with name AttrName
to the given node with id NId
.
Definition at line 1543 of file network.cpp.
Adds Int sparse attribute with id AttrId
to the given node with id NId
.
Definition at line 1550 of file network.cpp.
Adds Int sparse attribute with name AttrName
to NodeI
.
Definition at line 2873 of file network.h.
Adds Int sparse attribute with id AttrId
to NodeI
.
Definition at line 2877 of file network.h.
Adds Flt sparse attribute with name AttrName
to the given node with id NId
.
Definition at line 1557 of file network.cpp.
Adds Flt sparse attribute with id AttrId
to the given node with id NId
.
Definition at line 1564 of file network.cpp.
Adds Flt sparse attribute with name AttrName
to NodeI
.
Definition at line 2887 of file network.h.
Adds Flt sparse attribute with id AttrId
to NodeI
.
Definition at line 2891 of file network.h.
Adds Str sparse attribute with name AttrName
to the given node with id NId
.
Definition at line 1571 of file network.cpp.
Adds Str sparse attribute with id AttrId
to the given node with id NId
.
Definition at line 1578 of file network.cpp.
Adds Str sparse attribute with name AttrName
to NodeI
.
Definition at line 2901 of file network.h.
Adds Str sparse attribute with id AttrId
to NodeI
.
Definition at line 2905 of file network.h.
Adds mapping for sparse attribute with name Name
and type AttrType
.
Definition at line 1783 of file network.cpp.
Adds mapping for sparse attribute with name Name
and type AttrType
.
Definition at line 1657 of file network.cpp.
Attribute based add function for attr to Str value.
Adds the key str value pair to the corresponding edge attribute value vector.
Definition at line 2685 of file network.h.
Definition at line 1098 of file network.cpp.
Attribute based add function for attr to Str value.
Adds the key str value pair to the corresponding node attribute value vector.
Definition at line 2659 of file network.h.
Definition at line 987 of file network.cpp.
int TNEANet::AddStrAttrE | ( | const TStr & | attr, |
TStr | defaultValue = TStr::GetNullStr() |
||
) |
Adds a new Str edge attribute to the hashmap.
Definition at line 1380 of file network.cpp.
int TNEANet::AddStrAttrN | ( | const TStr & | attr, |
TStr | defaultValue = TStr::GetNullStr() |
||
) |
Adds a new Str node attribute to the hashmap.
Definition at line 1303 of file network.cpp.
|
inline |
Appends value onto the TIntV attribute for the given node.
Definition at line 2698 of file network.h.
int TNEANet::AppendIntVAttrDatE | ( | const int & | EId, |
const TInt & | value, | ||
const TStr & | attr, | ||
TBool | UseDense = true |
||
) |
Definition at line 1079 of file network.cpp.
|
inline |
Appends value onto the TIntV attribute for the given node.
Definition at line 2672 of file network.h.
int TNEANet::AppendIntVAttrDatN | ( | const int & | NId, |
const TInt & | value, | ||
const TStr & | attr, | ||
TBool | UseDense = true |
||
) |
Definition at line 940 of file network.cpp.
Returns a vector of attr names for edge EId.
Definition at line 2438 of file network.h.
void TNEANet::AttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 260 of file network.cpp.
Returns a vector of attr names for node NId.
Definition at line 2392 of file network.h.
void TNEANet::AttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 68 of file network.cpp.
Returns a vector of attr values for edge EId.
Definition at line 2442 of file network.h.
void TNEANet::AttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 270 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2396 of file network.h.
void TNEANet::AttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 78 of file network.cpp.
Returns an iterator referring to the first edge's int attribute.
Definition at line 2496 of file network.h.
|
inline |
Returns an iterator referring to the first node's flt attribute.
Definition at line 2382 of file network.h.
Returns an iterator referring to the first node's int attribute.
Definition at line 2306 of file network.h.
Returns an iterator referring to the first node's int attribute.
Definition at line 2316 of file network.h.
Returns an iterator referring to the first node's str attribute.
Definition at line 2372 of file network.h.
|
inline |
Return 1 if in Dense, 0 if in Sparse, -1 if neither.
Definition at line 2083 of file network.h.
|
inline |
Deletes all nodes and edges from the graph.
Definition at line 2627 of file network.h.
|
inline |
Definition at line 2228 of file network.h.
void TNEANet::Defrag | ( | const bool & | OnlyNodeLinks = false | ) |
Defragments the graph.
After performing many node and edge insertions and deletions to a graph, the graph data structure will be fragmented in memory. This function compacts down the graph data structure and frees unneeded memory.
Definition at line 765 of file network.cpp.
Deletes the edge attribute for NodeI.
Definition at line 2771 of file network.h.
int TNEANet::DelAttrDatE | ( | const int & | EId, |
const TStr & | attr | ||
) |
Definition at line 1247 of file network.cpp.
Deletes the node attribute for NodeI.
Definition at line 2768 of file network.h.
int TNEANet::DelAttrDatN | ( | const int & | NId, |
const TStr & | attr | ||
) |
Definition at line 1229 of file network.cpp.
int TNEANet::DelAttrE | ( | const TStr & | attr | ) |
Removes all the values for edge attr.
Definition at line 1447 of file network.cpp.
int TNEANet::DelAttrN | ( | const TStr & | attr | ) |
Removes all the values for node attr.
Definition at line 1418 of file network.cpp.
void TNEANet::DelEdge | ( | const int & | EId | ) |
Deletes an edge with edge ID EId from the graph.
Definition at line 692 of file network.cpp.
void TNEANet::DelEdge | ( | const int & | SrcNId, |
const int & | DstNId, | ||
const bool & | IsDir = true |
||
) |
Deletes all edges between node IDs SrcNId and DstNId from the graph.
If the edge (SrcNId, DstNId) does not exist in the graph function still completes. But the function aborts if SrcNId or DstNId are not nodes in the graph.
Definition at line 720 of file network.cpp.
|
inline |
Deletes value from the TIntV attribute for the given node.
Definition at line 2675 of file network.h.
Definition at line 962 of file network.cpp.
|
virtual |
Deletes node of ID NId from the graph.
If the node of ID NId does not exist the function aborts.
Reimplemented in TModeNet.
Definition at line 531 of file network.cpp.
|
inline |
Deletes node of ID NodeI.GetId() from the graph.
Definition at line 2296 of file network.h.
Deletes sparse attribute with name AttrName
from edge with id EId
.
Definition at line 1753 of file network.cpp.
Deletes sparse attribute with id AttrId
from edge with id EId
.
Definition at line 1760 of file network.cpp.
Deletes sparse attribute with name AttrName
from EdgeI
.
Definition at line 3075 of file network.h.
Deletes sparse attribute with id AttrId
from EdgeI
.
Definition at line 3079 of file network.h.
Deletes sparse attribute with name AttrName
from node with id NId
.
Definition at line 1627 of file network.cpp.
Deletes sparse attribute with id AttrId
from node with id NId
.
Definition at line 1634 of file network.cpp.
Deletes sparse attribute with name AttrName
from NodeI
.
Definition at line 2957 of file network.h.
Deletes sparse attribute with id AttrId
from NodeI
.
Definition at line 2961 of file network.h.
void TNEANet::Dump | ( | FILE * | OutF = stdout | ) | const |
Print the graph in a human readable form to an output stream OutF.
Definition at line 827 of file network.cpp.
bool TNEANet::EdgeAttrIsDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns true if EId attr deleted for current edge attr iterator.
Definition at line 398 of file network.cpp.
bool TNEANet::EdgeAttrIsFltDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns true if EId attr deleted for current edge flt attr iterator.
Definition at line 424 of file network.cpp.
bool TNEANet::EdgeAttrIsIntDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns true if EId attr deleted for current edge int attr iterator.
Definition at line 406 of file network.cpp.
bool TNEANet::EdgeAttrIsIntVDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns true if EId attr deleted for current edge int vector attr iterator.
Definition at line 412 of file network.cpp.
bool TNEANet::EdgeAttrIsStrDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns true if EId attr deleted for current edge str attr iterator.
Definition at line 418 of file network.cpp.
|
inline |
Tests whether the graph is empty (has zero nodes).
Definition at line 2625 of file network.h.
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 2513 of file network.h.
|
inline |
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 2385 of file network.h.
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 2309 of file network.h.
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 2333 of file network.h.
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 2376 of file network.h.
|
inline |
Returns a vector of int attr names for node NId.
Definition at line 2474 of file network.h.
void TNEANet::FltAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 353 of file network.cpp.
Returns a vector of int attr names for node NId.
Definition at line 2429 of file network.h.
void TNEANet::FltAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 161 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2478 of file network.h.
void TNEANet::FltAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TFltV & | Values | ||
) | const |
Definition at line 363 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2433 of file network.h.
void TNEANet::FltAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TFltV & | Values | ||
) | const |
Definition at line 171 of file network.cpp.
void TNEANet::GetAttrENames | ( | TStrV & | IntAttrNames, |
TStrV & | FltAttrNames, | ||
TStrV & | StrAttrNames | ||
) | const |
Fills each of the vectors with the names of edge attributes of the given type.
Definition at line 1495 of file network.cpp.
int TNEANet::GetAttrIndE | ( | const TStr & | attr | ) |
Gets the index of the edge attr value vector specified by attr
.
Definition at line 1225 of file network.cpp.
int TNEANet::GetAttrIndN | ( | const TStr & | attr | ) |
Gets the index of the node attr value vector specified by attr
.
Definition at line 1187 of file network.cpp.
void TNEANet::GetAttrNNames | ( | TStrV & | IntAttrNames, |
TStrV & | FltAttrNames, | ||
TStrV & | StrAttrNames | ||
) | const |
Fills each of the vectors with the names of node attributes of the given type.
Definition at line 1481 of file network.cpp.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 2567 of file network.h.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 2491 of file network.h.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 2530 of file network.h.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 2555 of file network.h.
|
inlineprotected |
|
inlineprotected |
TStr TNEANet::GetEdgeAttrValue | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Returns edge attribute value, converted to Str type.
Definition at line 430 of file network.cpp.
|
inline |
|
inline |
|
inline |
Returns an iterator referring to edge (SrcNId, DstNId) in the graph.
Definition at line 2609 of file network.h.
|
inline |
Returns an edge ID between node IDs SrcNId and DstNId, if such an edge exists. Otherwise, return -1.
Definition at line 2601 of file network.h.
void TNEANet::GetEIdV | ( | TIntV & | EIdV | ) | const |
Gets a vector IDs of all edges in the graph.
Definition at line 758 of file network.cpp.
Gets the value of flt attr from the edge attr value vector.
Definition at line 2741 of file network.h.
Definition at line 1205 of file network.cpp.
Gets the value of flt attr from the node attr value vector.
Definition at line 2708 of file network.h.
Definition at line 1167 of file network.cpp.
Gets the value of a float edge attr specified by edge iterator EdgeI
and the attr index
.
Definition at line 2758 of file network.h.
TFlt TNEANet::GetFltAttrIndDatE | ( | const int & | EId, |
const int & | index | ||
) |
Gets the value of an int edge attr specified by edge ID EId
and the attr index
.
Definition at line 1217 of file network.cpp.
Gets the value of a float node attr specified by node iterator NodeI
and the attr index
.
Definition at line 2730 of file network.h.
TFlt TNEANet::GetFltAttrIndDatN | ( | const int & | NId, |
const int & | index | ||
) |
Gets the value of a float node attr specified by node ID NId
and the attr index
.
Definition at line 1179 of file network.cpp.
int TNEANet::GetFltKeyIdE | ( | const int & | EId | ) |
Gets a list of all edges that have a sparse attribute with name AttrName
.
Definition at line 1775 of file network.cpp.
Gets a list of all edges that have a sparse attribute with id AttrId
.
Definition at line 1779 of file network.cpp.
Gets a list of all nodes that have a sparse attribute with name AttrName
.
Definition at line 1649 of file network.cpp.
Gets a list of all nodes that have a sparse attribute with id AttrId
.
Definition at line 1653 of file network.cpp.
Gets the value of int attr from the edge attr value vector.
Definition at line 2735 of file network.h.
Definition at line 1191 of file network.cpp.
Gets the value of int attr from the node attr value vector.
Definition at line 2701 of file network.h.
Definition at line 1153 of file network.cpp.
Gets the value of an int edge attr specified by edge iterator EdgeI
and the attr index
.
Definition at line 2753 of file network.h.
TInt TNEANet::GetIntAttrIndDatE | ( | const int & | EId, |
const int & | index | ||
) |
Gets the value of an int edge attr specified by edge ID EId
and the attr index
.
Definition at line 1209 of file network.cpp.
Gets the value of an int node attr specified by node iterator NodeI
and the attr index
.
Definition at line 2720 of file network.h.
TInt TNEANet::GetIntAttrIndDatN | ( | const int & | NId, |
const int & | index | ||
) |
Gets the value of an int node attr specified by node ID NId
and the attr index
.
Definition at line 1171 of file network.cpp.
int TNEANet::GetIntAttrIndE | ( | const TStr & | attr | ) |
Gets the index of the edge attr value vector specified by attr
(same as GetAttrIndE for compatibility reasons).
Definition at line 1221 of file network.cpp.
int TNEANet::GetIntAttrIndN | ( | const TStr & | attr | ) |
Gets the index of the node attr value vector specified by attr
(same as GetAttrIndN for compatibility reasons).
Definition at line 1183 of file network.cpp.
Gets the value of the intv attr from the edge attr value vector.
Definition at line 2744 of file network.h.
Definition at line 1195 of file network.cpp.
Gets the value of the intv attr from the node attr value vector.
Definition at line 2711 of file network.h.
Definition at line 1157 of file network.cpp.
|
inline |
|
inline |
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 2388 of file network.h.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 2312 of file network.h.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 2352 of file network.h.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 2379 of file network.h.
|
inline |
void TNEANet::GetNIdV | ( | TIntV & | NIdV | ) | const |
Gets a vector IDs of all nodes in the graph.
Definition at line 751 of file network.cpp.
|
inlineprotected |
|
inlineprotected |
TStr TNEANet::GetNodeAttrValue | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns node attribute value, converted to Str type.
Definition at line 246 of file network.cpp.
|
inline |
Returns an interator referring to a random edge in the graph.
Definition at line 2618 of file network.h.
Returns an ID of a random edge in the graph.
Definition at line 2616 of file network.h.
Returns an interator referring to a random node in the graph.
Definition at line 2614 of file network.h.
Returns an ID of a random node in the graph.
Definition at line 2612 of file network.h.
Gets Int sparse attribute with name AttrName
from edge with id EId
.
Definition at line 1711 of file network.cpp.
Gets Int sparse attribute with id AttrId
from edge with id EId
.
Definition at line 1718 of file network.cpp.
Gets Int sparse attribute with name AttrName
from EdgeI
.
Definition at line 3033 of file network.h.
Gets Int sparse attribute with id AttrId
from EdgeI
.
Definition at line 3037 of file network.h.
Gets Flt sparse attribute with name AttrName
from edge with id EId
.
Definition at line 1725 of file network.cpp.
Gets Flt sparse attribute with id AttrId
from edge with id EId
.
Definition at line 1732 of file network.cpp.
Gets Flt sparse attribute with name AttrName
from EdgeI
.
Definition at line 3047 of file network.h.
Gets Flt sparse attribute with id AttrId
from EdgeI
.
Definition at line 3051 of file network.h.
Gets Str sparse attribute with name AttrName
from edge with id EId
.
Definition at line 1739 of file network.cpp.
Gets Str sparse attribute with id AttrId
from edge with id EId
.
Definition at line 1746 of file network.cpp.
Gets Str sparse attribute with name AttrName
from EdgeI
.
Definition at line 3061 of file network.h.
Gets Str sparse attribute with id AttrId
from EdgeI
.
Definition at line 3065 of file network.h.
Gets Int sparse attribute with name AttrName
from node with id NId
.
Definition at line 1585 of file network.cpp.
Gets Int sparse attribute with id AttrId
from node with id NId
.
Definition at line 1592 of file network.cpp.
Gets Int sparse attribute with name AttrName
from NodeI
.
Definition at line 2915 of file network.h.
Gets Int sparse attribute with id AttrId
from NodeI
.
Definition at line 2919 of file network.h.
Gets Flt sparse attribute with name AttrName
from node with id NId
.
Definition at line 1599 of file network.cpp.
Gets Flt sparse attribute with id AttrId
from node with id NId
.
Definition at line 1606 of file network.cpp.
Gets Flt sparse attribute with name AttrName
from NodeI
.
Definition at line 2929 of file network.h.
Gets Flt sparse attribute with id AttrId
from NodeI
.
Definition at line 2933 of file network.h.
Gets Str sparse attribute with name AttrName
from node with id NId
.
Definition at line 1613 of file network.cpp.
Gets Str sparse attribute with id AttrId
from node with id NId
.
Definition at line 1620 of file network.cpp.
Gets Str sparse attribute with name AttrName
from NodeI
.
Definition at line 2943 of file network.h.
Gets Str sparse attribute with id AttrId
from NodeI
.
Definition at line 2947 of file network.h.
Gets id and type for attribute with name Name
.
Definition at line 1787 of file network.cpp.
Gets id and type for attribute with name Name
.
Definition at line 1661 of file network.cpp.
Gets name and type for attribute with id AttrId
.
Definition at line 1791 of file network.cpp.
Gets name and type for attribute with id AttrId
.
Definition at line 1665 of file network.cpp.
Gets a list of all sparse attributes of type AttrType
for edge with id EId
.
Definition at line 1767 of file network.cpp.
|
inline |
Gets a list of all sparse attributes of type AttrType
for EdgeI
.
Definition at line 3085 of file network.h.
Gets a list of all sparse attributes of type AttrType
for node with id NId
.
Definition at line 1641 of file network.cpp.
|
inline |
Gets a list of all sparse attributes of type AttrType
for NodeI
.
Definition at line 2968 of file network.h.
|
static |
Returns a small multigraph on 5 nodes and 6 edges.
/// Edges: 0 -> 1, 0 -> 2, 0 -> 3, 0 -> 4, 1 -> 2, 1 -> 2 ///
Definition at line 1472 of file network.cpp.
Gets the value of str attr from the edge attr value vector.
Definition at line 2738 of file network.h.
Definition at line 1201 of file network.cpp.
Gets the value of str attr from the node attr value vector.
Definition at line 2705 of file network.h.
Definition at line 1163 of file network.cpp.
Gets Str edge attribute val. If not a proper attr, return default.
Definition at line 2021 of file network.h.
Gets Str node attribute val. If not a proper attr, return default.
Definition at line 2015 of file network.h.
Gets the value of a string edge attr specified by edge iterator EdgeI
and the attr index
.
Definition at line 2763 of file network.h.
TStr TNEANet::GetStrAttrIndDatE | ( | const int & | EId, |
const int & | index | ||
) |
Gets the value of an int edge attr specified by edge ID EId
and the attr index
.
Definition at line 1213 of file network.cpp.
Gets the value of a string node attr specified by node iterator NodeI
and the attr index
.
Definition at line 2725 of file network.h.
TStr TNEANet::GetStrAttrIndDatN | ( | const int & | NId, |
const int & | index | ||
) |
Gets the value of a string node attr specified by node ID NId
and the attr index
.
Definition at line 1175 of file network.cpp.
Gets the sum of the weights of all the outgoing edges of the node.
Definition at line 1509 of file network.cpp.
Fills OutWeights with the outgoing weight from each node.
Definition at line 1520 of file network.cpp.
bool TNEANet::HasFlag | ( | const TGraphFlag & | Flag | ) | const |
Allows for run-time checking the type of the graph (see the TGraphFlag for flags).
Definition at line 46 of file network.cpp.
Returns a vector of int attr names for edge EId.
Definition at line 2446 of file network.h.
void TNEANet::IntAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 280 of file network.cpp.
Returns a vector of int attr names for node NId.
Definition at line 2401 of file network.h.
void TNEANet::IntAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 88 of file network.cpp.
Returns a vector of attr values for edge EId.
Definition at line 2450 of file network.h.
void TNEANet::IntAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TIntV & | Values | ||
) | const |
Definition at line 290 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2405 of file network.h.
void TNEANet::IntAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TIntV & | Values | ||
) | const |
Definition at line 98 of file network.cpp.
Returns a vector of int attr names for edge EId.
Definition at line 2456 of file network.h.
void TNEANet::IntVAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 301 of file network.cpp.
Returns a vector of int attr names for node NId.
Definition at line 2411 of file network.h.
void TNEANet::IntVAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 109 of file network.cpp.
Returns a vector of attr values for edge EId.
Definition at line 2460 of file network.h.
void TNEANet::IntVAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TVec< TIntV > & | Values | ||
) | const |
Definition at line 311 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2415 of file network.h.
void TNEANet::IntVAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TVec< TIntV > & | Values | ||
) | const |
Definition at line 119 of file network.cpp.
bool TNEANet::IsAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Returns true if attr
exists for edge EId
and has default value.
Definition at line 374 of file network.cpp.
bool TNEANet::IsAttrDeletedN | ( | const int & | NId, |
const TStr & | attr | ||
) | const |
Returns true if attr
exists for node NId
and has default value.
Definition at line 182 of file network.cpp.
|
inline |
|
inline |
Tests whether an edge between node IDs SrcNId and DstNId exists in the graph.
Definition at line 2597 of file network.h.
bool TNEANet::IsEdge | ( | const int & | SrcNId, |
const int & | DstNId, | ||
int & | EId, | ||
const bool & | IsDir = true |
||
) | const |
Tests whether an edge between node IDs SrcNId and DstNId exists in the graph. if an edge exists, return its edge ID in EId.
Definition at line 730 of file network.cpp.
bool TNEANet::IsFltAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Returns true if Flt attr
exists for edge NId
and has default value.
Definition at line 394 of file network.cpp.
bool TNEANet::IsFltAttrDeletedN | ( | const int & | NId, |
const TStr & | attr | ||
) | const |
Returns true if Flt attr
exists for node NId
and has default value.
Definition at line 202 of file network.cpp.
bool TNEANet::IsFltAttrE | ( | const TStr & | attr | ) |
Checks if there is an edge attribute with name attr.
Definition at line 1528 of file network.cpp.
bool TNEANet::IsIntAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Returns true if Int attr
exists for edge EId
and has default value.
Definition at line 382 of file network.cpp.
bool TNEANet::IsIntAttrDeletedN | ( | const int & | NId, |
const TStr & | attr | ||
) | const |
Returns true if Int attr
exists for node NId
and has default value.
Definition at line 190 of file network.cpp.
bool TNEANet::IsIntAttrE | ( | const TStr & | attr | ) |
Checks if there is an edge attribute with name attr.
Definition at line 1533 of file network.cpp.
bool TNEANet::IsIntVAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Returns true if IntV attr
exists for edge EId
and is an empty vector.
Definition at line 386 of file network.cpp.
bool TNEANet::IsIntVAttrDeletedN | ( | const int & | NId, |
const TStr & | attr | ||
) | const |
Returns true if IntV attr
exists for node NId
and is an empty vector.
Definition at line 194 of file network.cpp.
|
inline |
bool TNEANet::IsOk | ( | const bool & | ThrowExcept = true | ) | const |
Checks the graph data structure for internal consistency.
For each node in the graph check that its neighbors are also nodes in the graph.
Definition at line 774 of file network.cpp.
bool TNEANet::IsStrAttrDeletedE | ( | const int & | EId, |
const TStr & | attr | ||
) | const |
Returns true if Str attr
exists for edge NId
and has default value.
Definition at line 390 of file network.cpp.
bool TNEANet::IsStrAttrDeletedN | ( | const int & | NId, |
const TStr & | attr | ||
) | const |
Returns true if Str attr
exists for node NId
and has default value.
Definition at line 198 of file network.cpp.
bool TNEANet::IsStrAttrE | ( | const TStr & | attr | ) |
Checks if there is an edge attribute with name attr.
Definition at line 1538 of file network.cpp.
Static constructor that loads the graph from a stream SIn and returns a pointer to it.
Definition at line 2182 of file network.h.
Static constructor that loads the graph from a stream SIn and returns a pointer to it. Backwards compatible.
Definition at line 2184 of file network.h.
Static constructor that loads the graph from a stream SIn and returns a pointer to it. Backwards compatible without Sparse.
Definition at line 2199 of file network.h.
void TNEANet::LoadNetworkShM | ( | TShMIn & | ShMIn | ) |
load network from shared memory for this network
Definition at line 2 of file network.cpp.
Static constructor that loads the network from memory.
The object is read-only. It does not support operations that edit the edge vectors of nodes or perform illegal operations on the NodeH, EdgeH (deletion or swapping keys).
Definition at line 2222 of file network.h.
|
inlinestatic |
Static cons returns pointer to graph. Ex: PNEANet Graph=TNEANet::New().
Definition at line 2176 of file network.h.
|
inlinestatic |
Static constructor that returns a pointer to the graph and reserves enough memory for Nodes nodes and Edges edges.
Call: PNEANet Net = TNEANet::New(Nodes, Edges).
Definition at line 2180 of file network.h.
bool TNEANet::NodeAttrIsDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns true if NId attr deleted for current node attr iterator.
Definition at line 206 of file network.cpp.
bool TNEANet::NodeAttrIsFltDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns true if NId attr deleted value for current node flt attr iterator.
Definition at line 238 of file network.cpp.
bool TNEANet::NodeAttrIsIntDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns true if NId attr deleted value for current node int attr iterator.
Definition at line 214 of file network.cpp.
bool TNEANet::NodeAttrIsIntVDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns true if NId attr deleted value for current node int vector attr iterator.
Definition at line 222 of file network.cpp.
bool TNEANet::NodeAttrIsStrDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Returns true if NId attr deleted value for current node str attr iterator.
Definition at line 230 of file network.cpp.
|
inline |
|
inline |
Saves the graph to a (binary) stream SOut. Expects data structures for sparse attributes.
Definition at line 2140 of file network.h.
|
inline |
Saves the graph to a (binary) stream SOut. Available for backwards compatibility.
Definition at line 2154 of file network.h.
|
inline |
Saves the graph without any sparse data structures. Available for backwards compatibility.
Definition at line 2164 of file network.h.
Returns a vector of str attr names for node NId.
Definition at line 2466 of file network.h.
void TNEANet::StrAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 332 of file network.cpp.
Returns a vector of str attr names for node NId.
Definition at line 2421 of file network.h.
void TNEANet::StrAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 140 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2470 of file network.h.
void TNEANet::StrAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 342 of file network.cpp.
Returns a vector of attr values for node NId.
Definition at line 2425 of file network.h.
void TNEANet::StrAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 150 of file network.cpp.
|
protected |
|
protected |