SNAP Library 3.0, Developer 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
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
 
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 452 of file network.h.

Constructor & Destructor Documentation

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

Definition at line 459 of file network.h.

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

Definition at line 460 of file network.h.

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

Definition at line 461 of file network.h.

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

Definition at line 462 of file network.h.

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

Definition at line 463 of file network.h.

463 : Id(SIn), NodeDat(SIn), InNIdV(SIn), OutNIdV(SIn) { }
TNodeData NodeDat
Definition: network.h:455
TNIdDatPrV OutNIdV
Definition: network.h:457

Member Function Documentation

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

Definition at line 469 of file network.h.

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

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

Definition at line 470 of file network.h.

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

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

Definition at line 466 of file network.h.

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

466 { return GetInDeg() + GetOutDeg(); }
int GetOutDeg() const
Definition: network.h:468
int GetInDeg() const
Definition: network.h:467

Here is the call graph for this function:

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

Definition at line 465 of file network.h.

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

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

465 { 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 467 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().

467 { return InNIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547

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 473 of file network.h.

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

473 { return EdgeN<GetOutDeg() ? GetOutNId(EdgeN):GetInNId(EdgeN-GetOutDeg()); }
int GetInNId(const int &EdgeN) const
Definition: network.h:471
int GetOutNId(const int &EdgeN) const
Definition: network.h:472
int GetOutDeg() const
Definition: network.h:468

Here is the call graph for this function:

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

Definition at line 468 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().

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

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 474 of file network.h.

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

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

474 { return OutNIdV[EdgeN].Val2; }
TNIdDatPrV OutNIdV
Definition: network.h:457

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 475 of file network.h.

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

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

Definition at line 472 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().

472 { return OutNIdV[EdgeN].Val1; }
TNIdDatPrV OutNIdV
Definition: network.h:457

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 476 of file network.h.

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

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

476 { return InNIdV.SearchBin(NId)!=-1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1454

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 478 of file network.h.

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

478 { return IsOutNId(NId) || IsInNId(NId); }
bool IsOutNId(const int &NId) const
Definition: network.h:477
bool IsInNId(const int &NId) const
Definition: network.h:476

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 477 of file network.h.

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

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

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

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 479 of file network.h.

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

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

Definition at line 464 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().

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

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 480 of file network.h.

Member Data Documentation

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

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