tnode.h
来自「it is very important」· C头文件 代码 · 共 38 行
H
38 行
// Test nodes for testing routing algorithms// George F. Riley, Georgia Tech, Winter 2000#ifndef __TNODE_H__#define __TNODE_H__#include <stdio.h>#include "rnode.h"// Define the edge classclass Edge {public : Edge( nodeid_t n, int w) : m_n(n), m_w(w) { }; Edge( Edge& e) : m_n(e.m_n), m_w(e.m_w) { printf("Edge copy const\n");}public : nodeid_t m_n; int m_w;};typedef vector<Edge*> EdgeVec_t;typedef EdgeVec_t::iterator EdgeVec_it;class Node : public RNode {public : Node( nodeid_t id) : RNode(id) { }; Node( const Node& n) : RNode(n.m_id) { }; virtual ~Node() { }; virtual const NodeWeight_t NextAdj( const NodeWeight_t&); virtual void AddAdj(nodeid_t a, int w = 1); virtual NixPair_t GetNix(nodeid_t); // Get neighbor index for specified nodepublic : EdgeVec_t m_Adj; // Adjacent edges};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?