Chinaunix首页 | 论坛 | 博客
  • 博客访问: 125420
  • 博文数量: 31
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 275
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-08 15:00
文章分类

全部博文(31)

文章存档

2009年(15)

2008年(16)

我的朋友

分类:

2008-11-05 14:50:42

1、//graph.h
 /*
  * The graph context
  */
 typedef struct _dglGraph
 {
  int     iErrno;

  dglByte_t   Version;
  dglByte_t   Endian;
  dglInt32_t   NodeAttrSize;
  dglInt32_t   EdgeAttrSize;
  dglInt32_t   aOpaqueSet[ 16 ];

  dglInt32_t   cNode;
  dglInt32_t   cHead;
  dglInt32_t   cTail;
  dglInt32_t   cAlone;
  dglInt32_t   cEdge;
  dglInt64_t   nnCost;

  dglInt32_t   Flags;
  dglInt32_t   nFamily;
  dglInt32_t   nOptions;

  void *    pNodeTree;
  void *    pEdgeTree;
  dglByte_t *    pNodeBuffer;
  dglInt32_t   iNodeBuffer;
  dglByte_t *    pEdgeBuffer;
  dglInt32_t   iEdgeBuffer;


  dglEdgePrioritizer_s edgePrioritizer;
  dglNodePrioritizer_s nodePrioritizer;


 /* so far statistics are only computed by dglAddEdge() */
 #ifdef DGL_STATS
  clock_t    clkAddEdge;  /* cycles spent during the last addedge execution */
  int     cAddEdge;    /* # of calls to dglAddEdge() */
  clock_t    clkNodeTree; /* cycles spent in accessing the node binary tree */
  int     cNodeTree;   /* # of probes in the node tree */
 #endif
 }
 dglGraph_s;

2、//graph.h
 typedef struct {
  dglInt32_t nStartNode;
  dglHeap_s NodeHeap;
  void *   pvVisited; 
  void *   pvPredist; 
  }dglSPCache_s;

3、//dig_structs.h
 struct Map_info
   {
  /* Common info for all formats */ 
  int format;                 /* format */
  int temporary;              /* temporary file flag, not yet used */

  struct dblinks *dblnk;      /* info about tables */
    
  struct Plus_head plus;      /* topo file *head; */

  int graph_line_type;        /* line type used to build the graph */
  dglGraph_s   graph;        /* graph structure */
  dglSPCache_s spCache;       /* Shortest path cache */
  double *edge_fcosts;        /* costs used for graph, (dglGetEdge() is not supported for _DGL_V1) */
  double *edge_bcosts;       
  double *node_costs;         /* node costs */
  int cost_multip;            /* edge and node costs multiplicator */

  /*  All of these apply only to runtime, and none get written out
  **  to the dig_plus file
  */
  int open;   /* should be 0x5522AA22 if opened correctly */
         /* or        0x22AA2255 if closed           */
         /* anything else implies that structure has */
         /* never been initialized                   */
  int mode;   /*  Read, Write, RW                         */
  int level;   /*  1, 2, (3)                               */
  int head_only;              /* Only header is opened */
  int support_updated;        /* Support files were updated */
  plus_t next_line;  /* for Level II sequential reads */

  char *name;   /* for 4.0  just name, and mapset */
  char *mapset;
  /* location and gisdbase is usefull if changed (v.proj or external apps) */
  char *location;    /* location name */
  char *gisdbase;    /* gisdbase path */

  /* Constraints for reading in lines  (not polys yet) */
  int    Constraint_region_flag;
  int    Constraint_type_flag;
  double Constraint_N;
  double Constraint_S;
  double Constraint_E;
  double Constraint_W;
  double Constraint_T;
  double Constraint_B;
  int    Constraint_type;
  int    proj;

  /* format specific */
  /* native */
  GVFILE dig_fp;  /* Dig file pointer */
  struct dig_head head; /* coor file head */
    
  /* non native */
  struct Format_info fInfo;  /* format information */

  /* history file */
  FILE *hist_fp;

  /* Temporary solution for sites */
  SITE_ATT *site_att;  /* array of attributes loaded from db */
  int n_site_att;      /* number of attributes in site_att array */
  int n_site_dbl;      /* number of double attributes for one site */
  int n_site_str;      /* number of string attributes for one site */
   };

 
4、//dig_structs.h
 struct line_pnts
   {
  double *x;
  double *y;
  double *z;
  int n_points;
  int alloc_points;
   };
 
5、//dig_structs.h
 struct line_cats
   {
  int *field;  /* pointer to array of fields */
  int *cat;  /* pointer to array of categories */
  int n_cats;  /* number of vector categories attached to element */
  int alloc_cats; /* allocated space */
   };
 
6、//gis.h
 struct GModule                      /* Structure that stores module info  */
  {
  char *label;                    /* Optional short description for GUI */
  char *description;              /* String describing module */
  /* further items are possible: author(s), version */
  int overwrite; /* overwrite old files */
  char *keywords;/*keywords*/
  };
7、//gis.h
 struct Option                     /* Structure that stores option info */
 {
  char *key;                      /* Key word used on command line    */
  int type;                       /* Option type                      */
  int required;                   /* REQUIRED or OPTIONAL             */
  int multiple;                   /* Multiple entries OK              */
  char *options;                  /* Approved values or range or NULL */
  char **opts;                    /* NULL or NULL terminated array of parsed options */
  char *key_desc;                 /* one word describing the key      */
  char *label;                    /* Optional short label, used in GUI as item label */
  char *description;              /* String describing option         */
  char *descriptions;             /* Pairs of ';' separated pairs of option and description for multi = YES */
       /* For example:
       * "break;break lines on intersections;"
       * "rmdupl;remove duplicates"
       */
  char **descs;                   /* parsed descriptions, array of either NULL or string */
          /* in the same order as options */
  char *answer;                   /* Option answer                    */
  char *def;                      /* Where original answer gets saved */
  char **answers;                 /* Option answers (for multiple=YES)*/
  struct Option *next_opt;        /* Pointer to next option struct    */
  char *gisprompt;                /* Interactive prompt guidance      */
  char *guisection;               /* GUI Layout guidance: ';' delimited heirarchical tree position */
  int (*checker)();               /* Routine to check answer or NULL  */
  int count;
 };

阅读(1186) | 评论(0) | 转发(0) |
0

上一篇:Grass v.example 源代码

下一篇:ACM POJ 1068

给主人留下些什么吧!~~