SNAP Library 6.0, User Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TDirNet::TNode Class Reference

#include <network.h>

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 IsInNId (const int &NId) const
 
bool IsOutNId (const int &NId) const
 
bool IsNbrNId (const int &NId) const
 
void PackOutNIdV ()
 
void PackNIdV ()
 
void SortNIdV ()
 
void LoadShM (TShMIn &MStream)
 

Private Attributes

TInt Id
 
TIntV InNIdV
 
TIntV OutNIdV
 

Friends

class TDirNet
 
class TDirNetMtx
 

Detailed Description

Definition at line 3971 of file network.h.

Constructor & Destructor Documentation

TDirNet::TNode::TNode ( )
inline

Definition at line 3976 of file network.h.

3976 : Id(-1), InNIdV(), OutNIdV() { }
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974
TDirNet::TNode::TNode ( const int &  NId)
inline

Definition at line 3977 of file network.h.

3977 : Id(NId), InNIdV(), OutNIdV() { }
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974
TDirNet::TNode::TNode ( const TNode Node)
inline

Definition at line 3978 of file network.h.

3978 : Id(Node.Id), InNIdV(Node.InNIdV), OutNIdV(Node.OutNIdV) { }
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974
TDirNet::TNode::TNode ( TSIn SIn)
inline

Definition at line 3979 of file network.h.

3979 : Id(SIn), InNIdV(SIn), OutNIdV(SIn) { }
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974

Member Function Documentation

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

Definition at line 3982 of file network.h.

3982 { return GetInDeg() + GetOutDeg(); }
int GetInDeg() const
Definition: network.h:3983
int GetOutDeg() const
Definition: network.h:3984
int TDirNet::TNode::GetId ( ) const
inline

Definition at line 3981 of file network.h.

3981 { return Id; }
int TDirNet::TNode::GetInDeg ( ) const
inline

Definition at line 3983 of file network.h.

3983 { return InNIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TIntV InNIdV
Definition: network.h:3974
int TDirNet::TNode::GetInNId ( const int &  NodeN) const
inline

Definition at line 3985 of file network.h.

3985 { return InNIdV[NodeN]; }
TIntV InNIdV
Definition: network.h:3974
int TDirNet::TNode::GetNbrNId ( const int &  NodeN) const
inline

Definition at line 3987 of file network.h.

3987 { return NodeN<GetOutDeg()?GetOutNId(NodeN):GetInNId(NodeN-GetOutDeg()); }
int GetOutNId(const int &NodeN) const
Definition: network.h:3986
int GetInNId(const int &NodeN) const
Definition: network.h:3985
int GetOutDeg() const
Definition: network.h:3984
int TDirNet::TNode::GetOutDeg ( ) const
inline

Definition at line 3984 of file network.h.

3984 { return OutNIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TIntV OutNIdV
Definition: network.h:3974
int TDirNet::TNode::GetOutNId ( const int &  NodeN) const
inline

Definition at line 3986 of file network.h.

3986 { return OutNIdV[NodeN]; }
TIntV OutNIdV
Definition: network.h:3974
bool TDirNet::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 3988 of file network.h.

3988 { return InNIdV.SearchBin(NId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519
TIntV InNIdV
Definition: network.h:3974
bool TDirNet::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 3990 of file network.h.

3990 { return IsOutNId(NId) || IsInNId(NId); }
bool IsInNId(const int &NId) const
Definition: network.h:3988
bool IsOutNId(const int &NId) const
Definition: network.h:3989
bool TDirNet::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 3989 of file network.h.

3989 { return OutNIdV.SearchBin(NId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519
TIntV OutNIdV
Definition: network.h:3974
void TDirNet::TNode::LoadShM ( TShMIn MStream)
inline

Definition at line 3994 of file network.h.

3994  {
3995  Id = TInt(MStream);
3996  InNIdV.LoadShM(MStream);
3997  OutNIdV.LoadShM(MStream);
3998  }
Definition: dt.h:1137
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974
void TDirNet::TNode::PackNIdV ( )
inline

Definition at line 3992 of file network.h.

3992 { InNIdV.Pack(); }
TIntV InNIdV
Definition: network.h:3974
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
void TDirNet::TNode::PackOutNIdV ( )
inline

Definition at line 3991 of file network.h.

3991 { OutNIdV.Pack(); }
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
TIntV OutNIdV
Definition: network.h:3974
void TDirNet::TNode::Save ( TSOut SOut) const
inline

Definition at line 3980 of file network.h.

3980 { Id.Save(SOut); InNIdV.Save(SOut); OutNIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1153
void Save(TSOut &SOut) const
Definition: ds.h:954
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974
void TDirNet::TNode::SortNIdV ( )
inline

Definition at line 3993 of file network.h.

3993 { InNIdV.Sort(); OutNIdV.Sort();}
void Sort(const bool &Asc=true)
Sorts the elements of the vector.
Definition: ds.h:1318
TIntV InNIdV
Definition: network.h:3974
TIntV OutNIdV
Definition: network.h:3974

Friends And Related Function Documentation

friend class TDirNet
friend

Definition at line 3999 of file network.h.

friend class TDirNetMtx
friend

Definition at line 4000 of file network.h.

Member Data Documentation

TInt TDirNet::TNode::Id
private

Definition at line 3973 of file network.h.

TIntV TDirNet::TNode::InNIdV
private

Definition at line 3974 of file network.h.

TIntV TDirNet::TNode::OutNIdV
private

Definition at line 3974 of file network.h.


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