SNAP Library 4.0, User 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
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 3719 of file network.h.

Constructor & Destructor Documentation

TDirNet::TNode::TNode ( )
inline

Definition at line 3724 of file network.h.

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

Definition at line 3725 of file network.h.

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

Definition at line 3726 of file network.h.

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

Definition at line 3727 of file network.h.

3727 : Id(SIn), InNIdV(SIn), OutNIdV(SIn) { }
TIntV InNIdV
Definition: network.h:3722
TIntV OutNIdV
Definition: network.h:3722

Member Function Documentation

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

Definition at line 3730 of file network.h.

3730 { return GetInDeg() + GetOutDeg(); }
int GetInDeg() const
Definition: network.h:3731
int GetOutDeg() const
Definition: network.h:3732
int TDirNet::TNode::GetId ( ) const
inline

Definition at line 3729 of file network.h.

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

Definition at line 3731 of file network.h.

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

Definition at line 3733 of file network.h.

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

Definition at line 3735 of file network.h.

3735 { return NodeN<GetOutDeg()?GetOutNId(NodeN):GetInNId(NodeN-GetOutDeg()); }
int GetOutNId(const int &NodeN) const
Definition: network.h:3734
int GetInNId(const int &NodeN) const
Definition: network.h:3733
int GetOutDeg() const
Definition: network.h:3732
int TDirNet::TNode::GetOutDeg ( ) const
inline

Definition at line 3732 of file network.h.

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

Definition at line 3734 of file network.h.

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

Definition at line 3736 of file network.h.

3736 { 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:3722
bool TDirNet::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 3738 of file network.h.

3738 { return IsOutNId(NId) || IsInNId(NId); }
bool IsInNId(const int &NId) const
Definition: network.h:3736
bool IsOutNId(const int &NId) const
Definition: network.h:3737
bool TDirNet::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 3737 of file network.h.

3737 { 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:3722
void TDirNet::TNode::LoadShM ( TShMIn MStream)
inline

Definition at line 3742 of file network.h.

3742  {
3743  Id = TInt(MStream);
3744  InNIdV.LoadShM(MStream);
3745  OutNIdV.LoadShM(MStream);
3746  }
Definition: dt.h:1134
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932
TIntV InNIdV
Definition: network.h:3722
TIntV OutNIdV
Definition: network.h:3722
void TDirNet::TNode::PackNIdV ( )
inline

Definition at line 3740 of file network.h.

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

Definition at line 3739 of file network.h.

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

Definition at line 3728 of file network.h.

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

Definition at line 3741 of file network.h.

3741 { 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:3722
TIntV OutNIdV
Definition: network.h:3722

Friends And Related Function Documentation

friend class TDirNet
friend

Definition at line 3747 of file network.h.

friend class TDirNetMtx
friend

Definition at line 3748 of file network.h.

Member Data Documentation

TInt TDirNet::TNode::Id
private

Definition at line 3721 of file network.h.

TIntV TDirNet::TNode::InNIdV
private

Definition at line 3722 of file network.h.

TIntV TDirNet::TNode::OutNIdV
private

Definition at line 3722 of file network.h.


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