SNAP Library 6.0, Developer 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>

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 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.

References TVec< TVal, TSizeTy >::Len().

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 3412 of file network.h.

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

3412 { return Id; }

Here is the caller graph for this function:

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.

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

3418 { return NIdV[NodeN]; }

Here is the caller graph for this function:

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.

References TVec< TVal, TSizeTy >::SearchBin().

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

Here is the call graph for this function:

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.

References TVec< TVal, TSizeTy >::LoadShM().

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void TUndirNet::TNode::PackNIdV ( )
inline

Definition at line 3423 of file network.h.

References TVec< TVal, TSizeTy >::Pack().

3423 { NIdV.Pack(); }
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057

Here is the call graph for this function:

void TUndirNet::TNode::PackOutNIdV ( )
inline

Definition at line 3422 of file network.h.

References TVec< TVal, TSizeTy >::Pack().

3422 { NIdV.Pack(); }
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057

Here is the call graph for this function:

void TUndirNet::TNode::Save ( TSOut SOut) const
inline

Definition at line 3411 of file network.h.

References TVec< TVal, TSizeTy >::Save(), and TInt::Save().

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

Here is the call graph for this function:

void TUndirNet::TNode::SortNIdV ( )
inline

Definition at line 3424 of file network.h.

References TVec< TVal, TSizeTy >::Sort().

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

Here is the call graph for this function:

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.

Referenced by TUndirNet::AddNode().

TIntV TUndirNet::TNode::NIdV
private

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