SNAP Library 6.0, Developer Reference
2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Directed multigraph with node edge attributes. More...
#include <networkmp.h>
Classes | |
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 | 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 TNEANetMP | TNet |
typedef TPt< TNEANetMP > | PNet |
Public Member Functions | |
TNEANetMP () | |
TNEANetMP (const int &Nodes, const int &Edges) | |
Constructor that reserves enough memory for a graph of nodes and edges. More... | |
TNEANetMP (const TNEANetMP &Graph) | |
TNEANetMP (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. More... | |
bool | HasFlag (const TGraphFlag &Flag) const |
Allows for run-time checking the type of the graph (see the TGraphFlag for flags). More... | |
TNEANetMP & | operator= (const TNEANetMP &Graph) |
int | GetNodes () const |
Returns the number of nodes in the graph. More... | |
void | SetNodes (const int &Length) |
Sets the number of nodes in the graph. More... | |
int | AddNode (int NId=-1) |
Adds a node of ID NId to the graph. More... | |
int | AddNode (const TNodeI &NodeId) |
Adds a node of ID NodeI.GetId() to the graph. More... | |
void | AddNodeWithEdges (const TInt &NId, TIntV &InEIdV, TIntV &OutEIdV) |
Adds a node along with its neighbor edges. More... | |
bool | IsNode (const int &NId) const |
If the node of ID NId does not exist the function aborts. 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... | |
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 | 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 | 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... | |
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 | Reserved () const |
Returns the number of nodes reserved in the network. More... | |
int | ReservedE () const |
Returns the number of edges reserved in the network. More... | |
int | GetEdges () const |
Returns the number of edges in the graph. More... | |
void | SetEdges (const int &Length) |
Sets the number of edges in the graph. More... | |
void | SetMxEId (const TInt &Id) |
Sets the MaxEId. Used since AddEdgeUnchecked doesn't affect EId for efficiency. 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 | AddEdgeUnchecked (const TInt &EId, const int SrcNId, const int DstNId) |
Adds an edge without checking its adjacent nodes' neighborhood. 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 | ReserveAttr (const int &NIntAttr, const int &NFltAttr, const int &NStrAttr, const int &EIntAttr, const int &EFltAttr, const int &EStrAttr) |
Reserves memory for dense attributes. More... | |
void | Defrag (const bool &OnlyNodeLinks=false) |
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 &NodeId, 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 &NodeId, 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 &NodeId, 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 | AddIntAttrDatE (const TEdgeI &EdgeId, 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 &EdgeId, 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 &EdgeId, 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) |
TInt | GetIntAttrDatN (const TNodeI &NodeId, 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 &NodeId, 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 &NodeId, const TStr &attr) |
Gets the value of flt attr from the node attr value vector. More... | |
TFlt | GetFltAttrDatN (const int &NId, const TStr &attr) |
int | GetIntAttrIndN (const TStr &attr) |
Gets the index of the node attr value vector specified by str attr. More... | |
TInt | GetIntAttrIndDatN (const TNodeI &NodeId, const int &index) |
Gets the value of node int attr specified by the attr index. More... | |
TInt | GetIntAttrIndDatN (const int &NId, const int &index) |
TInt | GetIntAttrDatE (const TEdgeI &EdgeId, 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 &EdgeId, 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 &EdgeId, const TStr &attr) |
Gets the value of flt attr from the edge attr value vector. More... | |
TFlt | GetFltAttrDatE (const int &EId, const TStr &attr) |
int | GetIntAttrIndE (const TStr &attr) |
Gets the index of the edge attr value vector specified by str attr. More... | |
TInt | GetIntAttrIndDatE (const TEdgeI &EdgeId, const int &index) |
Gets the value of edge int attr specified by the attr index. More... | |
TInt | GetIntAttrIndDatE (const int &EId, const int &index) |
int | DelAttrDatN (const TNodeI &NodeId, const TStr &attr) |
Deletes the node attribute for NodeId. More... | |
int | DelAttrDatN (const int &NId, const TStr &attr) |
int | DelAttrDatE (const TEdgeI &EdgeId, const TStr &attr) |
Deletes the edge attribute for NodeId. 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 | 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... | |
bool | NodeAttrIsDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
bool | NodeAttrIsIntDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
bool | NodeAttrIsStrDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
bool | NodeAttrIsFltDeleted (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
bool | EdgeAttrIsDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
bool | EdgeAttrIsIntDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
bool | EdgeAttrIsStrDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
bool | EdgeAttrIsFltDeleted (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
TStr | GetNodeAttrValue (const int &NId, const TStrIntPrH::TIter &NodeHI) const |
TStr | GetEdgeAttrValue (const int &EId, const TStrIntPrH::TIter &EdgeHI) const |
TFlt | GetWeightOutEdges (const TNodeI &NI, const TStr &attr) |
bool | IsFltAttrE (const TStr &attr) |
bool | IsIntAttrE (const TStr &attr) |
bool | IsStrAttrE (const TStr &attr) |
TVec< TFlt > & | GetFltAttrVecE (const TStr &attr) |
int | GetFltKeyIdE (const int &EId) |
void | GetWeightOutEdgesV (TFltV &OutWeights, const TFltV &AttrVal) |
Static Public Member Functions | |
static PNEANetMP | New () |
Static cons returns pointer to graph. Ex: PNEANetMP Graph=TNEANetMP::New(). More... | |
static PNEANetMP | 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 PNEANetMP | Load (TSIn &SIn) |
Static constructor that loads the graph from a stream SIn and returns a pointer to it. More... | |
Private Types | |
enum | { IntType, StrType, FltType } |
Private 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 |
TInt | GetIntAttrDefaultN (const TStr &attribute) const |
Get Int node attribute val. If not a proper attr, return default. More... | |
TStr | GetStrAttrDefaultN (const TStr &attribute) const |
Get Str node attribute val. If not a proper attr, return default. More... | |
TFlt | GetFltAttrDefaultN (const TStr &attribute) const |
Get Flt node attribute val. If not a proper attr, return default. More... | |
TInt | GetIntAttrDefaultE (const TStr &attribute) const |
Get Int edge attribute val. If not a proper attr, return default. More... | |
TStr | GetStrAttrDefaultE (const TStr &attribute) const |
Get Str edge attribute val. If not a proper attr, return default. More... | |
TFlt | GetFltAttrDefaultE (const TStr &attribute) const |
Get Flt edge attribute val. If not a proper attr, return default. More... | |
Private Attributes | |
TCRef | CRef |
TInt | MxNId |
TInt | MxEId |
THashMP< TInt, TNode > | NodeH |
THashMP< TInt, TEdge > | EdgeH |
TStrIntPrH | KeyToIndexTypeN |
KeyToIndexType[N|E]: Key->(Type,Index). More... | |
TStrIntPrH | KeyToIndexTypeE |
THashMP< TStr, TInt > | IntDefaultsN |
THashMP< TStr, TInt > | IntDefaultsE |
THashMP< TStr, TStr > | StrDefaultsN |
THashMP< TStr, TStr > | StrDefaultsE |
THashMP< TStr, TFlt > | FltDefaultsN |
THashMP< TStr, TFlt > | FltDefaultsE |
TVec< TIntV > | VecOfIntVecsN |
TVec< TIntV > | VecOfIntVecsE |
TVec< TStrV > | VecOfStrVecsN |
TVec< TStrV > | VecOfStrVecsE |
TVec< TFltV > | VecOfFltVecsN |
TVec< TFltV > | VecOfFltVecsE |
Friends | |
class | TPt< TNEANetMP > |
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.
Definition at line 27 of file networkmp.h.
typedef TPt<TNEANetMP> TNEANetMP::PNet |
Definition at line 30 of file networkmp.h.
typedef TNEANetMP TNEANetMP::TNet |
Definition at line 29 of file networkmp.h.
|
private |
Enumerator | |
---|---|
IntType | |
StrType | |
FltType |
Definition at line 280 of file networkmp.h.
|
inline |
Definition at line 282 of file networkmp.h.
Referenced by Load(), and New().
|
inlineexplicit |
Constructor that reserves enough memory for a graph of nodes and edges.
Definition at line 288 of file networkmp.h.
References Reserve().
|
inline |
Definition at line 294 of file networkmp.h.
|
inline |
Constructor for loading the graph from a (binary) stream SIn.
Definition at line 300 of file networkmp.h.
int TNEANetMP::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 388 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::AddSorted(), EdgeH, FltDefaultsE, TStr::Fmt(), THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), GetIntAttrDefaultE(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), THashMP< TKey, TDat, THashFunc >::GetKeyV(), GetNode(), TStr::GetNullStr(), GetStrAttrDefaultE(), IAssertR, TNEANetMP::TNode::InEIdV, TVec< TVal, TSizeTy >::Ins(), IntDefaultsE, IsEdge(), IsNode(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), TInt::Mn, TFlt::Mn, TMath::Mx(), MxEId, NodeH, TNEANetMP::TNode::OutEIdV, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
|
inline |
Adds an edge between EdgeI.GetSrcNId() and EdgeI.GetDstNId() to the graph.
Definition at line 510 of file networkmp.h.
References AddEdge(), TNEANetMP::TEdgeI::GetDstNId(), TNEANetMP::TEdgeI::GetId(), and TNEANetMP::TEdgeI::GetSrcNId().
Referenced by AddEdge().
void TNEANetMP::AddEdgeUnchecked | ( | const TInt & | EId, |
const int | SrcNId, | ||
const int | DstNId | ||
) |
Adds an edge without checking its adjacent nodes' neighborhood.
Definition at line 438 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddKey13(), EdgeH, TInt::GetPrimHashCd(), TMath::Mx(), MxEId, and ReservedE().
|
inline |
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 616 of file networkmp.h.
References AddFltAttrDatE(), and TNEANetMP::TEdgeI::GetId().
Referenced by AddFltAttrDatE().
Definition at line 758 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), EdgeH, FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), MxEId, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
|
inline |
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 600 of file networkmp.h.
References AddFltAttrDatN(), and TNEANetMP::TNodeI::GetId().
Referenced by AddFltAttrDatN().
Definition at line 686 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultN(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), THash< TKey, TDat, THashFunc >::IsKey(), IsNode(), KeyToIndexTypeN, TVec< TVal, TSizeTy >::Len(), MxNId, NodeH, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsN.
Adds a new Flt edge attribute to the hashmap.
Definition at line 956 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), FltDefaultsE, FltType, TVec< TVal, TSizeTy >::Ins(), THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, VecOfFltVecsE, and VecOfStrVecsE.
Adds a new Flt node attribute to the hashmap.
Definition at line 897 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), FltDefaultsN, FltType, TVec< TVal, TSizeTy >::Ins(), THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeN, MxNId, VecOfFltVecsN, and VecOfStrVecsN.
|
inline |
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 606 of file networkmp.h.
References AddIntAttrDatE(), and TNEANetMP::TEdgeI::GetId().
Referenced by AddIntAttrDatE().
Definition at line 711 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), EdgeH, THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), IntType, IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), TInt::Mn, MxEId, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
|
inline |
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 590 of file networkmp.h.
References AddIntAttrDatN(), and TNEANetMP::TNodeI::GetId().
Referenced by AddIntAttrDatN().
Definition at line 640 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::Ins(), IntType, THash< TKey, TDat, THashFunc >::IsKey(), IsNode(), KeyToIndexTypeN, TVec< TVal, TSizeTy >::Len(), TInt::Mn, MxNId, NodeH, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsN.
Adds a new Int edge attribute to the hashmap.
Definition at line 917 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), IntDefaultsE, IntType, THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, TVec< TVal, TSizeTy >::Len(), MxEId, and VecOfIntVecsE.
Adds a new Int node attribute to the hashmap.
Definition at line 859 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), IntDefaultsN, IntType, THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeN, TVec< TVal, TSizeTy >::Len(), MxNId, and VecOfIntVecsN.
int TNEANetMP::AddNode | ( | int | NId = -1 | ) |
Adds a node of ID NId to the graph.
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 271 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddDat(), FltDefaultsN, TStr::Fmt(), THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultN(), GetIntAttrDefaultN(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), THashMP< TKey, TDat, THashFunc >::GetKeyV(), TStr::GetNullStr(), GetStrAttrDefaultN(), IAssertR, TVec< TVal, TSizeTy >::Ins(), IntDefaultsN, IsNode(), KeyToIndexTypeN, TVec< TVal, TSizeTy >::Len(), TInt::Mn, TFlt::Mn, TMath::Mx(), MxNId, NodeH, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsN, VecOfIntVecsN, and VecOfStrVecsN.
|
inline |
Adds a node of ID NodeI.GetId() to the graph.
Definition at line 340 of file networkmp.h.
References AddNode(), and TNEANetMP::TNodeI::GetId().
Referenced by AddNode().
Adds a node along with its neighbor edges.
Definition at line 319 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddKey13(), TInt::GetPrimHashCd(), TMath::Mx(), MxNId, NodeH, and Reserved().
|
inline |
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 611 of file networkmp.h.
References AddStrAttrDatE(), and TNEANetMP::TEdgeI::GetId().
Referenced by AddStrAttrDatE().
Definition at line 735 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), EdgeH, THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TStr::GetNullStr(), TVec< TVal, TSizeTy >::Ins(), IsEdge(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, StrType, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
|
inline |
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 595 of file networkmp.h.
References AddStrAttrDatN(), and TNEANetMP::TNodeI::GetId().
Referenced by AddStrAttrDatN().
Definition at line 663 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TStr::GetNullStr(), TVec< TVal, TSizeTy >::Ins(), THash< TKey, TDat, THashFunc >::IsKey(), IsNode(), KeyToIndexTypeN, MxNId, NodeH, StrType, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsN.
int TNEANetMP::AddStrAttrE | ( | const TStr & | attr, |
TStr | defaultValue = TStr::GetNullStr() |
||
) |
Adds a new Str edge attribute to the hashmap.
Definition at line 937 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, MxEId, StrDefaultsE, StrType, and VecOfStrVecsE.
int TNEANetMP::AddStrAttrN | ( | const TStr & | attr, |
TStr | defaultValue = TStr::GetNullStr() |
||
) |
Adds a new Str node attribute to the hashmap.
Definition at line 878 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Ins(), THashMP< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeN, MxNId, StrDefaultsN, StrType, and VecOfStrVecsN.
Returns a vector of attr names for edge EId.
Definition at line 419 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TEdgeI::GetAttrNames().
void TNEANetMP::AttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 149 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsDeleted(), THashKeyDatI< TKey, TDat >::GetKey(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of attr names for node NId.
Definition at line 386 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TNodeI::GetAttrNames().
void TNEANetMP::AttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 27 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashKeyDatI< TKey, TDat >::GetKey(), THashKeyDatI< TKey, TDat >::IsEnd(), and NodeAttrIsDeleted().
Returns a vector of attr values for edge EId.
Definition at line 423 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TEdgeI::GetAttrVal().
void TNEANetMP::AttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 159 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsDeleted(), GetNodeAttrValue(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of attr values for node NId.
Definition at line 390 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TNodeI::GetAttrVal().
void TNEANetMP::AttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 37 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), GetNodeAttrValue(), THashKeyDatI< TKey, TDat >::IsEnd(), and NodeAttrIsDeleted().
Returns an iterator referring to the first edge's flt attribute.
Definition at line 475 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the first edge's int attribute.
Definition at line 452 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the first edge's str attribute.
Definition at line 464 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an iterator referring to the first edge in the graph.
Definition at line 530 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and GetWeightOutEdgesV().
Returns an iterator referring to the first node's flt attribute.
Definition at line 376 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the first node's int attribute.
Definition at line 358 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the first node's str attribute.
Definition at line 367 of file networkmp.h.
References TVec< TVal, TSizeTy >::BegI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an iterator referring to the first node in the graph.
Definition at line 352 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::BegI().
Referenced by Dump().
|
inline |
Deletes all nodes and edges from the graph.
Definition at line 554 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Clr(), THash< TKey, TDat, THashFunc >::Clr(), and TVec< TVal, TSizeTy >::Clr().
void TNEANetMP::Defrag | ( | const bool & | OnlyNodeLinks = false | ) |
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 515 of file networkmp.cpp.
References EdgeH, THashMP< TKey, TDat, THashFunc >::FFirstKeyId(), THashMP< TKey, TDat, THashFunc >::FNextKeyId(), TNEANetMP::TNode::InEIdV, NodeH, TNEANetMP::TNode::OutEIdV, and TVec< TVal, TSizeTy >::Pack().
Deletes the edge attribute for NodeId.
Definition at line 656 of file networkmp.h.
References DelAttrDatE(), and TNEANetMP::TEdgeI::GetId().
Referenced by DelAttrDatE().
int TNEANetMP::DelAttrDatE | ( | const int & | EId, |
const TStr & | attr | ||
) |
Definition at line 844 of file networkmp.cpp.
References EdgeH, FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultE(), GetIntAttrDefaultE(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultE(), IntType, KeyToIndexTypeE, StrType, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
Deletes the node attribute for NodeId.
Definition at line 653 of file networkmp.h.
References DelAttrDatN(), and TNEANetMP::TNodeI::GetId().
Referenced by DelAttrDatN().
int TNEANetMP::DelAttrDatN | ( | const int & | NId, |
const TStr & | attr | ||
) |
Definition at line 830 of file networkmp.cpp.
References FltType, THash< TKey, TDat, THashFunc >::GetDat(), GetFltAttrDefaultN(), GetIntAttrDefaultN(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultN(), IntType, KeyToIndexTypeN, NodeH, StrType, TPair< TVal1, TVal2 >::Val2, VecOfFltVecsN, VecOfIntVecsN, and VecOfStrVecsN.
void TNEANetMP::Dump | ( | FILE * | OutF = stdout | ) | const |
Print the graph in a human readable form to an output stream OutF.
Definition at line 579 of file networkmp.cpp.
References BegEI(), BegNI(), edge, EndEI(), EndNI(), FltAttrValueEI(), FltAttrValueNI(), GetEdges(), GetNodes(), IntAttrValueEI(), IntAttrValueNI(), TVec< TVal, TSizeTy >::Len(), StrAttrValueEI(), and StrAttrValueNI().
bool TNEANetMP::EdgeAttrIsDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Definition at line 232 of file networkmp.cpp.
References EdgeAttrIsFltDeleted(), EdgeAttrIsIntDeleted(), and EdgeAttrIsStrDeleted().
Referenced by AttrNameEI(), and AttrValueEI().
bool TNEANetMP::EdgeAttrIsFltDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Definition at line 251 of file networkmp.cpp.
References EdgeH, FltType, THashKeyDatI< TKey, TDat >::GetDat(), GetFltAttrDefaultE(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), and VecOfFltVecsE.
Referenced by EdgeAttrIsDeleted(), FltAttrNameEI(), and FltAttrValueEI().
bool TNEANetMP::EdgeAttrIsIntDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Definition at line 239 of file networkmp.cpp.
References EdgeH, THashKeyDatI< TKey, TDat >::GetDat(), GetIntAttrDefaultE(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), IntType, and VecOfIntVecsE.
Referenced by EdgeAttrIsDeleted(), IntAttrNameEI(), and IntAttrValueEI().
bool TNEANetMP::EdgeAttrIsStrDeleted | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Definition at line 245 of file networkmp.cpp.
References EdgeH, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultE(), StrType, and VecOfStrVecsE.
Referenced by EdgeAttrIsDeleted(), StrAttrNameEI(), and StrAttrValueEI().
|
inline |
Tests whether the graph is empty (has zero nodes).
Definition at line 552 of file networkmp.h.
References GetNodes().
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 479 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 456 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the past-the-end edge's attribute.
Definition at line 467 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an iterator referring to the past-the-end edge in the graph.
Definition at line 532 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::EndI().
Referenced by Dump(), and GetWeightOutEdgesV().
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 379 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 361 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the past-the-end node's attribute.
Definition at line 370 of file networkmp.h.
References TVec< TVal, TSizeTy >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an iterator referring to the past-the-end node in the graph.
Definition at line 354 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::EndI().
Referenced by Dump().
Returns a vector of int attr names for node NId.
Definition at line 443 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TEdgeI::GetFltAttrNames().
void TNEANetMP::FltAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 211 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsFltDeleted(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of int attr names for node NId.
Definition at line 410 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TNodeI::GetFltAttrNames().
void TNEANetMP::FltAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 89 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashKeyDatI< TKey, TDat >::IsEnd(), and NodeAttrIsFltDeleted().
Returns a vector of attr values for node NId.
Definition at line 447 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TEdgeI::GetFltAttrVal().
void TNEANetMP::FltAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TFltV & | Values | ||
) | const |
Definition at line 221 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsFltDeleted(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), TVec< TVal, TSizeTy >::GetVal(), THashKeyDatI< TKey, TDat >::IsEnd(), and VecOfFltVecsE.
Returns a vector of attr values for node NId.
Definition at line 414 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TNodeI::GetFltAttrVal().
void TNEANetMP::FltAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TFltV & | Values | ||
) | const |
Definition at line 99 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), FltType, THashKeyDatI< TKey, TDat >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), THashKeyDatI< TKey, TDat >::IsEnd(), NodeAttrIsFltDeleted(), NodeH, and VecOfFltVecsN.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 483 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 460 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the edge of ID EId in the graph.
Definition at line 471 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
|
inlineprivate |
Definition at line 250 of file networkmp.h.
References EdgeH, and THashMP< TKey, TDat, THashFunc >::GetDat().
Referenced by TNEANetMP::TNodeI::GetInNId(), TNEANetMP::TNodeI::GetNbrNId(), TNEANetMP::TNodeI::GetOutNId(), IsEdge(), and TNEANetMP::TNodeI::IsInNId().
|
inlineprivate |
Definition at line 251 of file networkmp.h.
References EdgeH, and THashMP< TKey, TDat, THashFunc >::GetDat().
TStr TNEANetMP::GetEdgeAttrValue | ( | const int & | EId, |
const TStrIntPrH::TIter & | EdgeHI | ||
) | const |
Definition at line 257 of file networkmp.cpp.
References EdgeH, FltType, THashKeyDatI< TKey, TDat >::GetDat(), THash< TKey, TDat, THashFunc >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TStr::GetNullStr(), TStr::GetStr(), TVec< TVal, TSizeTy >::GetVal(), IntType, KeyToIndexTypeE, StrType, VecOfFltVecsE, VecOfIntVecsE, and VecOfStrVecsE.
|
inline |
Returns the number of edges in the graph.
Definition at line 497 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Len().
Referenced by Dump(), and GetEIdV().
|
inline |
Returns an iterator referring to edge with edge ID EId.
Definition at line 534 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetI().
Referenced by GetRndEI().
|
inline |
Returns an iterator referring to edge (SrcNId, DstNId) in the graph.
Definition at line 536 of file networkmp.h.
References GetEI(), and GetEId().
Referenced by GetEI().
|
inline |
Returns an edge ID between node IDs SrcNId and DstNId, if such an edge exists. Otherwise, return -1.
Definition at line 528 of file networkmp.h.
References IsEdge().
Referenced by GetEI().
void TNEANetMP::GetEIdV | ( | TIntV & | EIdV | ) | const |
Gets a vector IDs of all edges in the graph.
Definition at line 508 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeH, THashMP< TKey, TDat, THashFunc >::FFirstKeyId(), THashMP< TKey, TDat, THashFunc >::FNextKeyId(), TVec< TVal, TSizeTy >::Gen(), GetEdges(), and THashMP< TKey, TDat, THashFunc >::GetKey().
Gets the value of flt attr from the edge attr value vector.
Definition at line 643 of file networkmp.h.
References GetFltAttrDatE(), and TNEANetMP::TEdgeI::GetId().
Referenced by GetFltAttrDatE(), and GetWeightOutEdges().
Definition at line 826 of file networkmp.cpp.
References EdgeH, THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
Gets the value of flt attr from the node attr value vector.
Definition at line 627 of file networkmp.h.
References GetFltAttrDatN(), and TNEANetMP::TNodeI::GetId().
Referenced by GetFltAttrDatN().
Definition at line 806 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeN, NodeH, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsN.
Get Flt edge attribute val. If not a proper attr, return default.
Definition at line 264 of file networkmp.h.
References FltDefaultsE, THashMP< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::IsKey(), and TFlt::Mn.
Referenced by AddEdge(), AddFltAttrDatE(), DelAttrDatE(), EdgeAttrIsFltDeleted(), and TNEANetMP::TAFltI::IsDeleted().
Get Flt node attribute val. If not a proper attr, return default.
Definition at line 258 of file networkmp.h.
References FltDefaultsN, THashMP< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::IsKey(), and TFlt::Mn.
Referenced by AddFltAttrDatN(), AddNode(), DelAttrDatN(), TNEANetMP::TAFltI::IsDeleted(), and NodeAttrIsFltDeleted().
Definition at line 782 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfFltVecsE.
int TNEANetMP::GetFltKeyIdE | ( | const int & | EId | ) |
Definition at line 786 of file networkmp.cpp.
References EdgeH, and THashMP< TKey, TDat, THashFunc >::GetKeyId().
Referenced by GetWeightOutEdgesV().
Gets the value of int attr from the edge attr value vector.
Definition at line 637 of file networkmp.h.
References TNEANetMP::TEdgeI::GetId(), and GetIntAttrDatE().
Referenced by GetIntAttrDatE().
Definition at line 810 of file networkmp.cpp.
References EdgeH, THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsE.
Gets the value of int attr from the node attr value vector.
Definition at line 620 of file networkmp.h.
References TNEANetMP::TNodeI::GetId(), and GetIntAttrDatN().
Referenced by GetIntAttrDatN().
Definition at line 790 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeN, NodeH, TPair< TVal1, TVal2 >::Val2, and VecOfIntVecsN.
Get Int edge attribute val. If not a proper attr, return default.
Definition at line 260 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), IntDefaultsE, THashMP< TKey, TDat, THashFunc >::IsKey(), and TInt::Mn.
Referenced by AddEdge(), DelAttrDatE(), EdgeAttrIsIntDeleted(), and TNEANetMP::TAIntI::IsDeleted().
Get Int node attribute val. If not a proper attr, return default.
Definition at line 254 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), IntDefaultsN, THashMP< TKey, TDat, THashFunc >::IsKey(), and TInt::Mn.
Referenced by AddNode(), DelAttrDatN(), TNEANetMP::TAIntI::IsDeleted(), and NodeAttrIsIntDeleted().
Gets the value of edge int attr specified by the attr index.
Definition at line 649 of file networkmp.h.
References TNEANetMP::TEdgeI::GetId(), and GetIntAttrIndDatE().
Referenced by GetIntAttrIndDatE().
TInt TNEANetMP::GetIntAttrIndDatE | ( | const int & | EId, |
const int & | index | ||
) |
Definition at line 814 of file networkmp.cpp.
References EdgeH, THashMP< TKey, TDat, THashFunc >::GetKeyId(), and VecOfIntVecsE.
Gets the value of node int attr specified by the attr index.
Definition at line 633 of file networkmp.h.
References TNEANetMP::TNodeI::GetId(), and GetIntAttrIndDatN().
Referenced by GetIntAttrIndDatN().
TInt TNEANetMP::GetIntAttrIndDatN | ( | const int & | NId, |
const int & | index | ||
) |
Definition at line 794 of file networkmp.cpp.
References THashMP< TKey, TDat, THashFunc >::GetKeyId(), NodeH, and VecOfIntVecsN.
int TNEANetMP::GetIntAttrIndE | ( | const TStr & | attr | ) |
Gets the index of the edge attr value vector specified by str attr.
Definition at line 818 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeE, and TPair< TVal1, TVal2 >::Val2.
int TNEANetMP::GetIntAttrIndN | ( | const TStr & | attr | ) |
Gets the index of the node attr value vector specified by str attr.
Definition at line 798 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), KeyToIndexTypeN, and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an ID that is larger than any edge ID in the network.
Definition at line 489 of file networkmp.h.
References MxEId.
|
inline |
Returns an ID that is larger than any node ID in the network.
Definition at line 487 of file networkmp.h.
References MxNId.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 382 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 364 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 373 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetI(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), and TPair< TVal1, TVal2 >::Val2.
|
inline |
Returns an iterator referring to the node of ID NId in the graph.
Definition at line 356 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetI().
Referenced by GetRndNI().
void TNEANetMP::GetNIdV | ( | TIntV & | NIdV | ) | const |
Gets a vector IDs of all nodes in the graph.
Definition at line 501 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashMP< TKey, TDat, THashFunc >::FFirstKeyId(), THashMP< TKey, TDat, THashFunc >::FNextKeyId(), TVec< TVal, TSizeTy >::Gen(), THashMP< TKey, TDat, THashFunc >::GetKey(), GetNodes(), and NodeH.
|
inlineprivate |
Definition at line 248 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), and NodeH.
Referenced by AddEdge(), GetWeightOutEdges(), and IsEdge().
|
inlineprivate |
Definition at line 249 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), and NodeH.
TStr TNEANetMP::GetNodeAttrValue | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Definition at line 135 of file networkmp.cpp.
References FltType, THashKeyDatI< TKey, TDat >::GetDat(), THash< TKey, TDat, THashFunc >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TStr::GetNullStr(), TStr::GetStr(), TVec< TVal, TSizeTy >::GetVal(), IntType, KeyToIndexTypeN, NodeH, StrType, VecOfFltVecsN, VecOfIntVecsN, and VecOfStrVecsN.
Referenced by AttrValueEI(), and AttrValueNI().
|
inline |
Returns the number of nodes in the graph.
Definition at line 330 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Len().
Referenced by Dump(), Empty(), and GetNIdV().
Returns an interator referring to a random edge in the graph.
Definition at line 545 of file networkmp.h.
References GetEI(), and GetRndEId().
Returns an ID of a random edge in the graph.
Definition at line 543 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetKey(), and THashMP< TKey, TDat, THashFunc >::GetRndKeyId().
Referenced by GetRndEI().
Returns an interator referring to a random node in the graph.
Definition at line 541 of file networkmp.h.
References GetNI(), and GetRndNId().
Returns an ID of a random node in the graph.
Definition at line 539 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetKey(), and THashMP< TKey, TDat, THashFunc >::GetRndKeyId().
Referenced by GetRndNI().
Gets the value of str attr from the edge attr value vector.
Definition at line 640 of file networkmp.h.
References TNEANetMP::TEdgeI::GetId(), and GetStrAttrDatE().
Referenced by GetStrAttrDatE().
Definition at line 822 of file networkmp.cpp.
References EdgeH, THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeE, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsE.
Gets the value of str attr from the node attr value vector.
Definition at line 624 of file networkmp.h.
References TNEANetMP::TNodeI::GetId(), and GetStrAttrDatN().
Referenced by GetStrAttrDatN().
Definition at line 802 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), KeyToIndexTypeN, NodeH, TPair< TVal1, TVal2 >::Val2, and VecOfStrVecsN.
Get Str edge attribute val. If not a proper attr, return default.
Definition at line 262 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), TStr::GetNullStr(), THashMP< TKey, TDat, THashFunc >::IsKey(), and StrDefaultsE.
Referenced by AddEdge(), DelAttrDatE(), EdgeAttrIsStrDeleted(), and TNEANetMP::TAStrI::IsDeleted().
Get Str node attribute val. If not a proper attr, return default.
Definition at line 256 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetDat(), TStr::GetNullStr(), THashMP< TKey, TDat, THashFunc >::IsKey(), and StrDefaultsN.
Referenced by AddNode(), DelAttrDatN(), TNEANetMP::TAStrI::IsDeleted(), and NodeAttrIsStrDeleted().
Definition at line 1023 of file networkmp.cpp.
References GetFltAttrDatE(), TNEANetMP::TNodeI::GetId(), GetNode(), TVec< TVal, TSizeTy >::Len(), and TNEANetMP::TNode::OutEIdV.
Definition at line 1034 of file networkmp.cpp.
References BegEI(), EndEI(), and GetFltKeyIdE().
bool TNEANetMP::HasFlag | ( | const TGraphFlag & | Flag | ) | const |
Allows for run-time checking the type of the graph (see the TGraphFlag for flags).
Definition at line 5 of file networkmp.cpp.
References HasGraphFlag.
Returns a vector of int attr names for edge EId.
Definition at line 427 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TEdgeI::GetIntAttrNames().
void TNEANetMP::IntAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 169 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsIntDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), IntType, and THashKeyDatI< TKey, TDat >::IsEnd().
Returns a vector of int attr names for node NId.
Definition at line 394 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TNodeI::GetIntAttrNames().
void TNEANetMP::IntAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 47 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), IntType, THashKeyDatI< TKey, TDat >::IsEnd(), and NodeAttrIsIntDeleted().
Returns a vector of attr values for edge EId.
Definition at line 431 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TEdgeI::GetIntAttrVal().
void TNEANetMP::IntAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TIntV & | Values | ||
) | const |
Definition at line 179 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsIntDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), TVec< TVal, TSizeTy >::GetVal(), IntType, THashKeyDatI< TKey, TDat >::IsEnd(), and VecOfIntVecsE.
Returns a vector of attr values for node NId.
Definition at line 398 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TNodeI::GetIntAttrVal().
void TNEANetMP::IntAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TIntV & | Values | ||
) | const |
Definition at line 57 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashKeyDatI< TKey, TDat >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), IntType, THashKeyDatI< TKey, TDat >::IsEnd(), NodeAttrIsIntDeleted(), NodeH, and VecOfIntVecsN.
|
inline |
Tests whether an edge with edge ID EId exists in 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 522 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::IsKey().
Referenced by AddEdge(), AddFltAttrDatE(), AddIntAttrDatE(), AddStrAttrDatE(), GetEId(), and IsOk().
|
inline |
Tests whether an edge between node IDs SrcNId and DstNId exists in the graph.
Definition at line 524 of file networkmp.h.
References IsEdge().
Referenced by IsEdge().
bool TNEANetMP::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 480 of file networkmp.cpp.
References edge, TNEANetMP::TEdge::GetDstNId(), GetEdge(), TNEANetMP::TEdge::GetId(), TNEANetMP::TNode::GetInDeg(), TNEANetMP::TNode::GetInEId(), GetNode(), TNEANetMP::TNode::GetOutDeg(), TNEANetMP::TNode::GetOutEId(), and TNEANetMP::TEdge::GetSrcNId().
bool TNEANetMP::IsFltAttrE | ( | const TStr & | attr | ) |
Definition at line 1042 of file networkmp.cpp.
References FltType, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, and TPair< TVal1, TVal2 >::Val1.
bool TNEANetMP::IsIntAttrE | ( | const TStr & | attr | ) |
Definition at line 1047 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), IntType, THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, and TPair< TVal1, TVal2 >::Val1.
|
inline |
If the node of ID NId does not exist the function aborts.
Tests whether ID NId is a node.
Definition at line 350 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::IsKey().
Referenced by AddEdge(), AddFltAttrDatN(), AddIntAttrDatN(), AddNode(), AddStrAttrDatN(), and IsOk().
bool TNEANetMP::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 526 of file networkmp.cpp.
References TStr::CStr(), EAssertR, EdgeH, ErrNotify(), THashMP< TKey, TDat, THashFunc >::FFirstKeyId(), TStr::Fmt(), THashMP< TKey, TDat, THashFunc >::FNextKeyId(), TNEANetMP::TEdge::GetDstNId(), TNEANetMP::TNode::GetId(), TNEANetMP::TEdge::GetId(), TNEANetMP::TNode::GetInDeg(), TNEANetMP::TNode::GetInEId(), TNEANetMP::TNode::GetOutDeg(), TNEANetMP::TNode::GetOutEId(), TNEANetMP::TEdge::GetSrcNId(), TNEANetMP::TNode::InEIdV, IsEdge(), IsNode(), TVec< TVal, TSizeTy >::IsSorted(), NodeH, and TNEANetMP::TNode::OutEIdV.
bool TNEANetMP::IsStrAttrE | ( | const TStr & | attr | ) |
Definition at line 1052 of file networkmp.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), KeyToIndexTypeE, StrType, and TPair< TVal1, TVal2 >::Val1.
Static constructor that loads the graph from a stream SIn and returns a pointer to it.
Definition at line 322 of file networkmp.h.
References TNEANetMP().
|
inlinestatic |
Static cons returns pointer to graph. Ex: PNEANetMP Graph=TNEANetMP::New().
Definition at line 316 of file networkmp.h.
References TNEANetMP().
Referenced by TMMNet::ToNetworkMP().
|
inlinestatic |
Static constructor that returns a pointer to the graph and reserves enough memory for Nodes nodes and Edges edges.
Call: PNEANetMP Graph = TNEANetMP::New(Nodes, Edges).
Definition at line 320 of file networkmp.h.
References TNEANetMP().
bool TNEANetMP::NodeAttrIsDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Definition at line 110 of file networkmp.cpp.
References NodeAttrIsFltDeleted(), NodeAttrIsIntDeleted(), and NodeAttrIsStrDeleted().
Referenced by AttrNameNI(), and AttrValueNI().
bool TNEANetMP::NodeAttrIsFltDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Definition at line 129 of file networkmp.cpp.
References FltType, THashKeyDatI< TKey, TDat >::GetDat(), GetFltAttrDefaultN(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), NodeH, and VecOfFltVecsN.
Referenced by FltAttrNameNI(), FltAttrValueNI(), and NodeAttrIsDeleted().
bool TNEANetMP::NodeAttrIsIntDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Definition at line 117 of file networkmp.cpp.
References THashKeyDatI< TKey, TDat >::GetDat(), GetIntAttrDefaultN(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), TVec< TVal, TSizeTy >::GetVal(), IntType, NodeH, and VecOfIntVecsN.
Referenced by IntAttrNameNI(), IntAttrValueNI(), and NodeAttrIsDeleted().
bool TNEANetMP::NodeAttrIsStrDeleted | ( | const int & | NId, |
const TStrIntPrH::TIter & | NodeHI | ||
) | const |
Definition at line 123 of file networkmp.cpp.
References THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), GetStrAttrDefaultN(), NodeH, StrType, and VecOfStrVecsN.
Referenced by NodeAttrIsDeleted(), StrAttrNameNI(), and StrAttrValueNI().
|
inline |
Reserves memory for a graph of Nodes nodes and Edges edges.
Definition at line 560 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Gen().
Referenced by TNEANetMP().
|
inline |
Reserves memory for dense attributes.
Definition at line 563 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Gen().
|
inline |
Returns the number of nodes reserved in the network.
Definition at line 492 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetReservedKeyIds().
Referenced by AddNodeWithEdges().
|
inline |
Returns the number of edges reserved in the network.
Definition at line 494 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::GetReservedKeyIds().
Referenced by AddEdgeUnchecked().
|
inline |
Saves the graph to a (binary) stream SOut.
Definition at line 306 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::Save(), THash< TKey, TDat, THashFunc >::Save(), TVec< TVal, TSizeTy >::Save(), and TInt::Save().
|
inline |
Sets the number of edges in the graph.
Definition at line 499 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::SetLen().
|
inline |
Sets the MaxEId. Used since AddEdgeUnchecked doesn't affect EId for efficiency.
Definition at line 501 of file networkmp.h.
|
inline |
Sets the number of nodes in the graph.
Definition at line 332 of file networkmp.h.
References THashMP< TKey, TDat, THashFunc >::SetLen().
Returns a vector of str attr names for node NId.
Definition at line 435 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TEdgeI::GetStrAttrNames().
void TNEANetMP::StrAttrNameEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 190 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsStrDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashKeyDatI< TKey, TDat >::IsEnd(), and StrType.
Returns a vector of str attr names for node NId.
Definition at line 402 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by TNEANetMP::TNodeI::GetStrAttrNames().
void TNEANetMP::StrAttrNameNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Names | ||
) | const |
Definition at line 68 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::GetKey(), THashKeyDatI< TKey, TDat >::IsEnd(), NodeAttrIsStrDeleted(), and StrType.
Returns a vector of attr values for node NId.
Definition at line 439 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TEdgeI::GetStrAttrVal().
void TNEANetMP::StrAttrValueEI | ( | const TInt & | EId, |
TStrIntPrH::TIter | EdgeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 200 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), EdgeAttrIsStrDeleted(), THashKeyDatI< TKey, TDat >::GetDat(), THashKeyDatI< TKey, TDat >::IsEnd(), StrType, and VecOfStrVecsE.
Returns a vector of attr values for node NId.
Definition at line 406 of file networkmp.h.
References THash< TKey, TDat, THashFunc >::BegI().
Referenced by Dump(), and TNEANetMP::TNodeI::GetStrAttrVal().
void TNEANetMP::StrAttrValueNI | ( | const TInt & | NId, |
TStrIntPrH::TIter | NodeHI, | ||
TStrV & | Values | ||
) | const |
Definition at line 78 of file networkmp.cpp.
References TVec< TVal, TSizeTy >::Add(), THashKeyDatI< TKey, TDat >::GetDat(), THashMP< TKey, TDat, THashFunc >::GetKeyId(), THashKeyDatI< TKey, TDat >::IsEnd(), NodeAttrIsStrDeleted(), NodeH, StrType, and VecOfStrVecsN.
Definition at line 716 of file networkmp.h.
|
private |
Definition at line 267 of file networkmp.h.
Definition at line 270 of file networkmp.h.
Referenced by AddEdge(), AddEdgeUnchecked(), AddFltAttrDatE(), AddIntAttrDatE(), AddStrAttrDatE(), Defrag(), DelAttrDatE(), EdgeAttrIsFltDeleted(), EdgeAttrIsIntDeleted(), EdgeAttrIsStrDeleted(), GetEdge(), GetEdgeAttrValue(), GetEIdV(), GetFltAttrDatE(), GetFltKeyIdE(), GetIntAttrDatE(), GetIntAttrIndDatE(), GetStrAttrDatE(), IsOk(), and operator=().
Definition at line 276 of file networkmp.h.
Referenced by AddEdge(), AddFltAttrE(), and GetFltAttrDefaultE().
Definition at line 276 of file networkmp.h.
Referenced by AddFltAttrN(), AddNode(), and GetFltAttrDefaultN().
Definition at line 274 of file networkmp.h.
Referenced by AddEdge(), AddIntAttrE(), and GetIntAttrDefaultE().
Definition at line 274 of file networkmp.h.
Referenced by AddIntAttrN(), AddNode(), and GetIntAttrDefaultN().
|
private |
Definition at line 272 of file networkmp.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddFltAttrE(), AddIntAttrDatE(), AddIntAttrE(), AddStrAttrDatE(), AddStrAttrE(), DelAttrDatE(), GetEdgeAttrValue(), GetFltAttrDatE(), GetFltAttrVecE(), GetIntAttrDatE(), GetIntAttrIndE(), GetStrAttrDatE(), IsFltAttrE(), IsIntAttrE(), and IsStrAttrE().
|
private |
KeyToIndexType[N|E]: Key->(Type,Index).
Definition at line 272 of file networkmp.h.
Referenced by AddFltAttrDatN(), AddFltAttrN(), AddIntAttrDatN(), AddIntAttrN(), AddNode(), AddStrAttrDatN(), AddStrAttrN(), DelAttrDatN(), GetFltAttrDatN(), GetIntAttrDatN(), GetIntAttrIndN(), GetNodeAttrValue(), and GetStrAttrDatN().
|
private |
Definition at line 268 of file networkmp.h.
Referenced by AddEdge(), AddEdgeUnchecked(), AddFltAttrDatE(), AddFltAttrE(), AddIntAttrDatE(), AddIntAttrE(), AddStrAttrDatE(), AddStrAttrE(), GetMxEId(), and operator=().
|
private |
Definition at line 268 of file networkmp.h.
Referenced by AddFltAttrDatN(), AddFltAttrN(), AddIntAttrDatN(), AddIntAttrN(), AddNode(), AddNodeWithEdges(), AddStrAttrDatN(), AddStrAttrN(), GetMxNId(), and operator=().
Definition at line 269 of file networkmp.h.
Referenced by AddEdge(), AddFltAttrDatN(), AddIntAttrDatN(), AddNode(), AddNodeWithEdges(), AddStrAttrDatN(), Defrag(), DelAttrDatN(), FltAttrValueNI(), GetFltAttrDatN(), GetIntAttrDatN(), GetIntAttrIndDatN(), GetNIdV(), GetNode(), GetNodeAttrValue(), GetStrAttrDatN(), IntAttrValueNI(), IsOk(), NodeAttrIsFltDeleted(), NodeAttrIsIntDeleted(), NodeAttrIsStrDeleted(), operator=(), and StrAttrValueNI().
Definition at line 275 of file networkmp.h.
Referenced by AddStrAttrE(), and GetStrAttrDefaultE().
Definition at line 275 of file networkmp.h.
Referenced by AddStrAttrN(), and GetStrAttrDefaultN().
Definition at line 279 of file networkmp.h.
Referenced by AddEdge(), AddFltAttrDatE(), AddFltAttrE(), DelAttrDatE(), EdgeAttrIsFltDeleted(), FltAttrValueEI(), GetEdgeAttrValue(), GetFltAttrDatE(), and GetFltAttrVecE().
Definition at line 279 of file networkmp.h.
Referenced by AddFltAttrDatN(), AddFltAttrN(), AddNode(), DelAttrDatN(), FltAttrValueNI(), GetFltAttrDatN(), GetNodeAttrValue(), and NodeAttrIsFltDeleted().
Definition at line 277 of file networkmp.h.
Referenced by AddEdge(), AddIntAttrDatE(), AddIntAttrE(), DelAttrDatE(), EdgeAttrIsIntDeleted(), GetEdgeAttrValue(), GetIntAttrDatE(), GetIntAttrIndDatE(), and IntAttrValueEI().
Definition at line 277 of file networkmp.h.
Referenced by AddIntAttrDatN(), AddIntAttrN(), AddNode(), DelAttrDatN(), GetIntAttrDatN(), GetIntAttrIndDatN(), GetNodeAttrValue(), IntAttrValueNI(), and NodeAttrIsIntDeleted().
Definition at line 278 of file networkmp.h.
Referenced by AddEdge(), AddFltAttrE(), AddStrAttrDatE(), AddStrAttrE(), DelAttrDatE(), EdgeAttrIsStrDeleted(), GetEdgeAttrValue(), GetStrAttrDatE(), and StrAttrValueEI().
Definition at line 278 of file networkmp.h.
Referenced by AddFltAttrN(), AddNode(), AddStrAttrDatN(), AddStrAttrN(), DelAttrDatN(), GetNodeAttrValue(), GetStrAttrDatN(), NodeAttrIsStrDeleted(), and StrAttrValueNI().