SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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
TUndirNet::TNode Class Reference

#include <network.h>

Collaboration diagram for TUndirNet::TNode:

Public Member Functions

 TNode ()
 
 TNode (const int &NId)
 
 TNode (const TNode &Node)
 
 TNode (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
int GetId () const
 
int GetDeg () const
 
int GetInDeg () const
 
int GetOutDeg () const
 
int GetInNId (const int &NodeN) const
 
int GetOutNId (const int &NodeN) const
 
int GetNbrNId (const int &NodeN) const
 
bool IsNbrNId (const int &NId) const
 
bool IsInNId (const int &NId) const
 
bool IsOutNId (const int &NId) const
 
void PackOutNIdV ()
 
void PackNIdV ()
 
void SortNIdV ()
 
void LoadShM (TShMIn &MStream)
 

Private Attributes

TInt Id
 
TIntV NIdV
 

Friends

class TUndirNet
 
class TUndirNetMtx
 

Detailed Description

Definition at line 3150 of file network.h.

Constructor & Destructor Documentation

TUndirNet::TNode::TNode ( )
inline

Definition at line 3155 of file network.h.

3155 : Id(-1), NIdV() { }
TUndirNet::TNode::TNode ( const int &  NId)
inline

Definition at line 3156 of file network.h.

3156 : Id(NId), NIdV() { }
TUndirNet::TNode::TNode ( const TNode Node)
inline

Definition at line 3157 of file network.h.

3157 : Id(Node.Id), NIdV(Node.NIdV) { }
TUndirNet::TNode::TNode ( TSIn SIn)
inline

Definition at line 3158 of file network.h.

3158 : Id(SIn), NIdV(SIn) { }

Member Function Documentation

int TUndirNet::TNode::GetDeg ( ) const
inline

Definition at line 3161 of file network.h.

Referenced by TUndirNet::AddNode(), TUndirNet::DelNode(), TUndirNet::Dump(), and TUndirNet::IsOk().

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

Here is the caller graph for this function:

int TUndirNet::TNode::GetId ( ) const
inline

Definition at line 3160 of file network.h.

Referenced by TUndirNet::DelNode(), TUndirNet::Dump(), and TUndirNet::IsOk().

3160 { return Id; }

Here is the caller graph for this function:

int TUndirNet::TNode::GetInDeg ( ) const
inline

Definition at line 3162 of file network.h.

3162 { return GetDeg(); }
int GetDeg() const
Definition: network.h:3161
int TUndirNet::TNode::GetInNId ( const int &  NodeN) const
inline

Definition at line 3164 of file network.h.

3164 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: network.h:3166
int TUndirNet::TNode::GetNbrNId ( const int &  NodeN) const
inline

Definition at line 3166 of file network.h.

Referenced by TUndirNet::DelNode(), TUndirNet::Dump(), and TUndirNet::IsOk().

3166 { return NIdV[NodeN]; }

Here is the caller graph for this function:

int TUndirNet::TNode::GetOutDeg ( ) const
inline

Definition at line 3163 of file network.h.

3163 { return GetDeg(); }
int GetDeg() const
Definition: network.h:3161
int TUndirNet::TNode::GetOutNId ( const int &  NodeN) const
inline

Definition at line 3165 of file network.h.

3165 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: network.h:3166
bool TUndirNet::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 3168 of file network.h.

3168 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: network.h:3167
bool TUndirNet::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 3167 of file network.h.

3167 { return NIdV.SearchBin(NId)!=-1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519
bool TUndirNet::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 3169 of file network.h.

3169 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: network.h:3167
void TUndirNet::TNode::LoadShM ( TShMIn MStream)
inline

Definition at line 3173 of file network.h.

Referenced by TUndirNet::LoadTNodeFunctor::operator()().

3173  {
3174  Id = TInt(MStream);
3175  NIdV.LoadShM(MStream);
3176  }
Definition: dt.h:1134
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932

Here is the caller graph for this function:

void TUndirNet::TNode::PackNIdV ( )
inline

Definition at line 3171 of file network.h.

3171 { NIdV.Pack(); }
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
void TUndirNet::TNode::PackOutNIdV ( )
inline

Definition at line 3170 of file network.h.

3170 { NIdV.Pack(); }
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
void TUndirNet::TNode::Save ( TSOut SOut) const
inline

Definition at line 3159 of file network.h.

3159 { Id.Save(SOut); NIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1150
void Save(TSOut &SOut) const
Definition: ds.h:954
void TUndirNet::TNode::SortNIdV ( )
inline

Definition at line 3172 of file network.h.

3172 { NIdV.Sort();}
void Sort(const bool &Asc=true)
Sorts the elements of the vector.
Definition: ds.h:1318

Friends And Related Function Documentation

friend class TUndirNet
friend

Definition at line 3177 of file network.h.

friend class TUndirNetMtx
friend

Definition at line 3178 of file network.h.

Member Data Documentation

TInt TUndirNet::TNode::Id
private

Definition at line 3152 of file network.h.

Referenced by TUndirNet::AddNode().

TIntV TUndirNet::TNode::NIdV
private

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