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

#include <network.h>

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.

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.

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.

466 { return GetInDeg() + GetOutDeg(); }
int GetOutDeg() const
Definition: network.h:468
int GetInDeg() const
Definition: network.h:467
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetId ( ) const
inline

Definition at line 465 of file network.h.

465 { return Id; }
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInDeg ( ) const
inline

Definition at line 467 of file network.h.

467 { return InNIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInNId ( const int &  EdgeN) const
inline

Definition at line 471 of file network.h.

471 { return InNIdV[EdgeN]; }
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetNbrNId ( const int &  EdgeN) const
inline

Definition at line 473 of file network.h.

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
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutDeg ( ) const
inline

Definition at line 468 of file network.h.

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
template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutEDat ( const int &  EdgeN)
inline

Definition at line 474 of file network.h.

474 { return OutNIdV[EdgeN].Val2; }
TNIdDatPrV OutNIdV
Definition: network.h:457
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.

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.

472 { return OutNIdV[EdgeN].Val1; }
TNIdDatPrV OutNIdV
Definition: network.h:457
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 476 of file network.h.

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
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 478 of file network.h.

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
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 477 of file network.h.

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
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNode::operator< ( const TNode Node) const
inline

Definition at line 479 of file network.h.

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.

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

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

Definition at line 454 of file network.h.

template<class TNodeData, class TEdgeData>
TIntV TNodeEDatNet< TNodeData, TEdgeData >::TNode::InNIdV
private

Definition at line 456 of file network.h.

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

Definition at line 455 of file network.h.

template<class TNodeData, class TEdgeData>
TNIdDatPrV TNodeEDatNet< TNodeData, TEdgeData >::TNode::OutNIdV
private

Definition at line 457 of file network.h.


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