亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ladders.w

?? 模擬器提供了一個簡單易用的平臺
?? W
?? 第 1 頁 / 共 2 頁
字號:
% This file is part of the Stanford GraphBase (c) Stanford University 1993@i boilerplate.w %<< legal stuff: PLEASE READ IT BEFORE MAKING ANY CHANGES!@i gb_types.w\def\title{LADDERS}\prerequisites{GB\_WORDS}{GB\_\,DIJK}@* Introduction. This demonstration program uses graphsconstructed by the {\sc GB\_WORDS} module to producean interactive program called \.{ladders}, which finds shortest pathsbetween two given five-letter words of English.The program assumes that \UNIX/ conventions are being used. Some code insections listed under `\UNIX/ dependencies' in the index might need to changeif this program is ported to other operating systems.\def\<#1>{$\langle${\rm#1}$\rangle$}To run the program under \UNIX/, say `\.{ladders} \<options>', where \<options>consists of zero or more of the following specifications in any order:{\narrower\def\\#1 {\smallskip\noindent  \hbox to 6em{\tt#1\hfill}\hangindent 8em\hangafter1 }\\-v Verbosely print all words encountered during the shortest-path     computation, showing also their distances from the goal word.\\-a Use alphabetic distance instead of considering adjacent words to be one     unit apart; for example, the alphabetic distance from `\.{words}' to     `\.{woods}' is~3, because `\.r' is three places from `\.o' in the     alphabet.\\-f Use distance based on frequency (see below), instead of considering     adjacent words to be one unit apart. This option is ignored if either     \.{-a} or \.{-r} has been specified.\\-h Use a lower-bound heuristic to shorten the search (see below). This option     is ignored if option \.{-f} has been selected.\\-e Echo the input to the output (useful if input comes from a file instead     of from the terminal).\\-n\<number> Limit the graph to the |n| most common English words, where |n|     is the given \<number>.\\-r\<number> Limit the graph to \<number> randomly selected words. This option     is incompatible with~\.{-n}.\\-s\<number> Use \<number> instead of 0 as the seed for random numbers, to get     different random samples or to explore words of equal frequency in     a different order.\smallskip}\noindent Option \.{-f} assigns a cost of 0 to the most common words and acost of 16 to the least common words; a cost between 0 and~16 is assigned towords of intermediate frequency. The word ladders that are found will then haveminimum total cost by this criterion. Experience shows that the \.{-f} optiontends to give the ``friendliest,'' most intuitively appealing ladders.\smallskipOption \.{-h} attempts to focus the search by giving priority to words thatare near the goal. (More precisely, it modifies distances between adjacentwords by using a heuristic function $\\{hh}(v)$, which would be the shortestpossible distance between $v$ and the goal if every five-letter combinationhappened to be an English word.) The {\sc GB\_\,DIJK} module explains moreabout such heuristics; this option is most interesting to watch when used inconjunction with \.{-v}.@ The program will prompt you for a starting word. If you simply type\<return>, it exits; otherwise you should enter a five-letter word(with no uppercase letters) before typing \<return>.Then the program will prompt you for a goal word. If you simply type\<return> at this point, it will go back and ask for a new starting word;otherwise you should specify another five-letter word.Then the program will find and display an optimal word ladder from the startto the goal, if there is a path from one to the otherthat changes only one letter at a time.And then you have a chance to start all over again, with another starting word.The start and goal words need not be present in the program's graph of``known'' words. They are temporarily added to that graph, but removedagain whenever new start and goal words are given. (Thus you can gofrom \.{sturm} to \.{drang} even though those words aren't English.)If the \.{-f} option is being used, the cost of the goal word will be 20when it is not in the program's dictionary.@ Here is the general layout of this program, as seen by the \CEE/ compiler:@^UNIX dependencies@>@p#include <ctype.h> /* system file for character types */#include "gb_graph.h" /* the standard GraphBase data structures */#include "gb_words.h" /* routines for five-letter word graphs */#include "gb_dijk.h" /* routines for shortest paths */@h@#@<Global variables@>@;@<Subroutines@>@;main(argc,argv)  int argc; /* the number of command-line arguments */  char *argv[]; /* an array of strings containing those arguments */{  @<Scan the command-line options@>;  @<Set up the graph of words@>;  while(1) {    @<Prompt for starting word and goal word; |break| if none given@>;    @<Find a minimal ladder from |start| to |goal|, if one exists,        and print it@>;  }  return 0; /* normal exit */}@* Parsing the options. Let's get the \UNIX/ command-line junk out of theway first, so that we can concentrate on meatier stuff. Our job in this partof the program is to see if the default value zero of external variable|verbose| should change, and/or if the default values of any of the followinginternal variables should change:@<Global variables@>=char alph=0; /* nonzero if the alphabetic distance option is selected */char freq=0; /* nonzero if the frequency-based distance option is selected */char heur=0; /* nonzero if the heuristic search option is selected */char echo=0; /* nonzero if the input-echo option is selected */unsigned long n=0; /* maximum number of words in the graph (0 means infinity) */char randm=0; /* nonzero if we will ignore the weight of words */long seed=0; /* seed for random number generator */@ @<Scan the command-line options@>=while (--argc) {@^UNIX dependencies@>  if (strcmp(argv[argc],"-v")==0) verbose=1;  else if (strcmp(argv[argc],"-a")==0) alph=1;  else if (strcmp(argv[argc],"-f")==0) freq=1;  else if (strcmp(argv[argc],"-h")==0) heur=1;  else if (strcmp(argv[argc],"-e")==0) echo=1;  else if (sscanf(argv[argc],"-n%lu",&n)==1) randm=0;  else if (sscanf(argv[argc],"-r%lu",&n)==1) randm=1;  else if (sscanf(argv[argc],"-s%ld",&seed)==1) ;  else {    fprintf(stderr,"Usage: %s [-v][-a][-f][-h][-e][-nN][-rN][-sN]\n",argv[0]);    return -2;  }}if (alph || randm) freq=0;if (freq) heur=0;@*Creating the graph. The GraphBase |words| procedure will produce thefive-letter words we want, organized in a graph structure.@d quit_if(x,c)  if (x) {    fprintf(stderr,      "Sorry, I couldn't build a dictionary (trouble code %ld)!\n",c);    return c;  }@<Set up the graph of words@>=g=words(n,(randm? zero_vector: NULL), 0L,seed);quit_if(g==NULL,panic_code);@<Confirm the options selected@>;@<Modify the edge lengths, if the |alph| or |freq| option was selected@>;@<Modify the priority queue algorithm, if unequal edge lengths are possible@>;@ @<Glob...@>=Graph *g; /* graph created by |words| */long zero_vector[9]; /* weights to use when ignoring all frequency information */@ The actual number of words might be decreased to the size of the GraphBasedictionary, so we wait until the graph is generated before confirmingthe user-selected options.@<Confirm the options selected@>=if (verbose) {  if (alph) printf("(alphabetic distance selected)\n");  if (freq) printf("(frequency-based distances selected)\n");  if (heur)    printf("(lowerbound heuristic will be used to focus the search)\n");  if (randm) printf("(random selection of %ld words with seed %ld)\n",    g->n,seed);  else printf("(the graph has %ld words)\n",g->n);}@ The edges in a |words| graph normally have length 1, so we must change themif the user has selected |alph| or |freq|. The character position in whichadjacent words differ is recorded in the |loc| field of each arc. Thefrequency of a word is stored in the |weight| field of its vertex.@d a_dist(k) (*(p+k)<*(q+k)? *(q+k)-*(p+k): *(p+k)-*(q+k))@<Modify the edge lengths, if the |alph| or |freq| option was selected@>=if (alph) {@+register Vertex *u;  for (u=g->vertices+g->n-1; u>=g->vertices; u--) {@+register Arc *a;    register char *p=u->name;    for (a=u->arcs; a; a=a->next) {@+register char *q=a->tip->name;      a->len = a_dist(a->loc);    }  }}@+else if (freq) {@+register Vertex *u;  for (u=g->vertices+g->n-1; u>=g->vertices; u--) {@+register Arc *a;    for (a=u->arcs; a; a=a->next)      a->len = freq_cost(a->tip);  }}@ The default priority queue algorithm of |dijkstra| is quite efficientwhen all edge lengths are~1. Otherwise we change it to thealternative method that works best for edge lengths less than~128.@<Modify the priority queue algorithm...@>=if (alph || freq || heur) {  init_queue=init_128;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色图激情小说| 国产精品资源网| 亚洲成人激情自拍| 久久狠狠亚洲综合| 福利一区在线观看| 丁香五精品蜜臀久久久久99网站| www.亚洲色图.com| 日韩欧美精品在线| 中文在线资源观看网站视频免费不卡| 亚洲免费毛片网站| 九九视频精品免费| 在线视频欧美区| 精品噜噜噜噜久久久久久久久试看| 国产欧美日韩综合| 日韩一区精品视频| 国产精品自拍在线| 欧美群妇大交群的观看方式| 久久蜜桃一区二区| 亚洲精品菠萝久久久久久久| 蜜臀av性久久久久蜜臀aⅴ流畅| 成人在线综合网| 日韩免费高清视频| 亚洲综合视频在线观看| 极品美女销魂一区二区三区 | 成人激情开心网| 91麻豆精品久久久久蜜臀| 中文幕一区二区三区久久蜜桃| 亚洲人xxxx| 岛国一区二区三区| 日韩欧美亚洲一区二区| 一区二区三区在线高清| 国产91精品精华液一区二区三区| 欧美精品三级日韩久久| 一区二区三区视频在线看| 成人污视频在线观看| 日韩一区二区视频| 亚洲3atv精品一区二区三区| 裸体健美xxxx欧美裸体表演| 色婷婷国产精品综合在线观看| 久久av资源网| 欧美卡1卡2卡| 午夜国产精品一区| 欧美妇女性影城| 日韩av中文在线观看| 欧美一三区三区四区免费在线看 | 亚洲女同ⅹxx女同tv| 91一区在线观看| 一区二区三区日韩欧美| 欧美性生活久久| 日韩av中文在线观看| 欧美精品一区视频| 成人白浆超碰人人人人| 亚洲免费观看高清完整| 欧美精品色一区二区三区| 美女网站色91| 国产精品免费视频一区| 色婷婷综合视频在线观看| 婷婷六月综合亚洲| 久久夜色精品国产欧美乱极品| 国产福利精品一区| 亚洲影视资源网| 精品日韩欧美在线| av亚洲精华国产精华精| 午夜久久久久久久久 | 在线免费观看视频一区| 亚洲第一福利视频在线| 欧美精品一区男女天堂| 91丨九色丨国产丨porny| 亚洲18色成人| 日本一区二区成人| 欧美人与禽zozo性伦| 国产福利一区在线观看| 亚洲综合视频在线观看| 久久久久久久综合色一本| 91豆麻精品91久久久久久| 久久精品国产久精国产| 亚洲欧美一区二区三区极速播放| 制服丝袜一区二区三区| 成人免费看的视频| 老司机午夜精品| 一区二区三区四区在线免费观看 | 久久久精品免费观看| 日本高清视频一区二区| 国产一区二区三区在线观看免费| 综合中文字幕亚洲| 久久久精品免费网站| 欧美精品自拍偷拍| 91日韩在线专区| 国产一区二区三区观看| 婷婷综合另类小说色区| 亚洲日本成人在线观看| 国产亚洲欧美色| 欧美一卡2卡三卡4卡5免费| 91免费国产在线观看| 国产精品一区二区久久不卡| 亚洲v精品v日韩v欧美v专区| 中文字幕日本乱码精品影院| 精品日韩99亚洲| 56国语精品自产拍在线观看| 日本精品视频一区二区| av一区二区不卡| 国产69精品久久久久777| 日韩av一区二区三区四区| 亚洲一区二区三区免费视频| 中文字幕+乱码+中文字幕一区| 日韩一区二区在线看| 欧美人xxxx| 91精品欧美一区二区三区综合在 | 精品视频在线免费看| 91美女精品福利| 91在线看国产| 93久久精品日日躁夜夜躁欧美| 福利一区二区在线| 成人黄色av网站在线| 成人综合在线网站| 成人黄色国产精品网站大全在线免费观看| 国产一区二区0| 国产99精品国产| 成人黄色大片在线观看| 不卡视频一二三四| 91最新地址在线播放| 91视频免费观看| 欧美电视剧免费全集观看| 欧美色视频一区| 欧美日免费三级在线| 欧美日韩成人在线| 在线电影院国产精品| 欧美一区二视频| 久久嫩草精品久久久久| 欧美激情在线看| 亚洲精选在线视频| 午夜视频在线观看一区| 麻豆91免费观看| 国产乱一区二区| 色综合久久久久综合体| 欧美日韩国产经典色站一区二区三区| 欧美精品日韩一本| 欧美成人vr18sexvr| 国产日韩欧美a| 一区二区三区不卡视频在线观看| 亚洲综合丝袜美腿| 免费在线看成人av| 成人一级片在线观看| 欧美亚洲国产怡红院影院| 3751色影院一区二区三区| 欧美精品一区二区三区高清aⅴ| 久久久精品国产免大香伊 | 粉嫩一区二区三区在线看| 91在线播放网址| 欧美一区二区三区啪啪| 国产色一区二区| 亚洲一二三区视频在线观看| 久久国产精品露脸对白| 99视频在线精品| 日韩免费视频一区| 亚洲精品国产高清久久伦理二区| 日本欧美一区二区在线观看| 国产成人在线电影| 欧美日韩在线电影| 国产精品你懂的在线欣赏| 亚洲一二三四区| 色狠狠色噜噜噜综合网| 久久夜色精品国产欧美乱极品| 一区二区三区在线观看网站| 国产麻豆精品在线观看| 欧美日高清视频| 亚洲欧洲日韩综合一区二区| 蜜臀国产一区二区三区在线播放 | 中文在线一区二区| 免费视频一区二区| 色婷婷av久久久久久久| 国产亚洲自拍一区| 日本va欧美va瓶| 欧美亚洲国产一区在线观看网站| 国产亚洲精品7777| 久久超碰97中文字幕| 欧美日韩一区二区三区在线| 国产精品的网站| 国产精品66部| 日韩美女主播在线视频一区二区三区| 亚洲精品乱码久久久久久| 国产suv精品一区二区6| 日韩欧美一区二区不卡| 午夜视频在线观看一区二区| 色哟哟国产精品| 亚洲色图一区二区三区| 岛国av在线一区| 国产色综合一区| 国产一区福利在线| 欧美成人一区二区三区片免费| 午夜精品一区在线观看| 欧美午夜影院一区| 亚洲午夜精品网| 欧美色中文字幕| 亚洲成av人片在线| 精品视频全国免费看| 玉米视频成人免费看| 日本韩国欧美国产| 亚洲一二三四在线| 欧美无人高清视频在线观看|