SNAP Library 4.1, Developer Reference  2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TNodeEdgeNet< TNodeData, TEdgeData > Class Template Reference

Node Edge Network (directed multigraph, TNEGraph with data on nodes and edges). More...

#include <network.h>

Collaboration diagram for TNodeEdgeNet< TNodeData, TEdgeData >:

Classes

class  LoadTNodeFunctor
 
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 TNodeData TNodeDat
 
typedef TEdgeData TEdgeDat
 
typedef TNodeEdgeNet
< TNodeData, TEdgeData > 
TNet
 
typedef TPt< TNetPNet
 

Public Member Functions

 TNodeEdgeNet ()
 
 TNodeEdgeNet (const int &Nodes, const int &Edges)
 Constructor that reserves enough memory for a network of Nodes nodes and Edges edges. More...
 
 TNodeEdgeNet (const TNodeEdgeNet &Net)
 
 TNodeEdgeNet (TSIn &SIn)
 Constructor that loads the network from a (binary) stream SIn. More...
 
virtual ~TNodeEdgeNet ()
 
virtual void Save (TSOut &SOut) const
 Saves the network to a (binary) stream SOut. More...
 
bool HasFlag (const TGraphFlag &Flag) const
 Allows for run-time checking the type of the network (see the TGraphFlag for flags). More...
 
TNodeEdgeNetoperator= (const TNodeEdgeNet &Net)
 
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 (int NId, const TNodeData &NodeDat)
 Adds node data to node with ID NId. More...
 
int AddNode (const TNodeI &NodeI)
 
void DelNode (const int &NId)
 Deletes node of ID NId from the network. More...
 
void DelNode (const TNode &NodeI)
 Deletes node of ID NodeI.GetId() from the network. 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 network. More...
 
TNodeI EndNI () const
 Returns an iterator referring to the past-the-end node in the network. More...
 
TNodeI GetNI (const int &NId) const
 Returns an iterator referring to the node of ID NId in the network. More...
 
void SetNDat (const int &NId, const TNodeData &NodeDat)
 Sets node data for the node of ID NId in the network. More...
 
TNodeData & GetNDat (const int &NId)
 Returns node data for the node of ID NId in the network. More...
 
const TNodeData & GetNDat (const int &NId) const
 Returns node data for the node of ID NId in the network. More...
 
int GetMxNId () const
 Returns an ID that is larger than any node ID in the network. More...
 
int GetEdges () const
 Returns the number of edges in the network. More...
 
int GetUniqEdges (const bool &IsDir=true) const
 Returns the number of edges in the network with a unique pair of nodes. More...
 
int AddEdge (const int &SrcNId, const int &DstNId, int EId=-1)
 Adds an edge between node IDs SrcNId and DstNId to the graph. More...
 
int AddEdge (const int &SrcNId, const int &DstNId, int EId, const TEdgeData &EdgeDat)
 Adds an edge and edge data from node IDs SrcNId to node DstNId. More...
 
int AddEdge (const TEdgeI &EdgeI)
 Adds an edge from EdgeI.GetSrcNId() to EdgeI.GetDstNId() and its edge data to the network. More...
 
void DelEdge (const int &EId)
 Deletes an edge with ID EId from the network. More...
 
void DelEdge (const int &SrcNId, const int &DstNId, const bool &IsDir=true)
 Deletes an edge from node IDs SrcNId to DstNId from the network. More...
 
bool IsEdge (const int &EId) const
 Tests whether an edge with ID EId exists in the network. More...
 
bool IsEdge (const int &SrcNId, const int &DstNId, const bool &IsDir=true) const
 Tests whether an edge from node IDs SrcNId to DstNId exists in the network. More...
 
bool IsEdge (const int &SrcNId, const int &DstNId, int &EId, const bool &IsDir=true) const
 Tests whether an edge from node IDs SrcNId to DstNId with edge ID EId exists in the network. More...
 
int GetEId (const int &SrcNId, const int &DstNId) const
 
TEdgeI BegEI () const
 Returns an iterator referring to the first edge in the network. More...
 
TEdgeI EndEI () const
 Returns an iterator referring to the past-the-end edge in the network. More...
 
TEdgeI GetEI (const int &EId) const
 Not supported/implemented! More...
 
TEdgeI GetEI (const int &SrcNId, const int &DstNId) const
 Returns an iterator referring to edge (SrcNId, DstNId) in the graph. More...
 
void SetEDat (const int &EId, const TEdgeData &EdgeDat)
 Sets edge data for the edge of ID NId in the network. More...
 
TEdgeData & GetEDat (const int &EId)
 Returns edge data for the edge with ID EId. More...
 
const TEdgeData & GetEDat (const int &EId) const
 Returns edge data for the edge with ID EId. More...
 
void SetAllEDat (const TEdgeData &EdgeDat)
 Sets edge data for all the edges in the network to EDat. More...
 
int GetRndNId (TRnd &Rnd=TInt::Rnd)
 Returns an ID of a random node in the network. More...
 
TNodeI GetRndNI (TRnd &Rnd=TInt::Rnd)
 Returns an interator referring to a random node in the network. More...
 
int GetRndEId (TRnd &Rnd=TInt::Rnd)
 Returns an ID of a random edge in the network. More...
 
TEdgeI GetRndEI (TRnd &Rnd=TInt::Rnd)
 Returns an interator referring to a random edge in the network. More...
 
void GetNIdV (TIntV &NIdV) const
 Returns a vector of all node IDs in the network. More...
 
void GetEIdV (TIntV &EIdV) const
 Returns a vector of all edge IDs in the network. More...
 
bool Empty () const
 Tests whether the network is empty (has zero nodes). More...
 
void Clr ()
 Deletes all nodes and edges from the network. More...
 
void Reserve (const int &Nodes, const int &Edges)
 Reserves memory for a network of Nodes nodes and Edges edges. More...
 
void SortNIdById (const bool &Asc=true)
 Sorts nodes by node IDs. More...
 
void SortNIdByDat (const bool &Asc=true)
 Sorts nodes by node data. More...
 
void SortEIdById (const bool &Asc=true)
 Sorts edges by edge IDs. More...
 
void SortEIdByDat (const bool &Asc=true)
 Sorts edges by edge data. More...
 
void Defrag (const bool &OnlyNodeLinks=false)
 Defragments the network. More...
 
bool IsOk (const bool &ThrowExcept=true) const
 Checks the network data structure for internal consistency. More...
 

Static Public Member Functions

static PNet New ()
 Static constructor that returns a pointer to the network. More...
 
static PNet Load (TSIn &SIn)
 Static constructor that loads the network from a stream SIn and returns a pointer to it. More...
 
static PNet LoadShM (TShMIn &ShMIn)
 Static constructor that loads the network from memory. More...
 

Protected Attributes

TCRef CRef
 
TInt MxNId
 
TInt MxEId
 
THash< TInt, TNodeNodeH
 
