sgb2alt-doc.txt
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
源码类别:

通讯编程

开发平台:

Visual C++

  1. $Id: sgb2alt-doc.txt,v 1.1 1996/10/04 13:29:27 ewz Exp $
  2. Name: sgb2alt
  3. Function: converts from sgb format to alternative format. 
  4. Usage: sgb2old <sgfile> <oldfile>
  5. Details:
  6. The alternative format is as follows:
  7.     GRAPH (#nodes #edges id uu vv ww xx yy zz):
  8.     <#nodes> <#edges> <id> [all integer utility fields]
  9.  
  10.    VERTICES (index name u v w x y z):
  11.    0 <name-node0> [all integer utility fields for node0]
  12.    1 <name-node1> [all integer utility fields for node1]
  13.    ....
  14.    
  15.     EDGES (from-node to-node length a b):
  16.     <from-node> <to-node> <length> [all integer utility fields]
  17.     ....
  18. For example, here is a 10 node graph represented first in SGB file format
  19. and then in the alternative format.  (Note that the SGB format is not intended
  20. to be easily read by humans.)
  21. ------------------------- SGB Format Starts Here --------------------------
  22.  
  23. * GraphBase graph (util_types ZZZIIZIZIZZZZZ,14V,102A)
  24. "geo(0,{10,10,3,0.200,0.500,0.500})",10,28,10
  25. * Vertices
  26. "0",A4,3,4
  27. "1",A6,8,6
  28. "2",A8,7,6
  29. "3",A14,6,0
  30. "4",A18,8,1
  31. "5",A22,0,3
  32. "6",A17,4,0
  33. "7",A24,3,6
  34. "8",A26,1,5
  35. "9",A27,7,2
  36. "",0,0,0
  37. "",0,0,0
  38. "",0,0,0
  39. "",0,0,0
  40. * Arcs
  41. V2,0,4,0
  42. V0,0,4,0
  43. V4,A0,6,0
  44. V0,0,6,0
  45. V9,A2,4,0
  46. V0,0,4,0
  47. V8,0,7,0
  48. V1,0,7,0
  49. V6,A1,7,0
  50. V2,0,7,0
  51. V5,0,7,0
  52. V3,0,7,0
  53. V8,A10,7,0
  54. V3,A7,7,0
  55. V9,A12,2,0
  56. V3,A5,2,0
  57. V6,A3,4,0
  58. V4,A9,4,0
  59. V7,A16,7,0
  60. V4,0,7,0
  61. V7,A11,4,0
  62. V5,A19,4,0
  63. V9,A20,7,0
  64. V5,A15,7,0
  65. V9,A21,6,0
  66. V7,A23,6,0
  67. V9,A13,7,0
  68. V8,A25,7,0
  69. 0,0,0,0
  70. [NOTE:  70 lines of 0,0,0,0 deleted]
  71. 0,0,0,0
  72. 0,0,0,0
  73. 0,0,0,0
  74. * Checksum 1029917895
  75. ---------------- SGB Format Ends Here; Alternative Format Starts Here -----------------
  76.  
  77. GRAPH (#nodes #edges id uu vv ww xx yy zz):
  78. 10 28 geo(0,{10,10,3,0.200,0.500,0.500}) 10 
  79. VERTICES (index name u v w x y z):
  80. 0 0 3 4 
  81. 1 1 8 6 
  82. 2 2 7 6 
  83. 3 3 6 0 
  84. 4 4 8 1 
  85. 5 5 0 3 
  86. 6 6 4 0 
  87. 7 7 3 6 
  88. 8 8 1 5 
  89. 9 9 7 2 
  90. EDGES (from-node to-node length a b):
  91. 0 9 4 0 
  92. 0 4 6 0 
  93. 0 2 4 0 
  94. 1 8 7 0 
  95. 2 6 7 0 
  96. 3 9 2 0 
  97. 3 8 7 0 
  98. 3 5 7 0 
  99. 4 7 7 0 
  100. 4 6 4 0 
  101. 5 9 7 0 
  102. 5 7 4 0 
  103. 7 9 6 0 
  104. 8 9 7 0 
  105. ------------- Alternative Format Ends Here -----------------------------------------