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
TNodeEdgeNet< 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
 
bool operator< (const TNode &Node) const
 
int GetId () const
 
int GetDeg () const
 
int GetInDeg () const
 
int GetOutDeg () const
 
const TNodeData & GetDat () const
 
TNodeData & GetDat ()
 
int GetInEId (const int &NodeN) const
 
int GetOutEId (const int &NodeN) const
 
int GetNbrEId (const int &EdgeN) const
 
bool IsInEId (const int &EId) const
 
bool IsOutEId (const int &EId) const
 
bool IsNbrEId (const int &EId) const
 

Private Attributes

TInt Id
 
TIntV InEIdV
 
TIntV OutEIdV
 
TNodeData NodeDat
 

Friends

class TNodeEdgeNet< TNodeData, TEdgeData >
 

Detailed Description

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

Definition at line 988 of file network.h.

Constructor & Destructor Documentation

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

Definition at line 994 of file network.h.

994 : Id(-1), InEIdV(), OutEIdV(), NodeDat() { }
TNodeData NodeDat
Definition: network.h:992
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId)
inline

Definition at line 995 of file network.h.

995 : Id(NId), InEIdV(), OutEIdV(), NodeDat() { }
TNodeData NodeDat
Definition: network.h:992
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const int &  NId,
const TNodeData &  NodeData 
)
inline

Definition at line 996 of file network.h.

996 : Id(NId), InEIdV(), OutEIdV(), NodeDat(NodeData) { }
TNodeData NodeDat
Definition: network.h:992
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( const TNode Node)
inline

Definition at line 997 of file network.h.

997 : Id(Node.Id), InEIdV(Node.InEIdV), OutEIdV(Node.OutEIdV), NodeDat(Node.NodeDat) { }
TNodeData NodeDat
Definition: network.h:992
template<class TNodeData, class TEdgeData>
TNodeEdgeNet< TNodeData, TEdgeData >::TNode::TNode ( TSIn SIn)
inline

Definition at line 998 of file network.h.

998 : Id(SIn), InEIdV(SIn), OutEIdV(SIn), NodeDat(SIn) { }
TNodeData NodeDat
Definition: network.h:992

Member Function Documentation

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

Definition at line 1005 of file network.h.

1005 { return NodeDat; }
TNodeData NodeDat
Definition: network.h:992
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetDat ( )
inline

Definition at line 1006 of file network.h.

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

Definition at line 1002 of file network.h.

1002 { return GetInDeg() + GetOutDeg(); }
int GetOutDeg() const
Definition: network.h:1004
int GetInDeg() const
Definition: network.h:1003
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetId ( ) const
inline

Definition at line 1001 of file network.h.

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

Definition at line 1003 of file network.h.

1003 { return InEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInEId ( const int &  NodeN) const
inline

Definition at line 1007 of file network.h.

1007 { return InEIdV[NodeN]; }
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetNbrEId ( const int &  EdgeN) const
inline

Definition at line 1009 of file network.h.

1009 { return EdgeN<GetOutDeg()?GetOutEId(EdgeN):GetInEId(EdgeN-GetOutDeg()); }
int GetOutDeg() const
Definition: network.h:1004
int GetInEId(const int &NodeN) const
Definition: network.h:1007
int GetOutEId(const int &NodeN) const
Definition: network.h:1008
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg ( ) const
inline

Definition at line 1004 of file network.h.

1004 { return OutEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
template<class TNodeData, class TEdgeData>
int TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutEId ( const int &  NodeN) const
inline

Definition at line 1008 of file network.h.

1008 { return OutEIdV[NodeN]; }
template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsInEId ( const int &  EId) const
inline

Definition at line 1010 of file network.h.

1010 { return InEIdV.SearchBin(EId) != -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 TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsNbrEId ( const int &  EId) const
inline

Definition at line 1012 of file network.h.

1012 { return IsInEId(EId) || IsOutEId(EId); }
bool IsOutEId(const int &EId) const
Definition: network.h:1011
bool IsInEId(const int &EId) const
Definition: network.h:1010
template<class TNodeData, class TEdgeData>
bool TNodeEdgeNet< TNodeData, TEdgeData >::TNode::IsOutEId ( const int &  EId) const
inline

Definition at line 1011 of file network.h.

1011 { return OutEIdV.SearchBin(EId) != -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 TNodeEdgeNet< TNodeData, TEdgeData >::TNode::operator< ( const TNode Node) const
inline

Definition at line 1000 of file network.h.

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

Definition at line 999 of file network.h.

999 { Id.Save(SOut); InEIdV.Save(SOut); OutEIdV.Save(SOut); NodeDat.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1060
TNodeData NodeDat
Definition: network.h:992
void Save(TSOut &SOut) const
Definition: ds.h:903

Friends And Related Function Documentation

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

Definition at line 1013 of file network.h.

Member Data Documentation

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

Definition at line 990 of file network.h.

template<class TNodeData, class TEdgeData>
TIntV TNodeEdgeNet< TNodeData, TEdgeData >::TNode::InEIdV
private

Definition at line 991 of file network.h.

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

Definition at line 992 of file network.h.

template<class TNodeData, class TEdgeData>
TIntV TNodeEdgeNet< TNodeData, TEdgeData >::TNode::OutEIdV
private

Definition at line 991 of file network.h.


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