THash< TInt, TEdgeEdgeH
 

Private Member Functions

TNodeGetNode (const int &NId)
 
const TNodeGetNode (const int &NId) const
 
const TNodeGetNodeKId (const int &NodeKeyId) const
 
TEdgeGetEdge (const int &EId)
 
const TEdgeGetEdge (const int &EId) const
 
const TEdgeGetEdgeKId (const int &EdgeKeyId) const
 
void LoadNetworkShM (TShMIn &ShMIn)
 

Friends

class TCrossNet
 Adds a node NodeI and its node data to the network. More...
 
class TPt< TNodeEdgeNet< TNodeData, TEdgeData > >
 

Detailed Description

template<class TNodeData, class TEdgeData>
class TNodeEdgeNet< TNodeData, TEdgeData >

Node Edge Network (directed multigraph, TNEGraph with data on nodes and edges).

Definition at line 1074 of file network.h.

Member Typedef Documentation

template<class TNodeData, class TEdgeData>
typedef TPt<TNet> TNodeEdgeNet< TNodeData, TEdgeData >::PNet

Definition at line 1079 of file network.h.

template<class TNodeData, class TEdgeData>
typedef TEdgeData TNodeEdgeNet< TNodeData, TEdgeData >::TEdgeDat

Definition at line 1077 of file network.h.

template<class TNodeData, class TEdgeData>
typedef TNodeEdgeNet<TNodeData, TEdgeData> TNodeEdgeNet< TNodeData, TEdgeData >::TNet

Definition at line 1078 of file network.h.

template<class TNodeData, class TEdgeData>
typedef TNodeData TNodeEdgeNet< TNodeData, TEdgeData >::TNodeDat

Definition at line 1076 of file network.h.

Constructor & Destructor Documentation

template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNodeEdgeNet ( )
inline

Definition at line 1276 of file network.h.

1276 : CRef(), MxNId(0), MxEId(0) { }
TInt MxEId
Definition: network.h:1258
TCRef CRef
Definition: network.h:1257
TInt MxNId
Definition: network.h:1258
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNodeEdgeNet ( const int &  Nodes,
const int &  Edges 
)
inlineexplicit

Constructor that reserves enough memory for a network of Nodes nodes and Edges edges.

Definition at line 1278 of file network.h.

1278 : CRef(), MxNId(0), MxEId(0) { Reserve(Nodes, Edges); }
TInt MxEId
Definition: network.h:1258
void Reserve(const int &Nodes, const int &Edges)
Reserves memory for a network of Nodes nodes and Edges edges.
Definition: network.h:1423
TCRef CRef
Definition: network.h:1257
TInt MxNId
Definition: network.h:1258
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNodeEdgeNet ( const TNodeEdgeNet< TNodeData, TEdgeData > &  Net)
inline

Definition at line 1279 of file network.h.

1279 : MxNId(Net.MxNId), MxEId(Net.MxEId), NodeH(Net.NodeH), EdgeH(Net.EdgeH) { }
TInt MxEId
Definition: network.h:1258
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNodeEdgeNet ( TSIn SIn)
inline

Constructor that loads the network from a (binary) stream SIn.

Definition at line 1281 of file network.h.

1281 : MxNId(SIn), MxEId(SIn), NodeH(SIn), EdgeH(SIn) { }
TInt MxEId
Definition: network.h:1258
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
virtual TNodeEdgeNet< TNodeData, TEdgeData >::~TNodeEdgeNet ( )
inlinevirtual

Definition at line 1282 of file network.h.

1282 { }

Member Function Documentation

template<class TNodeData , class TEdgeData >
int TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge ( const int &  SrcNId,
const int &  DstNId,
int  EId = -1 
)

Adds an edge 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 1557 of file network.h.

References THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::AddSorted(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, TStr::Fmt(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), IAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TMath::Mx(), TNodeEdgeNet< TNodeData, TEdgeData >::MxEId, and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV.

Referenced by TTimeNENet::GetESubGraph(), TTimeNENet::GetGraphUpToTm(), and TTimeNENet::GetSubGraph().

1557  {
1558  if (EId == -1) { EId = MxEId; MxEId++; }
1559  else { MxEId = TMath::Mx(EId+1, MxEId()); }
1560  IAssertR(!IsEdge(EId), TStr::Fmt("EdgeId %d already exists", EId));
1561  IAssertR(IsNode(SrcNId) && IsNode(DstNId), TStr::Fmt("%d or %d not a node.", SrcNId, DstNId).CStr());
1562  EdgeH.AddDat(EId, TEdge(EId, SrcNId, DstNId));
1563  GetNode(SrcNId).OutEIdV.AddSorted(EId);
1564  GetNode(DstNId).InEIdV.AddSorted(EId);
1565  return EId;
1566 }
TInt MxEId
Definition: network.h:1258
#define IAssertR(Cond, Reason)
Definition: bd.h:265
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TSizeTy AddSorted(const TVal &Val, const bool &Asc=true, const TSizeTy &_MxVals=-1)
Adds element Val to a sorted vector.
Definition: ds.h:1117
TNode & GetNode(const int &NId)
Definition: network.h:1250
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge ( const int &  SrcNId,
const int &  DstNId,
int  EId,
const TEdgeData &  EdgeDat 
)

Adds an edge and edge data from node IDs SrcNId to node DstNId.

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 1569 of file network.h.

References THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::AddSorted(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, TStr::Fmt(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), IAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TMath::Mx(), TNodeEdgeNet< TNodeData, TEdgeData >::MxEId, and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV.

1569  {
1570  if (EId == -1) { EId = MxEId; MxEId++; }
1571  else { MxEId = TMath::Mx(EId+1, MxEId()); }
1572  IAssertR(!IsEdge(EId), TStr::Fmt("EdgeId %d already exists", EId));
1573  IAssertR(IsNode(SrcNId) && IsNode(DstNId), TStr::Fmt("%d or %d not a node.", SrcNId, DstNId).CStr());
1574  EdgeH.AddDat(EId, TEdge(EId, SrcNId, DstNId, EdgeDat));
1575  GetNode(SrcNId).OutEIdV.AddSorted(EId);
1576  GetNode(DstNId).InEIdV.AddSorted(EId);
1577  return EId;
1578 }
TInt MxEId
Definition: network.h:1258
#define IAssertR(Cond, Reason)
Definition: bd.h:265
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TSizeTy AddSorted(const TVal &Val, const bool &Asc=true, const TSizeTy &_MxVals=-1)
Adds element Val to a sorted vector.
Definition: ds.h:1117
TNode & GetNode(const int &NId)
Definition: network.h:1250
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge ( const TEdgeI EdgeI)
inline

Adds an edge from EdgeI.GetSrcNId() to EdgeI.GetDstNId() and its edge data to the network.

Definition at line 1372 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::AddEdge().

1372 { return AddEdge(EdgeI.GetSrcNId(), EdgeI.GetDstNId(), EdgeI.GetId(), EdgeI.GetDat()); }
int AddEdge(const int &SrcNId, const int &DstNId, int EId=-1)
Adds an edge between node IDs SrcNId and DstNId to the graph.
Definition: network.h:1557

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
int TNodeEdgeNet< TNodeData, TEdgeData >::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 1483 of file network.h.

References THash< TKey, TDat, THashFunc >::AddDat(), TStr::Fmt(), IAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TMath::Mx(), TNodeEdgeNet< TNodeData, TEdgeData >::MxNId, and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

Referenced by TTimeNENet::GetESubGraph(), TTimeNENet::GetGraphUpToTm(), and TTimeNENet::GetSubGraph().

1483  {
1484  if (NId == -1) {
1485  NId = MxNId; MxNId++;
1486  } else {
1487  IAssertR(!IsNode(NId), TStr::Fmt("NodeId %d already exists", NId));
1488  MxNId = TMath::Mx(NId+1, MxNId());
1489  }
1490  NodeH.AddDat(NId, TNode(NId));
1491  return NId;
1492 }
#define IAssertR(Cond, Reason)
Definition: bd.h:265
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData >
int TNodeEdgeNet< TNodeData, TEdgeData >::AddNode ( int  NId,
const TNodeData &  NodeDat 
)

Adds node data to node with ID NId.

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 1507 of file network.h.

References THash< TKey, TDat, THashFunc >::AddDat(), TStr::Fmt(), IAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TMath::Mx(), TNodeEdgeNet< TNodeData, TEdgeData >::MxNId, and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

1507  {
1508  if (NId == -1) {
1509  NId = MxNId; MxNId++;
1510  } else {
1511  IAssertR(!IsNode(NId), TStr::Fmt("NodeId %d already exists", NId));
1512  MxNId = TMath::Mx(NId+1, MxNId());
1513  }
1514  NodeH.AddDat(NId, TNode(NId, NodeDat));
1515  return NId;
1516 }
#define IAssertR(Cond, Reason)
Definition: bd.h:265
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::AddNode ( const TNodeI NodeI)
inline

Definition at line 1328 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::AddNode().

1328 { return AddNode(NodeI.GetId(), NodeI.GetDat()); }
int AddNode(int NId=-1)
Adds a node of ID NId to the network.
Definition: network.h:1483

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
int TNodeEdgeNet< TNodeData, TEdgeData >::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 1495 of file network.h.

References THash< TKey, TDat, THashFunc >::AddDat(), TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TMath::Mx(), TNodeEdgeNet< TNodeData, TEdgeData >::MxNId, and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

1495  {
1496  if (NId == -1) {
1497  NId = MxNId; MxNId++;
1498  } else {
1499  if (IsNode(NId)) { return -1;}
1500  MxNId = TMath::Mx(NId+1, MxNId());
1501  }
1502  NodeH.AddDat(NId, TNode(NId));
1503  return NId;
1504 }
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeI TNodeEdgeNet< TNodeData, TEdgeData >::BegEI ( ) const
inline

Returns an iterator referring to the first edge in the network.

Definition at line 1389 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), and TNodeEdgeNet< TNodeData, TEdgeData >::SetAllEDat().

1389 { return TEdgeI(EdgeH.BegI(), this); }
TIter BegI() const
Definition: hash.h:213
THash< TInt, TEdge > EdgeH
Definition: network.h:1260

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TNodeI TNodeEdgeNet< TNodeData, TEdgeData >::BegNI ( ) const
inline

Returns an iterator referring to the first node in the network.

Definition at line 1338 of file network.h.

Referenced by TUndirNet::BegEI(), TDirNet::BegEI(), TUndirNet::SortNodeAdjV(), and TDirNet::SortNodeAdjV().

1338 { return TNodeI(NodeH.BegI(), this); }
TIter BegI() const
Definition: hash.h:213
THash< TInt, TNode > NodeH
Definition: network.h:1259

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::Clr ( )
inline

Deletes all nodes and edges from the network.

Definition at line 1421 of file network.h.

1421 { MxNId=0; MxEId=0; NodeH.Clr(); EdgeH.Clr(); }
TInt MxEId
Definition: network.h:1258
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
void Clr(const bool &DoDel=true, const int &NoDelLim=-1, const bool &ResetDat=true)
Definition: hash.h:361
template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::Defrag ( const bool &  OnlyNodeLinks = false)

Defragments the network.

After performing many node and edge insertions and deletions to a network, the network data structure will be fragmented in memory. This function compacts down the network data structure and frees unneeded memory.

Definition at line 1650 of file network.h.

References THash< TKey, TDat, THashFunc >::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, THash< TKey, TDat, THashFunc >::FFirstKeyId(), THash< TKey, TDat, THashFunc >::FNextKeyId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, THash< TKey, TDat, THashFunc >::IsKeyIdEqKeyN(), TNodeEdgeNet< TNodeData, TEdgeData >::NodeH, TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV, and TVec< TVal, TSizeTy >::Pack().

Referenced by TTimeNENet::GetESubGraph(), TTimeNENet::GetGraphUpToTm(), and TTimeNENet::GetSubGraph().

1650  {
1651  for (int kid = NodeH.FFirstKeyId(); NodeH.FNextKeyId(kid);) {
1652  TNode& Node = NodeH[kid];
1653  Node.InEIdV.Pack(); Node.OutEIdV.Pack();
1654  }
1655  if (! OnlyNodeLinks && ! NodeH.IsKeyIdEqKeyN()) { NodeH.Defrag(); }
1656  if (! OnlyNodeLinks && ! EdgeH.IsKeyIdEqKeyN()) { EdgeH.Defrag(); }
1657 }
bool IsKeyIdEqKeyN() const
Definition: hash.h:233
void Defrag()
Definition: hash.h:555
bool FNextKeyId(int &KeyId) const
Definition: hash.h:478
THash< TInt, TNode > NodeH
Definition: network.h:1259
int FFirstKeyId() const
Definition: hash.h:278
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
void Pack()
Definition: hash.h:289

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge ( const int &  EId)

Deletes an edge with ID EId from the network.

Definition at line 1581 of file network.h.

References TVec< TVal, TSizeTy >::DelIfIn(), THash< TKey, TDat, THashFunc >::DelKey(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetDstNId(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetSrcNId(), IAssert, TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV.

1581  {
1582  IAssert(IsEdge(EId));
1583  const int SrcNId = GetEdge(EId).GetSrcNId();
1584  const int DstNId = GetEdge(EId).GetDstNId();
1585  GetNode(SrcNId).OutEIdV.DelIfIn(EId);
1586  GetNode(DstNId).InEIdV.DelIfIn(EId);
1587  EdgeH.DelKey(EId);
1588 }
#define IAssert(Cond)
Definition: bd.h:262
bool DelIfIn(const TVal &Val)
Removes the first occurrence of element Val.
Definition: ds.h:1212
void DelKey(const TKey &Key)
Definition: hash.h:404
TNode & GetNode(const int &NId)
Definition: network.h:1250
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382
int GetDstNId() const
Definition: network.h:1129
int GetSrcNId() const
Definition: network.h:1128
TEdge & GetEdge(const int &EId)
Definition: network.h:1253

Here is the call graph for this function:

template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge ( const int &  SrcNId,
const int &  DstNId,
const bool &  IsDir = true 
)

Deletes an edge from node IDs SrcNId to DstNId from the network.

If the edge (SrcNId, DstNId) does not exist in the network function still completes. But the function aborts if SrcNId or DstNId are not nodes in the network.

Definition at line 1591 of file network.h.

References TVec< TVal, TSizeTy >::DelIfIn(), THash< TKey, TDat, THashFunc >::DelKey(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), IAssert, TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV.

1591  {
1592  int EId;
1593  IAssert(IsEdge(SrcNId, DstNId, EId, IsDir));
1594  GetNode(SrcNId).OutEIdV.DelIfIn(EId);
1595  GetNode(DstNId).InEIdV.DelIfIn(EId);
1596  EdgeH.DelKey(EId);
1597 }
#define IAssert(Cond)
Definition: bd.h:262
bool DelIfIn(const TVal &Val)
Removes the first occurrence of element Val.
Definition: ds.h:1212
void DelKey(const TKey &Key)
Definition: hash.h:404
TNode & GetNode(const int &NId)
Definition: network.h:1250
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382

Here is the call graph for this function:

template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::DelNode ( const int &  NId)

Deletes node of ID NId from the network.

If the node of ID NId does not exist the function aborts.

Definition at line 1519 of file network.h.

References THash< TKey, TDat, THashFunc >::DelKey(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetDstNId(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInEId(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutEId(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetSrcNId(), IAssert, and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

1519  {
1520  const TNode& Node = GetNode(NId);
1521  for (int out = 0; out < Node.GetOutDeg(); out++) {
1522  const int EId = Node.GetOutEId(out);
1523  const TEdge& Edge = GetEdge(EId);
1524  IAssert(Edge.GetSrcNId() == NId);
1525  GetNode(Edge.GetDstNId()).InEIdV.DelIfIn(EId);
1526  EdgeH.DelKey(EId);
1527  }
1528  for (int in = 0; in < Node.GetInDeg(); in++) {
1529  const int EId = Node.GetInEId(in);
1530  const TEdge& Edge = GetEdge(EId);
1531  IAssert(Edge.GetDstNId() == NId);
1532  GetNode(Edge.GetSrcNId()).OutEIdV.DelIfIn(EId);
1533  EdgeH.DelKey(EId);
1534  }
1535  NodeH.DelKey(NId);
1536 }
#define IAssert(Cond)
Definition: bd.h:262
void DelKey(const TKey &Key)
Definition: hash.h:404
TNode & GetNode(const int &NId)
Definition: network.h:1250
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
TEdge & GetEdge(const int &EId)
Definition: network.h:1253

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::DelNode ( const TNode NodeI)
inline

Deletes node of ID NodeI.GetId() from the network.

Definition at line 1334 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::DelNode().

1334 { DelNode(NodeI.GetId()); }
void DelNode(const int &NId)
Deletes node of ID NId from the network.
Definition: network.h:1519

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::Empty ( ) const
inline

Tests whether the network is empty (has zero nodes).

Definition at line 1419 of file network.h.

1419 { return GetNodes()==0; }
int GetNodes() const
Returns the number of nodes in the network.
Definition: network.h:1307
template<class TNodeData, class TEdgeData>
TEdgeI TNodeEdgeNet< TNodeData, TEdgeData >::EndEI ( ) const
inline

Returns an iterator referring to the past-the-end edge in the network.

Definition at line 1391 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), and TNodeEdgeNet< TNodeData, TEdgeData >::SetAllEDat().

1391 { return TEdgeI(EdgeH.EndI(), this); }
TIter EndI() const
Definition: hash.h:218
THash< TInt, TEdge > EdgeH
Definition: network.h:1260

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TNodeI TNodeEdgeNet< TNodeData, TEdgeData >::EndNI ( ) const
inline

Returns an iterator referring to the past-the-end node in the network.

Definition at line 1340 of file network.h.

Referenced by TUndirNet::BegEI(), TDirNet::BegEI(), TUndirNet::EndEI(), TDirNet::EndEI(), TUndirNet::SortNodeAdjV(), and TDirNet::SortNodeAdjV().

1340 { return TNodeI(NodeH.EndI(), this); }
TIter EndI() const
Definition: hash.h:218
THash< TInt, TNode > NodeH
Definition: network.h:1259

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEdgeNet< TNodeData, TEdgeData >::GetEDat ( const int &  EId)
inline

Returns edge data for the edge with ID EId.

Definition at line 1399 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().

1399 { return EdgeH.GetDat(EId).EdgeDat; }
TEdgeData EdgeDat
Definition: network.h:1118
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
THash< TInt, TEdge > EdgeH
Definition: network.h:1260

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
const TEdgeData& TNodeEdgeNet< TNodeData, TEdgeData >::GetEDat ( const int &  EId) const
inline

Returns edge data for the edge with ID EId.

Definition at line 1401 of file network.h.

1401 { return EdgeH.GetDat(EId).EdgeDat; }
TEdgeData EdgeDat
Definition: network.h:1118
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
TEdge& TNodeEdgeNet< TNodeData, TEdgeData >::GetEdge ( const int &  EId)
inlineprivate
template<class TNodeData, class TEdgeData>
const TEdge& TNodeEdgeNet< TNodeData, TEdgeData >::GetEdge ( const int &  EId) const
inlineprivate

Definition at line 1254 of file network.h.

1254 { return EdgeH.GetDat(EId); }
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
const TEdge& TNodeEdgeNet< TNodeData, TEdgeData >::GetEdgeKId ( const int &  EdgeKeyId) const
inlineprivate

Definition at line 1255 of file network.h.

1255 { return EdgeH[EdgeKeyId]; }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetEdges ( ) const
inline

Returns the number of edges in the network.

Definition at line 1354 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), and TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges().

1354 { return EdgeH.Len(); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
int Len() const
Definition: hash.h:228

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeI TNodeEdgeNet< TNodeData, TEdgeData >::GetEI ( const int &  EId) const
inline

Not supported/implemented!

Definition at line 1393 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetRndEI(), TNEANet::GetRndEI(), and TNodeEdgeNet< TNodeData, TEdgeData >::SetEDat().

1393 { return TEdgeI(EdgeH.GetI(EId), this); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
TIter GetI(const TKey &Key) const
Definition: hash.h:220

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeI TNodeEdgeNet< TNodeData, TEdgeData >::GetEI ( const int &  SrcNId,
const int &  DstNId 
) const
inline

Returns an iterator referring to edge (SrcNId, DstNId) in the graph.

Definition at line 1395 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetEI().

1395 { return GetEI(GetEId(SrcNId, DstNId)); }
TEdgeI GetEI(const int &EId) const
Not supported/implemented!
Definition: network.h:1393
int GetEId(const int &SrcNId, const int &DstNId) const
Definition: network.h:1387

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetEId ( const int &  SrcNId,
const int &  DstNId 
) const
inline

Definition at line 1387 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetEI(), and TNEANet::GetEI().

1387 { int EId; return IsEdge(SrcNId, DstNId, EId)?EId:-1; }
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV ( TIntV EIdV) const

Returns a vector of all edge IDs in the network.

Definition at line 1642 of file network.h.

References TVec< TVal, TSizeTy >::Add(), TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, THash< TKey, TDat, THashFunc >::FFirstKeyId(), THash< TKey, TDat, THashFunc >::FNextKeyId(), TVec< TVal, TSizeTy >::Gen(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEdges(), and THash< TKey, TDat, THashFunc >::GetKey().

1642  {
1643  EIdV.Gen(GetEdges(), 0);
1644  for (int E=EdgeH.FFirstKeyId(); EdgeH.FNextKeyId(E);) {
1645  EIdV.Add(EdgeH.GetKey(E));
1646  }
1647 }
bool FNextKeyId(int &KeyId) const
Definition: hash.h:478
int FFirstKeyId() const
Definition: hash.h:278
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
int GetEdges() const
Returns the number of edges in the network.
Definition: network.h:1354
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:252

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetMxNId ( ) const
inline

Returns an ID that is larger than any node ID in the network.

Definition at line 1350 of file network.h.

1350 { return MxNId; }
TInt MxNId
Definition: network.h:1258
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEdgeNet< TNodeData, TEdgeData >::GetNDat ( const int &  NId)
inline

Returns node data for the node of ID NId in the network.

Definition at line 1346 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat(), TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetInNDat(), TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat(), TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat(), and TNodeEdgeNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNDat().

1346 { return NodeH.GetDat(NId).NodeDat; }
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
TNodeData NodeDat
Definition: network.h:1085
THash< TInt, TNode > NodeH
Definition: network.h:1259

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEdgeNet< TNodeData, TEdgeData >::GetNDat ( const int &  NId) const
inline

Returns node data for the node of ID NId in the network.

Definition at line 1348 of file network.h.

1348 { return NodeH.GetDat(NId).NodeDat; }
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
TNodeData NodeDat
Definition: network.h:1085
THash< TInt, TNode > NodeH
Definition: network.h:1259
template<class TNodeData, class TEdgeData>
TNodeI TNodeEdgeNet< TNodeData, TEdgeData >::GetNI ( const int &  NId) const
inline

Returns an iterator referring to the node of ID NId in the network.

Definition at line 1342 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetRndNI(), TNEANet::GetRndNI(), TUndirNet::GetRndNI(), and TDirNet::GetRndNI().

1342 { return TNodeI(NodeH.GetI(NId), this); }
THash< TInt, TNode > NodeH
Definition: network.h:1259
TIter GetI(const TKey &Key) const
Definition: hash.h:220

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV ( TIntV NIdV) const

Returns a vector of all node IDs in the network.

Definition at line 1634 of file network.h.

References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::FFirstKeyId(), THash< TKey, TDat, THashFunc >::FNextKeyId(), TVec< TVal, TSizeTy >::Gen(), THash< TKey, TDat, THashFunc >::GetKey(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNodes(), and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

1634  {
1635  NIdV.Gen(GetNodes(), 0);
1636  for (int N=NodeH.FFirstKeyId(); NodeH.FNextKeyId(N);) {
1637  NIdV.Add(NodeH.GetKey(N));
1638  }
1639 }
int GetNodes() const
Returns the number of nodes in the network.
Definition: network.h:1307
bool FNextKeyId(int &KeyId) const
Definition: hash.h:478
THash< TInt, TNode > NodeH
Definition: network.h:1259
int FFirstKeyId() const
Definition: hash.h:278
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:252

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
TNode& TNodeEdgeNet< TNodeData, TEdgeData >::GetNode ( const int &  NId)
inlineprivate
template<class TNodeData, class TEdgeData>
const TNode& TNodeEdgeNet< TNodeData, TEdgeData >::GetNode ( const int &  NId) const
inlineprivate

Definition at line 1251 of file network.h.

1251 { return NodeH.GetDat(NId); }
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
THash< TInt, TNode > NodeH
Definition: network.h:1259
template<class TNodeData, class TEdgeData>
const TNode& TNodeEdgeNet< TNodeData, TEdgeData >::GetNodeKId ( const int &  NodeKeyId) const
inlineprivate

Definition at line 1252 of file network.h.

1252 { return NodeH[NodeKeyId]; }
THash< TInt, TNode > NodeH
Definition: network.h:1259
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetNodes ( ) const
inline

Returns the number of nodes in the network.

Definition at line 1307 of file network.h.

Referenced by TUndirNet::BegEI(), TNodeEdgeNet< TSecTm, TSecTm >::Empty(), TNEANet::Empty(), TUndirNet::Empty(), TDirNet::Empty(), and TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV().

1307 { return NodeH.Len(); }
THash< TInt, TNode > NodeH
Definition: network.h:1259
int Len() const
Definition: hash.h:228

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeI TNodeEdgeNet< TNodeData, TEdgeData >::GetRndEI ( TRnd Rnd = TInt::Rnd)
inline

Returns an interator referring to a random edge in the network.

Definition at line 1412 of file network.h.

1412 { return GetEI(GetRndEId(Rnd)); }
TEdgeI GetEI(const int &EId) const
Not supported/implemented!
Definition: network.h:1393
int GetRndEId(TRnd &Rnd=TInt::Rnd)
Returns an ID of a random edge in the network.
Definition: network.h:1410
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetRndEId ( TRnd Rnd = TInt::Rnd)
inline

Returns an ID of a random edge in the network.

Definition at line 1410 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetRndEI(), and TNEANet::GetRndEI().

1410 { return EdgeH.GetKey(EdgeH.GetRndKeyId(Rnd, 0.8)); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
int GetRndKeyId(TRnd &Rnd) const
Get an index of a random element. If the hash table has many deleted keys, this may take a long time...
Definition: hash.h:444
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:252

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TNodeI TNodeEdgeNet< TNodeData, TEdgeData >::GetRndNI ( TRnd Rnd = TInt::Rnd)
inline

Returns an interator referring to a random node in the network.

Definition at line 1408 of file network.h.

1408 { return GetNI(GetRndNId(Rnd)); }
int GetRndNId(TRnd &Rnd=TInt::Rnd)
Returns an ID of a random node in the network.
Definition: network.h:1406
TNodeI GetNI(const int &NId) const
Returns an iterator referring to the node of ID NId in the network.
Definition: network.h:1342
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::GetRndNId ( TRnd Rnd = TInt::Rnd)
inline

Returns an ID of a random node in the network.

Definition at line 1406 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::GetRndNI(), TNEANet::GetRndNI(), TUndirNet::GetRndNI(), and TDirNet::GetRndNI().

1406 { return NodeH.GetKey(NodeH.GetRndKeyId(Rnd, 0.8)); }
THash< TInt, TNode > NodeH
Definition: network.h:1259
int GetRndKeyId(TRnd &Rnd) const
Get an index of a random element. If the hash table has many deleted keys, this may take a long time...
Definition: hash.h:444
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:252

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
int TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges ( const bool &  IsDir = true) const

Returns the number of edges in the network with a unique pair of nodes.

Definition at line 1545 of file network.h.

References THashSet< TKey, THashFunc >::AddKey(), TNodeEdgeNet< TNodeData, TEdgeData >::BegEI(), TNodeEdgeNet< TNodeData, TEdgeData >::EndEI(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEdges(), THashSet< TKey, THashFunc >::Len(), TMath::Mn(), and TMath::Mx().

1545  {
1546  TIntPrSet UniqESet(GetEdges());
1547  for (TEdgeI EI = BegEI(); EI < EndEI(); EI++) {
1548  const int Src = EI.GetSrcNId();
1549  const int Dst = EI.GetDstNId();
1550  if (IsDir) { UniqESet.AddKey(TIntPr(Src, Dst)); }
1551  else { UniqESet.AddKey(TIntPr(TMath::Mn(Src, Dst), TMath::Mx(Src, Dst))); }
1552  }
1553  return UniqESet.Len();
1554 }
static const T & Mn(const T &LVal, const T &RVal)
Definition: xmath.h:36
TPair< TInt, TInt > TIntPr
Definition: ds.h:83
TEdgeI BegEI() const
Returns an iterator referring to the first edge in the network.
Definition: network.h:1389
static const T & Mx(const T &LVal, const T &RVal)
Definition: xmath.h:32
int GetEdges() const
Returns the number of edges in the network.
Definition: network.h:1354
TEdgeI EndEI() const
Returns an iterator referring to the past-the-end edge in the network.
Definition: network.h:1391

Here is the call graph for this function:

template<class TNodeData , class TEdgeData >
bool TNodeEdgeNet< TNodeData, TEdgeData >::HasFlag ( const TGraphFlag Flag) const

Allows for run-time checking the type of the network (see the TGraphFlag for flags).

Definition at line 1458 of file network.h.

References HasGraphFlag.

1458  {
1459  return HasGraphFlag(typename TNet, Flag);
1460 }
#define HasGraphFlag(TGraph, Flag)
For quick testing of the properties of the graph/network object (see TGraphFlag). ...
Definition: gbase.h:41
TNodeEdgeNet< TNodeData, TEdgeData > TNet
Definition: network.h:1078
template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge ( const int &  EId) const
inline

Tests whether an edge with ID EId exists in the network.

Definition at line 1382 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge(), TNodeEdgeNet< TSecTm, TSecTm >::GetEId(), TNEANet::GetEId(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), and TNodeEdgeNet< TNodeData, TEdgeData >::SetEDat().

1382 { return EdgeH.IsKey(EId); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsKey(const TKey &Key) const
Definition: hash.h:258

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge ( const int &  SrcNId,
const int &  DstNId,
const bool &  IsDir = true 
) const
inline

Tests whether an edge from node IDs SrcNId to DstNId exists in the network.

Definition at line 1384 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::IsEdge().

1384 { int EId; return IsEdge(SrcNId, DstNId, EId, IsDir); }
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382

Here is the caller graph for this function:

template<class TNodeData , class TEdgeData >
bool TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge ( const int &  SrcNId,
const int &  DstNId,
int &  EId,
const bool &  IsDir = true 
) const

Tests whether an edge from node IDs SrcNId to DstNId with edge ID EId exists in the network.

Definition at line 1600 of file network.h.

References edge, TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetDstNId(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInEId(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutEId(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetSrcNId(), and TNodeEdgeNet< TNodeData, TEdgeData >::IsNode().

1600  {
1601  if (! IsNode(SrcNId)) { return false; }
1602  if (! IsNode(DstNId)) { return false; }
1603  const TNode& SrcNode = GetNode(SrcNId);
1604  for (int edge = 0; edge < SrcNode.GetOutDeg(); edge++) {
1605  const TEdge& Edge = GetEdge(SrcNode.GetOutEId(edge));
1606  if (DstNId == Edge.GetDstNId()) {
1607  EId = Edge.GetId(); return true; }
1608  }
1609  if (! IsDir) {
1610  for (int edge = 0; edge < SrcNode.GetInDeg(); edge++) {
1611  const TEdge& Edge = GetEdge(SrcNode.GetInEId(edge));
1612  if (DstNId == Edge.GetSrcNId()) {
1613  EId = Edge.GetId(); return true; }
1614  }
1615  }
1616  return false;
1617 }
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
TNode & GetNode(const int &NId)
Definition: network.h:1250
int GetId() const
Definition: network.h:1127
TEdge & GetEdge(const int &EId)
Definition: network.h:1253

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::IsNode ( const int &  NId) const
inline
template<class TNodeData , class TEdgeData >
bool TNodeEdgeNet< TNodeData, TEdgeData >::IsOk ( const bool &  ThrowExcept = true) const

Checks the network data structure for internal consistency.

For each node in the network check that its neighbors are also nodes in the network.

Definition at line 1660 of file network.h.

References TStr::CStr(), EAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH, ErrNotify(), THash< TKey, TDat, THashFunc >::FFirstKeyId(), TStr::Fmt(), THash< TKey, TDat, THashFunc >::FNextKeyId(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetDstNId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetId(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInEId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutEId(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdge::GetSrcNId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV, TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TVec< TVal, TSizeTy >::IsSorted(), TNodeEdgeNet< TNodeData, TEdgeData >::NodeH, and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV.

1660  {
1661  bool RetVal = true;
1662  for (int N = NodeH.FFirstKeyId(); NodeH.FNextKeyId(N); ) {
1663  const TNode& Node = NodeH[N];
1664  if (! Node.OutEIdV.IsSorted()) {
1665  const TStr Msg = TStr::Fmt("Out-edge list of node %d is not sorted.", Node.GetId());
1666  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1667  }
1668  if (! Node.InEIdV.IsSorted()) {
1669  const TStr Msg = TStr::Fmt("In-edge list of node %d is not sorted.", Node.GetId());
1670  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1671  }
1672  // check out-edge ids
1673  int prevEId = -1;
1674  for (int e = 0; e < Node.GetOutDeg(); e++) {
1675  if (! IsEdge(Node.GetOutEId(e))) {
1676  const TStr Msg = TStr::Fmt("Out-edge id %d of node %d does not exist.", Node.GetOutEId(e), Node.GetId());
1677  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1678  }
1679  if (e > 0 && prevEId == Node.GetOutEId(e)) {
1680  const TStr Msg = TStr::Fmt("Node %d has duplidate out-edge id %d.", Node.GetId(), Node.GetOutEId(e));
1681  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1682  }
1683  prevEId = Node.GetOutEId(e);
1684  }
1685  // check in-edge ids
1686  prevEId = -1;
1687  for (int e = 0; e < Node.GetInDeg(); e++) {
1688  if (! IsEdge(Node.GetInEId(e))) {
1689  const TStr Msg = TStr::Fmt("Out-edge id %d of node %d does not exist.", Node.GetInEId(e), Node.GetId());
1690  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1691  }
1692  if (e > 0 && prevEId == Node.GetInEId(e)) {
1693  const TStr Msg = TStr::Fmt("Node %d has duplidate out-edge id %d.", Node.GetId(), Node.GetInEId(e));
1694  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1695  }
1696  prevEId = Node.GetInEId(e);
1697  }
1698  }
1699  for (int E = EdgeH.FFirstKeyId(); EdgeH.FNextKeyId(E); ) {
1700  const TEdge& Edge = EdgeH[E];
1701  if (! IsNode(Edge.GetSrcNId())) {
1702  const TStr Msg = TStr::Fmt("Edge %d source node %d does not exist.", Edge.GetId(), Edge.GetSrcNId());
1703  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1704  }
1705  if (! IsNode(Edge.GetDstNId())) {
1706  const TStr Msg = TStr::Fmt("Edge %d destination node %d does not exist.", Edge.GetId(), Edge.GetDstNId());
1707  if (ThrowExcept) { EAssertR(false, Msg); } else { ErrNotify(Msg.CStr()); } RetVal=false;
1708  }
1709  }
1710  return RetVal;
1711 }
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
void ErrNotify(const char *NotifyCStr)
Definition: bd.h:74
bool FNextKeyId(int &KeyId) const
Definition: hash.h:478
THash< TInt, TNode > NodeH
Definition: network.h:1259
int FFirstKeyId() const
Definition: hash.h:278
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382
Definition: dt.h:412
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
char * CStr()
Definition: dt.h:476

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
static PNet TNodeEdgeNet< TNodeData, TEdgeData >::Load ( TSIn SIn)
inlinestatic

Static constructor that loads the network from a stream SIn and returns a pointer to it.

Definition at line 1290 of file network.h.

1290 { return PNet(new TNet(SIn)); }
TNodeEdgeNet< TNodeData, TEdgeData > TNet
Definition: network.h:1078
TPt< TNet > PNet
Definition: network.h:1079
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::LoadNetworkShM ( TShMIn ShMIn)
inlineprivate

Definition at line 1268 of file network.h.

Referenced by TNodeEdgeNet< TSecTm, TSecTm >::LoadShM().

1268  {
1269  MxNId = TInt(ShMIn);
1270  MxEId = TInt(ShMIn);
1271  LoadTNodeFunctor fn;
1272  NodeH.LoadShM(ShMIn, fn);
1273  EdgeH.LoadShM(ShMIn);
1274  }
TInt MxEId
Definition: network.h:1258
void LoadShM(TShMIn &ShMIn)
Load THash from shared memory file. Copying/Deleting Keys is illegal.
Definition: hash.h:157
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
Definition: dt.h:1134

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
static PNet TNodeEdgeNet< TNodeData, TEdgeData >::LoadShM ( TShMIn ShMIn)
inlinestatic

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 1296 of file network.h.

1296  {
1297  TNet* Network = new TNet();
1298  Network->LoadNetworkShM(ShMIn);
1299  return PNet(Network);
1300  }
TNodeEdgeNet< TNodeData, TEdgeData > TNet
Definition: network.h:1078
TPt< TNet > PNet
Definition: network.h:1079
template<class TNodeData, class TEdgeData>
static PNet TNodeEdgeNet< TNodeData, TEdgeData >::New ( )
inlinestatic

Static constructor that returns a pointer to the network.

Call with: TPt <TNodeEdgeNet<TNodeData, TEdgeData> > Net = TNodeEdgeNet<TNodeData, TEdgeData>::New().

Definition at line 1288 of file network.h.

1288 { return PNet(new TNet()); }
TNodeEdgeNet< TNodeData, TEdgeData > TNet
Definition: network.h:1078
TPt< TNet > PNet
Definition: network.h:1079
template<class TNodeData, class TEdgeData>
TNodeEdgeNet& TNodeEdgeNet< TNodeData, TEdgeData >::operator= ( const TNodeEdgeNet< TNodeData, TEdgeData > &  Net)
inline

Definition at line 1303 of file network.h.

1303  {
1304  if (this!=&Net) { NodeH=Net.NodeH; EdgeH=Net.EdgeH; MxNId=Net.MxNId; MxEId=Net.MxEId; } return *this; }
TInt MxEId
Definition: network.h:1258
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::Reserve ( const int &  Nodes,
const int &  Edges 
)
inline

Reserves memory for a network of Nodes nodes and Edges edges.

Definition at line 1423 of file network.h.

Referenced by TTimeNENet::GetESubGraph(), TTimeNENet::GetSubGraph(), TDirNet::TDirNet(), TNEANet::TNEANet(), TNodeEdgeNet< TSecTm, TSecTm >::TNodeEdgeNet(), and TUndirNet::TUndirNet().

1423  {
1424  if (Nodes>0) { NodeH.Gen(Nodes/2); } if (Edges>0) { EdgeH.Gen(Edges/2); } }
void Gen(const int &ExpectVals)
Definition: hash.h:222
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
virtual void TNodeEdgeNet< TNodeData, TEdgeData >::Save ( TSOut SOut) const
inlinevirtual

Saves the network to a (binary) stream SOut.

Reimplemented in TTimeNENet.

Definition at line 1284 of file network.h.

1284 { MxNId.Save(SOut); MxEId.Save(SOut); NodeH.Save(SOut); EdgeH.Save(SOut); }
TInt MxEId
Definition: network.h:1258
void Save(TSOut &SOut) const
Definition: dt.h:1150
void Save(TSOut &SOut) const
Definition: hash.h:183
TInt MxNId
Definition: network.h:1258
THash< TInt, TNode > NodeH
Definition: network.h:1259
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
template<class TNodeData , class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SetAllEDat ( const TEdgeData &  EdgeDat)

Sets edge data for all the edges in the network to EDat.

Definition at line 1626 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::BegEI(), and TNodeEdgeNet< TNodeData, TEdgeData >::EndEI().

1626  {
1627  for (TEdgeI EI = BegEI(); EI < EndEI(); EI++) {
1628  EI() = EdgeDat;
1629  }
1630 }
TEdgeI BegEI() const
Returns an iterator referring to the first edge in the network.
Definition: network.h:1389
TEdgeI EndEI() const
Returns an iterator referring to the past-the-end edge in the network.
Definition: network.h:1391

Here is the call graph for this function:

template<class TNodeData , class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SetEDat ( const int &  EId,
const TEdgeData &  EdgeDat 
)

Sets edge data for the edge of ID NId in the network.

Definition at line 1620 of file network.h.

References TStr::Fmt(), TNodeEdgeNet< TNodeData, TEdgeData >::TEdgeI::GetDat(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEI(), IAssertR, and TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge().

1620  {
1621  IAssertR(IsEdge(EId), TStr::Fmt("EdgeId %d does not exist.", EId).CStr());
1622  GetEI(EId).GetDat() = EdgeDat;
1623 }
#define IAssertR(Cond, Reason)
Definition: bd.h:265
TEdgeI GetEI(const int &EId) const
Not supported/implemented!
Definition: network.h:1393
const TEdgeData & GetDat() const
Definition: network.h:1240
bool IsEdge(const int &EId) const
Tests whether an edge with ID EId exists in the network.
Definition: network.h:1382
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

template<class TNodeData, class TEdgeData >
void TNodeEdgeNet< TNodeData, TEdgeData >::SetNDat ( const int &  NId,
const TNodeData &  NodeDat 
)

Sets node data for the node of ID NId in the network.

Definition at line 1539 of file network.h.

References TStr::Fmt(), THash< TKey, TDat, THashFunc >::GetDat(), IAssertR, TNodeEdgeNet< TNodeData, TEdgeData >::IsNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::NodeDat, and TNodeEdgeNet< TNodeData, TEdgeData >::NodeH.

1539  {
1540  IAssertR(IsNode(NId), TStr::Fmt("NodeId %d does not exist.", NId).CStr());
1541  NodeH.GetDat(NId).NodeDat = NodeDat;
1542 }
#define IAssertR(Cond, Reason)
Definition: bd.h:265
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
Definition: network.h:1336
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:262
TNodeData NodeDat
Definition: network.h:1085
THash< TInt, TNode > NodeH
Definition: network.h:1259
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SortEIdByDat ( const bool &  Asc = true)
inline

Sorts edges by edge data.

Definition at line 1432 of file network.h.

1432 { EdgeH.SortByDat(Asc); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
void SortByDat(const bool &Asc=true)
Definition: hash.h:292
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SortEIdById ( const bool &  Asc = true)
inline

Sorts edges by edge IDs.

Definition at line 1430 of file network.h.

1430 { EdgeH.SortByKey(Asc); }
THash< TInt, TEdge > EdgeH
Definition: network.h:1260
void SortByKey(const bool &Asc=true)
Definition: hash.h:291
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SortNIdByDat ( const bool &  Asc = true)
inline

Sorts nodes by node data.

Definition at line 1428 of file network.h.

1428 { NodeH.SortByDat(Asc); }
THash< TInt, TNode > NodeH
Definition: network.h:1259
void SortByDat(const bool &Asc=true)
Definition: hash.h:292
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::SortNIdById ( const bool &  Asc = true)
inline

Sorts nodes by node IDs.

Definition at line 1426 of file network.h.

1426 { NodeH.SortByKey(Asc); }
THash< TInt, TNode > NodeH
Definition: network.h:1259
void SortByKey(const bool &Asc=true)
Definition: hash.h:291

Friends And Related Function Documentation

template<class TNodeData, class TEdgeData>
friend class TCrossNet
friend

Adds a node NodeI and its node data to the network.

Definition at line 1327 of file network.h.

template<class TNodeData, class TEdgeData>
friend class TPt< TNodeEdgeNet< TNodeData, TEdgeData > >
friend

Definition at line 1446 of file network.h.

Member Data Documentation

template<class TNodeData, class TEdgeData>
TCRef TNodeEdgeNet< TNodeData, TEdgeData >::CRef
protected

Definition at line 1257 of file network.h.

template<class TNodeData, class TEdgeData>
THash<TInt, TEdge> TNodeEdgeNet< TNodeData, TEdgeData >::EdgeH
protected
template<class TNodeData, class TEdgeData>
THash<TInt, TNode> TNodeEdgeNet< TNodeData, TEdgeData >::NodeH
protected

Definition at line 1259 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNodeUnchecked(), TNodeEdgeNet< TSecTm, TSecTm >::BegNI(), TNEANet::BegNI(), TUndirNet::BegNI(), TDirNet::BegNI(), TNodeEdgeNet< TSecTm, TSecTm >::Clr(), TNEANet::Clr(), TUndirNet::Clr(), TDirNet::Clr(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::DelNode(), TNodeEdgeNet< TSecTm, TSecTm >::EndNI(), TNEANet::EndNI(), TUndirNet::EndNI(), TDirNet::EndNI(), TNEANet::GetNAFltI(), TNEANet::GetNAIntI(), TNEANet::GetNAIntVI(), TNEANet::GetNAStrI(), TNodeEdgeNet< TSecTm, TSecTm >::GetNDat(), TNodeEdgeNet< TSecTm, TSecTm >::GetNI(), TNEANet::GetNI(), TUndirNet::GetNI(), TDirNet::GetNI(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNodeEdgeNet< TSecTm, TSecTm >::GetNode(), TNEANet::GetNode(), TUndirNet::GetNode(), TDirNet::GetNode(), TNodeEdgeNet< TSecTm, TSecTm >::GetNodeKId(), TNodeEdgeNet< TSecTm, TSecTm >::GetNodes(), TNEANet::GetNodes(), TUndirNet::GetNodes(), TDirNet::GetNodes(), TNodeEdgeNet< TSecTm, TSecTm >::GetRndNId(), TNEANet::GetRndNId(), TUndirNet::GetRndNId(), TDirNet::GetRndNId(), TNodeEdgeNet< TSecTm, TSecTm >::IsNode(), TNEANet::IsNode(), TUndirNet::IsNode(), TDirNet::IsNode(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNodeEdgeNet< TSecTm, TSecTm >::LoadNetworkShM(), TUndirNet::LoadNetworkShM(), TDirNet::LoadNetworkShM(), TNodeEdgeNet< TSecTm, TSecTm >::operator=(), TNEANet::operator=(), TUndirNet::operator=(), TDirNet::operator=(), TNodeEdgeNet< TSecTm, TSecTm >::Reserve(), TNEANet::Reserve(), TUndirNet::Reserve(), TDirNet::Reserve(), TNodeEdgeNet< TSecTm, TSecTm >::Save(), TNEANet::Save(), TUndirNet::Save(), TDirNet::Save(), TNEANet::Save_V1(), TUndirNet::Save_V1(), TDirNet::Save_V1(), TNEANet::Save_V2(), TNodeEdgeNet< TNodeData, TEdgeData >::SetNDat(), TNodeEdgeNet< TSecTm, TSecTm >::SortNIdByDat(), and TNodeEdgeNet< TSecTm, TSecTm >::SortNIdById().


The documentation for this class was generated from the following file: