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
TNodeEdgeNet< TNodeData, TEdgeData >::TNode Class Reference

#include <network.h>

Collaboration diagram for TNodeEdgeNet< TNodeData, TEdgeData >::TNode:

Public Member Functions

 TNode ()
 
 TNode (const int &NId)
 
 TNode (const int &NId, const TNodeData &NodeData)
 
 TNode (const TNode &Node)
 
 TNode (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
bool operator< (const TNode &Node) const
 
int GetId () const
 
int GetDeg () const
 
int GetInDeg () const
 
int GetOutDeg () const
 
const TNodeData & GetDat () const
 
TNodeData & GetDat ()
 
int GetInEId (const int &NodeN) const
 
int GetOutEId (const int &NodeN) const
 
int GetNbrEId (const int &EdgeN) const
 
bool IsInEId (const int &EId) const
 
bool IsOutEId (const int &EId) const
 
bool IsNbrEId (const int &EId) const
 
void LoadShM (TShMIn &MStream)
 

Private Attributes

TInt Id
 
TIntV InEIdV
 
TIntV OutEIdV
 
TNodeData NodeDat
 

Friends

class TNodeEdgeNet< TNodeData, TEdgeData >
 

Detailed Description

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

Definition at line 1081 of file network.h.

Constructor & Destructor Documentation

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

Definition at line 1087 of file network.h.

1087 : Id(-1), InEIdV(), OutEIdV(), NodeDat() { }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId)
inline

Definition at line 1088 of file network.h.

1088 : Id(NId), InEIdV(), OutEIdV(), NodeDat() { }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId,
const TNodeData &  NodeData 
)
inline

Definition at line 1089 of file network.h.

1089 : Id(NId), InEIdV(), OutEIdV(), NodeDat(NodeData) { }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const TNode Node)
inline

Definition at line 1090 of file network.h.

1090 : Id(Node.Id), InEIdV(Node.InEIdV), OutEIdV(Node.OutEIdV), NodeDat(Node.NodeDat) { }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( TSIn SIn)
inline

Definition at line 1091 of file network.h.

1091 : Id(SIn), InEIdV(SIn), OutEIdV(SIn), NodeDat(SIn) { }
TNodeData NodeDat
Definition: network.h:1085

Member Function Documentation

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetDat ( ) const
inline

Definition at line 1098 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::NodeDat.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::IsOutNId().

1098 { return NodeDat; }
TNodeData NodeDat
Definition: network.h:1085

Here is the caller graph for this function:

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

Definition at line 1099 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::NodeDat.

1099 { return NodeDat; }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetDeg ( ) const
inline

Definition at line 1095 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInDeg(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg().

1095 { return GetInDeg() + GetOutDeg(); }
int GetOutDeg() const
Definition: network.h:1097
int GetInDeg() const
Definition: network.h:1096

Here is the call graph for this function:

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

Definition at line 1094 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::Id.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::IsOk().

1094 { return Id; }

Here is the caller graph for this function:

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

Definition at line 1096 of file network.h.

References TVec< TVal, TSizeTy >::Len().

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::DelNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::IsInNId(), and TNodeEdgeNet< TNodeData, TEdgeData >::IsOk().

1096 { return InEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575

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 >::TNode::GetInEId ( const int &  NodeN) const
inline
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetNbrEId ( const int &  EdgeN) const
inline

Definition at line 1102 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInEId(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutEId().

1102 { return EdgeN<GetOutDeg()?GetOutEId(EdgeN):GetInEId(EdgeN-GetOutDeg()); }
int GetOutDeg() const
Definition: network.h:1097
int GetInEId(const int &NodeN) const
Definition: network.h:1100
int GetOutEId(const int &NodeN) const
Definition: network.h:1101

Here is the call graph for this function:

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

Definition at line 1097 of file network.h.

References TVec< TVal, TSizeTy >::Len().

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::DelNode(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetNbrEId(), TNodeEdgeNet< TNodeData, TEdgeData >::IsEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNodeI::IsOutNId().

1097 { return OutEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575

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 >::TNode::GetOutEId ( const int &  NodeN) const
inline
template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsInEId ( const int &  EId) const
inline

Definition at line 1103 of file network.h.

References TVec< TVal, TSizeTy >::SearchBin().

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsNbrEId().

1103 { return InEIdV.SearchBin(EId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1105 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsInEId(), and TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsOutEId().

1105 { return IsInEId(EId) || IsOutEId(EId); }
bool IsOutEId(const int &EId) const
Definition: network.h:1104
bool IsInEId(const int &EId) const
Definition: network.h:1103

Here is the call graph for this function:

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

Definition at line 1104 of file network.h.

References TVec< TVal, TSizeTy >::SearchBin().

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsNbrEId().

1104 { return OutEIdV.SearchBin(EId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519

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 >::TNode::LoadShM ( TShMIn MStream)
inline

Definition at line 1106 of file network.h.

References TVec< TVal, TSizeTy >::LoadShM().

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::LoadTNodeFunctor::operator()().

1106  {
1107  Id = TInt(MStream);
1108  InEIdV.LoadShM(MStream);
1109  OutEIdV.LoadShM(MStream);
1110  NodeDat = TNodeData(MStream);
1111  }
TNodeData NodeDat
Definition: network.h:1085
Definition: dt.h:1137
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::TNode::operator< ( const TNode Node) const
inline

Definition at line 1093 of file network.h.

References TNodeEdgeNet< TNodeData, TEdgeData >::TNode::NodeDat.

1093 { return NodeDat < Node.NodeDat; }
TNodeData NodeDat
Definition: network.h:1085
template<class TNodeData, class TEdgeData>
void TNodeEdgeNet< TNodeData, TEdgeData >::TNode::Save ( TSOut SOut) const
inline

Definition at line 1092 of file network.h.

References TVec< TVal, TSizeTy >::Save(), and TInt::Save().

1092 { Id.Save(SOut); InEIdV.Save(SOut); OutEIdV.Save(SOut); NodeDat.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1153
TNodeData NodeDat
Definition: network.h:1085
void Save(TSOut &SOut) const
Definition: ds.h:954

Here is the call graph for this function:

Friends And Related Function Documentation

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

Definition at line 1112 of file network.h.

Member Data Documentation

template<class TNodeData, class TEdgeData>
TInt TNodeEdgeNet< TNodeData, TEdgeData >::TNode::Id
private

Definition at line 1083 of file network.h.

Referenced by TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetId().

template<class TNodeData, class TEdgeData>
TIntV TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV
private
template<class TNodeData, class TEdgeData>
TNodeData TNodeEdgeNet< TNodeData, TEdgeData >::TNode::NodeDat
private
template<class TNodeData, class TEdgeData>
TIntV TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV
private

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