SNAP Library 2.0, User Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TNodeNet< TNodeData >::TNode Class Reference

#include <network.h>

List of all members.

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 &NodeN) const
int GetOutNId (const int &NodeN) const
int GetNbrNId (const int &NodeN) 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
TIntV OutNIdV

Friends

class TNodeNet< TNodeData >

Detailed Description

template<class TNodeData>
class TNodeNet< TNodeData >::TNode

Definition at line 20 of file network.h.


Constructor & Destructor Documentation

template<class TNodeData>
TNodeNet< TNodeData >::TNode::TNode ( ) [inline]

Definition at line 26 of file network.h.

: Id(-1), NodeDat(), InNIdV(), OutNIdV() { }
template<class TNodeData>
TNodeNet< TNodeData >::TNode::TNode ( const int &  NId) [inline]

Definition at line 27 of file network.h.

: Id(NId), NodeDat(), InNIdV(), OutNIdV() { }
template<class TNodeData>
TNodeNet< TNodeData >::TNode::TNode ( const int &  NId,
const TNodeData &  NodeData 
) [inline]

Definition at line 28 of file network.h.

: Id(NId), NodeDat(NodeData), InNIdV(), OutNIdV() { }
template<class TNodeData>
TNodeNet< TNodeData >::TNode::TNode ( const TNode Node) [inline]

Definition at line 29 of file network.h.

: Id(Node.Id), NodeDat(Node.NodeDat), InNIdV(Node.InNIdV), OutNIdV(Node.OutNIdV) { }
template<class TNodeData>
TNodeNet< TNodeData >::TNode::TNode ( TSIn SIn) [inline]

Definition at line 30 of file network.h.

: Id(SIn), NodeDat(SIn), InNIdV(SIn), OutNIdV(SIn) { }

Member Function Documentation

template<class TNodeData>
const TNodeData& TNodeNet< TNodeData >::TNode::GetDat ( ) const [inline]

Definition at line 36 of file network.h.

{ return NodeDat; }
template<class TNodeData>
TNodeData& TNodeNet< TNodeData >::TNode::GetDat ( ) [inline]

Definition at line 37 of file network.h.

{ return NodeDat; }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetDeg ( ) const [inline]

Definition at line 33 of file network.h.

{ return GetInDeg() + GetOutDeg(); }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetId ( ) const [inline]

Definition at line 32 of file network.h.

{ return Id; }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetInDeg ( ) const [inline]

Definition at line 34 of file network.h.

{ return InNIdV.Len(); }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetInNId ( const int &  NodeN) const [inline]

Definition at line 38 of file network.h.

{ return InNIdV[NodeN]; }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetNbrNId ( const int &  NodeN) const [inline]

Definition at line 40 of file network.h.

{ return NodeN<GetOutDeg() ? GetOutNId(NodeN):GetInNId(NodeN-GetOutDeg()); }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetOutDeg ( ) const [inline]

Definition at line 35 of file network.h.

{ return OutNIdV.Len(); }
template<class TNodeData>
int TNodeNet< TNodeData >::TNode::GetOutNId ( const int &  NodeN) const [inline]

Definition at line 39 of file network.h.

{ return OutNIdV[NodeN]; }
template<class TNodeData>
bool TNodeNet< TNodeData >::TNode::IsInNId ( const int &  NId) const [inline]

Definition at line 41 of file network.h.

{ return InNIdV.SearchBin(NId) != -1; }
template<class TNodeData>
bool TNodeNet< TNodeData >::TNode::IsNbrNId ( const int &  NId) const [inline]

Definition at line 43 of file network.h.

{ return IsOutNId(NId) || IsInNId(NId); }
template<class TNodeData>
bool TNodeNet< TNodeData >::TNode::IsOutNId ( const int &  NId) const [inline]

Definition at line 42 of file network.h.

{ return OutNIdV.SearchBin(NId) != -1; }
template<class TNodeData>
bool TNodeNet< TNodeData >::TNode::operator< ( const TNode Node) const [inline]

Definition at line 44 of file network.h.

{ return NodeDat < Node.NodeDat; }
template<class TNodeData>
void TNodeNet< TNodeData >::TNode::Save ( TSOut SOut) const [inline]

Definition at line 31 of file network.h.

{ Id.Save(SOut);  NodeDat.Save(SOut);  InNIdV.Save(SOut);  OutNIdV.Save(SOut); }

Friends And Related Function Documentation

template<class TNodeData>
friend class TNodeNet< TNodeData > [friend]

Definition at line 45 of file network.h.


Member Data Documentation

template<class TNodeData>
TInt TNodeNet< TNodeData >::TNode::Id [private]

Definition at line 22 of file network.h.

template<class TNodeData>
TIntV TNodeNet< TNodeData >::TNode::InNIdV [private]

Definition at line 24 of file network.h.

template<class TNodeData>
TNodeData TNodeNet< TNodeData >::TNode::NodeDat [private]

Definition at line 23 of file network.h.

template<class TNodeData>
TIntV TNodeNet< TNodeData >::TNode::OutNIdV [private]

Definition at line 24 of file network.h.


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