home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / distributed-c-2.1 / part01 / examples / travel / demo.c next >
Encoding:
C/C++ Source or Header  |  1993-12-22  |  2.1 KB  |  44 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  * @@@@  @@@ @@@@@ @@@@@ @@@@@ @@@ @@@@  @   @ @@@@@ @@@@@ @@@@       @@@  *
  4.  * @   @  @  @       @   @   @  @  @   @ @   @   @   @     @   @     @   @ *
  5.  * @   @  @  @@@@@   @   @@@@@  @  @@@@@ @   @   @   @@@@@ @   @     @     *
  6.  * @   @  @      @   @   @ @    @  @   @ @   @   @   @     @   @     @   @ *
  7.  * @@@@  @@@ @@@@@   @   @  @  @@@ @@@@  @@@@@   @   @@@@@ @@@@       @@@  *
  8.  *                                                                         *
  9.  *              A compiler for distributed programming with C              *
  10.  *                                                                         *
  11.  *                             d e m o . c                                 *
  12.  *                                                                         *
  13.  *                 Version 1.0      CreationDate: 27.07.91                 *
  14.  *                                    LastUpDate: 27.07.91                 *
  15.  *                                                                         *
  16.  *                     The traveling salesman problem.                     *
  17.  *        The data for a short example with five fictitious cities.        *
  18.  *                                                                         *
  19.  *                Copyright (C) 1991 by Christoph Pleier.                  *
  20.  *                          All rights reserved!                           *
  21.  ***************************************************************************/
  22.  
  23. #include "config.h"
  24.  
  25. /* table relating real city names to intern city names and vice versa */
  26. NAMEINFO data_cities[CITYNUM] = {
  27.     { "A", 0 }, { "B", 1 }, { "C", 2 }, { "D", 3 }, { "E", 4 }
  28. };
  29.  
  30. /* unity of distance data */
  31. char *unity = "miles";
  32.  
  33. /* distance table */
  34. int d_tab[CITYNUM][CITYNUM] = {  
  35.                        /* A,  B,  C,  D,  E */
  36.                 /* A */   0, 10, 20,  5, 17,
  37.                 /* B */  -1,  0, 10,  5, 23,
  38.                 /* C */  -1, -1,  0, 10, 50,
  39.                 /* D */  -1, -1, -1,  0,  4,
  40.                 /* E */  -1, -1, -1, -1,  0
  41. };
  42.  
  43.  
  44.