SNAP Library 3.0, User Reference  2016-07-20 17:56:49
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 ()
 

Private Attributes

TInt Id
 
TIntV InNIdV
 
TIntV OutNIdV
 

Friends

class TDirNet
 
class TDirNetMtx
 

Detailed Description

Definition at line 3272 of file network.h.

Constructor & Destructor Documentation

TDirNet::TNode::TNode ( )
inline

Definition at line 3277 of file network.h.

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

Definition at line 3278 of file network.h.

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

Definition at line 3279 of file network.h.

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

Definition at line 3280 of file network.h.

3280 : Id(SIn), InNIdV(SIn), OutNIdV(SIn) { }
TIntV InNIdV
Definition: network.h:3275
TIntV OutNIdV
Definition: network.h:3275

Member Function Documentation

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

Definition at line 3283 of file network.h.

3283 { return GetInDeg() + GetOutDeg(); }
int GetInDeg() const
Definition: network.h:3284
int GetOutDeg() const
Definition: network.h:3285
int TDirNet::TNode::GetId ( ) const
inline

Definition at line 3282 of file network.h.

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

Definition at line 3284 of file network.h.

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

Definition at line 3286 of file network.h.

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

Definition at line 3288 of file network.h.

3288 { return NodeN<GetOutDeg()?GetOutNId(NodeN):GetInNId(NodeN-GetOutDeg()); }
int GetOutNId(const int &NodeN) const
Definition: network.h:3287
int GetInNId(const int &NodeN) const
Definition: network.h:3286
int GetOutDeg() const
Definition: network.h:3285
int TDirNet::TNode::GetOutDeg ( ) const
inline

Definition at line 3285 of file network.h.

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

Definition at line 3287 of file network.h.

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

Definition at line 3289 of file network.h.

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

Definition at line 3291 of file network.h.

3291 { return IsOutNId(NId) || IsInNId(NId); }
bool IsInNId(const int &NId) const
Definition: network.h:3289
bool IsOutNId(const int &NId) const
Definition: network.h:3290
bool TDirNet::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 3290 of file network.h.

3290 { return OutNIdV.SearchBin(NId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1454
TIntV OutNIdV
Definition: network.h:3275
void TDirNet::TNode::PackNIdV ( )
inline

Definition at line 3293 of file network.h.

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

Definition at line 3292 of file network.h.

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

Definition at line 3281 of file network.h.

3281 { Id.Save(SOut); InNIdV.Save(SOut); OutNIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1060
void Save(TSOut &SOut) const
Definition: ds.h:903
TIntV InNIdV
Definition: network.h:3275
TIntV OutNIdV
Definition: network.h:3275

Friends And Related Function Documentation

friend class TDirNet
friend

Definition at line 3294 of file network.h.

friend class TDirNetMtx
friend

Definition at line 3295 of file network.h.

Member Data Documentation

TInt TDirNet::TNode::Id
private

Definition at line 3274 of file network.h.

TIntV TDirNet::TNode::InNIdV
private

Definition at line 3275 of file network.h.

TIntV TDirNet::TNode::OutNIdV
private

Definition at line 3275 of file network.h.


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