SNAP Library 2.2, Developer Reference  2014-03-11 19:15:55
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
TNGraph::TNode Class Reference

#include <graph.h>

Collaboration diagram for TNGraph::TNode:

List of all members.

Public Member Functions

 TNode ()
 TNode (const int &NId)
 TNode (const TNode &Node)
 TNode (TSIn &SIn)
void Save (TSOut &SOut) const
int GetId () const
int GetDeg () const
int GetInDeg () const
int GetOutDeg () const
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
void PackOutNIdV ()
void PackNIdV ()

Private Attributes

TInt Id
TIntV InNIdV
TIntV OutNIdV

Friends

class TNGraph
class TNGraphMtx

Detailed Description

Definition at line 298 of file graph.h.


Constructor & Destructor Documentation

TNGraph::TNode::TNode ( ) [inline]

Definition at line 303 of file graph.h.

: Id(-1), InNIdV(), OutNIdV() { }
TNGraph::TNode::TNode ( const int &  NId) [inline]

Definition at line 304 of file graph.h.

: Id(NId), InNIdV(), OutNIdV() { }
TNGraph::TNode::TNode ( const TNode Node) [inline]

Definition at line 305 of file graph.h.

: Id(Node.Id), InNIdV(Node.InNIdV), OutNIdV(Node.OutNIdV) { }
TNGraph::TNode::TNode ( TSIn SIn) [inline]

Definition at line 306 of file graph.h.

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

Member Function Documentation

int TNGraph::TNode::GetDeg ( ) const [inline]

Definition at line 309 of file graph.h.

References GetInDeg(), and GetOutDeg().

{ return GetInDeg() + GetOutDeg(); }

Here is the call graph for this function:

int TNGraph::TNode::GetId ( ) const [inline]

Definition at line 308 of file graph.h.

References Id.

Referenced by TNGraph::DelNode(), TNGraph::Dump(), and TNGraph::IsOk().

{ return Id; }

Here is the caller graph for this function:

int TNGraph::TNode::GetInDeg ( ) const [inline]

Definition at line 310 of file graph.h.

References InNIdV, and TVec< TVal, TSizeTy >::Len().

Referenced by TNGraph::DelNode(), TNGraph::Dump(), GetDeg(), and TNGraph::IsOk().

{ return InNIdV.Len(); }

Here is the call graph for this function:

Here is the caller graph for this function:

int TNGraph::TNode::GetInNId ( const int &  NodeN) const [inline]

Definition at line 312 of file graph.h.

References InNIdV.

Referenced by TNGraph::DelNode(), TNGraph::Dump(), GetNbrNId(), and TNGraph::IsOk().

{ return InNIdV[NodeN]; }

Here is the caller graph for this function:

int TNGraph::TNode::GetNbrNId ( const int &  NodeN) const [inline]

Definition at line 314 of file graph.h.

References GetInNId(), GetOutDeg(), and GetOutNId().

{ return NodeN<GetOutDeg()?GetOutNId(NodeN):GetInNId(NodeN-GetOutDeg()); }

Here is the call graph for this function:

int TNGraph::TNode::GetOutDeg ( ) const [inline]

Definition at line 311 of file graph.h.

References TVec< TVal, TSizeTy >::Len(), and OutNIdV.

Referenced by TNGraph::DelNode(), TNGraph::Dump(), GetDeg(), GetNbrNId(), and TNGraph::IsOk().

{ return OutNIdV.Len(); }

Here is the call graph for this function:

Here is the caller graph for this function:

int TNGraph::TNode::GetOutNId ( const int &  NodeN) const [inline]

Definition at line 313 of file graph.h.

References OutNIdV.

Referenced by TNGraph::DelNode(), TNGraph::Dump(), GetNbrNId(), and TNGraph::IsOk().

{ return OutNIdV[NodeN]; }

Here is the caller graph for this function:

bool TNGraph::TNode::IsInNId ( const int &  NId) const [inline]

Definition at line 315 of file graph.h.

References InNIdV, and TVec< TVal, TSizeTy >::SearchBin().

Referenced by IsNbrNId().

{ return InNIdV.SearchBin(NId) != -1; }

Here is the call graph for this function:

Here is the caller graph for this function:

bool TNGraph::TNode::IsNbrNId ( const int &  NId) const [inline]

Definition at line 317 of file graph.h.

References IsInNId(), and IsOutNId().

{ return IsOutNId(NId) || IsInNId(NId); }

Here is the call graph for this function:

bool TNGraph::TNode::IsOutNId ( const int &  NId) const [inline]

Definition at line 316 of file graph.h.

References OutNIdV, and TVec< TVal, TSizeTy >::SearchBin().

Referenced by TNGraph::IsEdge(), and IsNbrNId().

{ return OutNIdV.SearchBin(NId) != -1; }

Here is the call graph for this function:

Here is the caller graph for this function:

void TNGraph::TNode::PackNIdV ( ) [inline]

Definition at line 319 of file graph.h.

References InNIdV, and TVec< TVal, TSizeTy >::Pack().

{ InNIdV.Pack(); }

Here is the call graph for this function:

void TNGraph::TNode::PackOutNIdV ( ) [inline]

Definition at line 318 of file graph.h.

References OutNIdV, and TVec< TVal, TSizeTy >::Pack().

{ OutNIdV.Pack(); }

Here is the call graph for this function:

void TNGraph::TNode::Save ( TSOut SOut) const [inline]

Definition at line 307 of file graph.h.

References Id, InNIdV, OutNIdV, TVec< TVal, TSizeTy >::Save(), and TInt::Save().

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

Here is the call graph for this function:


Friends And Related Function Documentation

friend class TNGraph [friend]

Definition at line 320 of file graph.h.

friend class TNGraphMtx [friend]

Definition at line 321 of file graph.h.


Member Data Documentation

Definition at line 300 of file graph.h.

Referenced by TNGraph::AddNode(), GetId(), and Save().


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