00001
00002
00003
00004 #ifndef __RNODE_H__
00005 #define __RNODE_H__
00006
00007 #include "nix/nixvec.h"
00008
00009 #include <set>
00010 #include <map>
00011 #include <vector>
00012 #include <deque>
00013 #include <algorithm>
00014
00015 #ifdef USE_HASH
00016 #include <hash_set>
00017 #endif
00018
00019 typedef unsigned long nodeid_t;
00020 typedef unsigned long dist_t;
00021 typedef unsigned int weight_t;
00022 typedef pair<nodeid_t, weight_t> NodeWeight_t;
00023
00024 const dist_t INF = 0xffffffff;
00025 const nodeid_t NODE_NONE = 0xffffffff;
00026
00027 class RNode {
00028 public :
00029 RNode( );
00030 RNode( nodeid_t id);
00031 RNode( const RNode& n);
00032 virtual ~RNode();
00033 virtual void AddAdj(nodeid_t a, int w = 1);
00034
00035 virtual const NodeWeight_t NextAdj( const NodeWeight_t&);
00036 virtual NixPair_t GetNix(nodeid_t);
00037 virtual Nixl_t GetNixl();
00038 virtual nodeid_t GetNeighbor(Nix_t);
00039
00040
00041 public :
00042 nodeid_t m_id;
00043 };
00044
00045
00046
00047
00048
00049
00050
00051
00052 typedef vector<RNode*> RNodeVec_t;
00053 typedef RNodeVec_t::iterator RNodeVec_it;
00054
00055
00056 typedef deque<RNode*> RNodeDeq_t;
00057 typedef RNodeDeq_t::iterator RNodeDeq_it;
00058
00059
00060 typedef vector<nodeid_t> RoutingVec_t;
00061 typedef RoutingVec_t::iterator RoutingVec_it;
00062
00063
00064 typedef vector<dist_t> DistVec_t;
00065 typedef DistVec_t::iterator DistVec_it;
00066
00067 #endif