shape_doc 0.1
gNode< T > Class Template Reference

#include <graph.hpp>

List of all members.

Public Member Functions

Friends


Detailed Description

template<class T>
class mmx::shape::gNode< T >

Definition at line 32 of file graph.hpp.


Constructor & Destructor Documentation

gNode ( ) [inline]

Definition at line 49 of file graph.hpp.

{ };
gNode ( val) [inline]

Definition at line 51 of file graph.hpp.

    {
      this->data =val; //node data
      this->vlist=NULL;//next node in list
      this->next =NULL;//next neighbor of node
      this->me   =this;//next occurance of this node
      this->start=this;//pointer to this node on the node list
      this->m_status =2009;
      this->m_aux    =0;
    }   

Member Function Documentation

bool adj ( T &  v) [inline]

True if the node is adjacent to node with data v.

Definition at line 66 of file graph.hpp.

                        {
    
    gNode<T>* t;
    t= this->next;
    
    while(t!=NULL)
    {
      if(t->vlist->data==v)
        return true;
      t=t->next;
    }
    return false;
  };
void aux ( int  i) [inline]

Set vertex aux.

Definition at line 93 of file graph.hpp.

Referenced by Graph< T >::push_vertex(), and voronoi2d< C, V >::run().

    {
      this->start->m_aux=i;
    };
int aux ( ) [inline]

Get vertex aux.

Definition at line 99 of file graph.hpp.

    {
      return this->start->m_aux;
    };
T get_data ( ) [inline]

Definition at line 62 of file graph.hpp.

{return this->data;};
void status ( int  i) [inline]

Get vertex status.

Definition at line 81 of file graph.hpp.

Referenced by Graph< T >::dfs(), Graph< T >::dfs_walk(), and GraphDfsIter< T >::first().

    {
      this->start->m_status=i;
    };
int status ( ) [inline]

Set vertex status.

Definition at line 87 of file graph.hpp.

    {
      return this->start->m_status;
    };

Friends And Related Function Documentation

friend class Graph< T > [friend]

Definition at line 35 of file graph.hpp.

friend class GraphDfsIter< T > [friend]

Definition at line 36 of file graph.hpp.


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