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
TUndirNet::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 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 3402 of file network.h.

Constructor & Destructor Documentation

TUndirNet::TNode::TNode ( )
inline

Definition at line 3407 of file network.h.

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

Definition at line 3408 of file network.h.

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

Definition at line 3409 of file network.h.

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

Definition at line 3410 of file network.h.

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

Member Function Documentation

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

Definition at line 3413 of file network.h.

3413 { return NIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
int TUndirNet::TNode::GetId ( ) const
inline

Definition at line 3412 of file network.h.

3412 { return Id; }
int TUndirNet::TNode::GetInDeg ( ) const
inline

Definition at line 3414 of file network.h.

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

Definition at line 3416 of file network.h.

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

Definition at line 3418 of file network.h.

3418 { return NIdV[NodeN]; }
int TUndirNet::TNode::GetOutDeg ( ) const
inline

Definition at line 3415 of file network.h.

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

Definition at line 3417 of file network.h.

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

Definition at line 3420 of file network.h.

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

Definition at line 3419 of file network.h.

3419 { 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 3421 of file network.h.

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

Definition at line 3425 of file network.h.

3425  {
3426  Id = TInt(MStream);
3427  NIdV.LoadShM(MStream);
3428  }
Definition: dt.h:1137
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932
void TUndirNet::TNode::PackNIdV ( )
inline

Definition at line 3423 of file network.h.

3423 { 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 3422 of file network.h.

3422 { 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 3411 of file network.h.

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

Definition at line 3424 of file network.h.

3424 { 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 3429 of file network.h.

friend class TUndirNetMtx
friend

Definition at line 3430 of file network.h.

Member Data Documentation

TInt TUndirNet::TNode::Id
private

Definition at line 3404 of file network.h.

TIntV TUndirNet::TNode::NIdV
private

Definition at line 3405 of file network.h.


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