SNAP Library 4.0, Developer 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
TNodeEDatNet< TNodeData, TEdgeData >::TNode Class Reference

#include <network.h>

Collaboration diagram for TNodeEDatNet< TNodeData, TEdgeData >::TNode:

Public Member Functions

 TNode ()
 
 TNode (const int &NId)
 
 TNode (const int &NId, const TNodeData &NodeData)
 
 TNode (const TNode &Node)
 
 TNode (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
int GetId () const
 
int GetDeg () const
 
int GetInDeg () const
 
int GetOutDeg () const
 
const TNodeData & GetDat () const
 
TNodeData & GetDat ()
 
int GetInNId (const int &EdgeN) const
 
int GetOutNId (const int &EdgeN) const
 
int GetNbrNId (const int &EdgeN) const
 
TEdgeData & GetOutEDat (const int &EdgeN)
 
const TEdgeData & GetOutEDat (const int &EdgeN) const
 
bool IsInNId (const int &NId) const
 
bool IsOutNId (const int &NId) const
 
bool IsNbrNId (const int &NId) const
 
void LoadShM (TShMIn &MStream)
 
bool operator< (const TNode &Node) const
 

Private Attributes

TInt Id
 
TNodeData NodeDat
 
TIntV InNIdV
 
TNIdDatPrV OutNIdV
 

Friends

class TNodeEDatNet< TNodeData, TEdgeData >
 

Detailed Description

template<class TNodeData, class TEdgeData>
class TNodeEDatNet< TNodeData, TEdgeData >::TNode

Definition at line 499 of file network.h.

Constructor & Destructor Documentation

template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNode::TNode ( )
inline

Definition at line 506 of file network.h.

506 : Id(-1), NodeDat(), InNIdV(), OutNIdV() { }
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId)
inline

Definition at line 507 of file network.h.

507 : Id(NId), NodeDat(), InNIdV(), OutNIdV() { }
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId,
const TNodeData &  NodeData 
)
inline

Definition at line 508 of file network.h.

508 : Id(NId), NodeDat(NodeData), InNIdV(), OutNIdV() { }
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNode::TNode ( const TNode Node)
inline

Definition at line 509 of file network.h.

509 : Id(Node.Id), NodeDat(Node.NodeDat), InNIdV(Node.InNIdV), OutNIdV(Node.OutNIdV) { }
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNode::TNode ( TSIn SIn)
inline

Definition at line 510 of file network.h.

510 : Id(SIn), NodeDat(SIn), InNIdV(SIn), OutNIdV(SIn) { }
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504

Member Function Documentation

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetDat ( ) const
inline

Definition at line 516 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::NodeDat.

516 { return NodeDat; }
TNodeData NodeDat
Definition: network.h:502
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetDat ( )
inline

Definition at line 517 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::NodeDat.

517 { return NodeDat; }
TNodeData NodeDat
Definition: network.h:502
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetDeg ( ) const
inline

Definition at line 513 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutDeg().

513 { return GetInDeg() + GetOutDeg(); }
int GetOutDeg() const
Definition: network.h:515
int GetInDeg() const
Definition: network.h:514

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetId ( ) const
inline

Definition at line 512 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::Id.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::IsOk().

512 { return Id; }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInDeg ( ) const
inline

Definition at line 514 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::InNIdV, and TVec< TVal, TSizeTy >::Len().

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::DelNode(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::IsOk().

514 { return InNIdV.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:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInNId ( const int &  EdgeN) const
inline
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetNbrNId ( const int &  EdgeN) const
inline

Definition at line 520 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutNId().

520 { return EdgeN<GetOutDeg() ? GetOutNId(EdgeN):GetInNId(EdgeN-GetOutDeg()); }
int GetInNId(const int &EdgeN) const
Definition: network.h:518
int GetOutNId(const int &EdgeN) const
Definition: network.h:519
int GetOutDeg() const
Definition: network.h:515

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutDeg ( ) const
inline

Definition at line 515 of file network.h.

References TVec< TVal, TSizeTy >::Len(), and TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::DelNode(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetDeg(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetNbrNId(), and TNodeEDatNet< TNodeData, TEdgeData >::IsOk().

515 { return OutNIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutEDat ( const int &  EdgeN)
inline

Definition at line 521 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::GetEDat().

521 { return OutNIdV[EdgeN].Val2; }
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutEDat ( const int &  EdgeN) const
inline

Definition at line 522 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

522 { return OutNIdV[EdgeN].Val2; }
TNIdDatPrV OutNIdV
Definition: network.h:504
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutNId ( const int &  EdgeN) const
inline

Definition at line 519 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::DelNode(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetNbrNId(), and TNodeEDatNet< TNodeData, TEdgeData >::IsOk().

519 { return OutNIdV[EdgeN].Val1; }
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 523 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::InNIdV, and TVec< TVal, TSizeTy >::SearchBin().

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsNbrNId().

523 { return InNIdV.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:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 525 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsInNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsOutNId().

525 { return IsOutNId(NId) || IsInNId(NId); }
bool IsOutNId(const int &NId) const
Definition: network.h:524
bool IsInNId(const int &NId) const
Definition: network.h:523

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 524 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::GetNIdPos(), and TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsNbrNId().

524 { return TNodeEDatNet::GetNIdPos(OutNIdV, NId)!=-1; }
static int GetNIdPos(const TVec< TPair< TInt, TEdgeData > > &NIdV, const int &NId)
Definition: network.h:823
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
void TNodeEDatNet< TNodeData, TEdgeData >::TNode::LoadShM ( TShMIn MStream)
inline

Definition at line 526 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::Id, TNodeEDatNet< TNodeData, TEdgeData >::TNode::InNIdV, TVec< TVal, TSizeTy >::LoadShM(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::NodeDat, and TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeFunctor::operator()().

526  {
527  Id = TInt(MStream);
528  NodeDat = TNodeData(MStream);
529  InNIdV.LoadShM(MStream);
530  OutNIdV.LoadShM(MStream);
531  }
Definition: dt.h:1134
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::operator< ( const TNode Node) const
inline

Definition at line 532 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::NodeDat.

532 { return NodeDat < Node.NodeDat; }
TNodeData NodeDat
Definition: network.h:502
template<class TNodeData, class TEdgeData>
void TNodeEDatNet< TNodeData, TEdgeData >::TNode::Save ( TSOut SOut) const
inline

Definition at line 511 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNode::Id, TNodeEDatNet< TNodeData, TEdgeData >::TNode::InNIdV, TNodeEDatNet< TNodeData, TEdgeData >::TNode::NodeDat, TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV, TVec< TVal, TSizeTy >::Save(), and TInt::Save().

511 { Id.Save(SOut); NodeDat.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
TNodeData NodeDat
Definition: network.h:502
TNIdDatPrV OutNIdV
Definition: network.h:504

Here is the call graph for this function:

Friends And Related Function Documentation

template<class TNodeData, class TEdgeData>
friend class TNodeEDatNet< TNodeData, TEdgeData >
friend

Definition at line 533 of file network.h.

Member Data Documentation

template<class TNodeData, class TEdgeData>
TInt TNodeEDatNet< TNodeData, TEdgeData >::TNode::Id
private

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