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

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

?? crstrtgy.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.30  10/19/06            */   /*                                                     */   /*         CONFLICT RESOLUTION STRATEGY MODULE         */   /*******************************************************//*************************************************************//* Purpose: Used to determine where a new activation is      *//*   placed on the agenda based on the current conflict      *//*   resolution strategy (depth, breadth, mea, lex,          *//*   simplicity, or complexity). Also provides the           *//*   set-strategy and get-strategy commands.                 *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//* Revision History:                                         *//*      6.23: Corrected compilation errors for files         *//*            generated by constructs-to-c. DR0861           *//*                                                           *//*      6.24: Removed CONFLICT_RESOLUTION_STRATEGIES         *//*            compilation flag.                              *//*                                                           *//*      6.30: Added salience groups to improve performance   *//*            with large numbers of activations of different *//*            saliences.                                     *//*                                                           *//*            Removed pseudo-facts used for not CEs.         *//*                                                           *//*************************************************************/#define _CRSTRTGY_SOURCE_#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "setup.h"#if DEFRULE_CONSTRUCT#include "constant.h"#include "pattern.h"#include "reteutil.h"#include "argacces.h"#include "agenda.h"#include "envrnmnt.h"#include "memalloc.h"#include "crstrtgy.h"#define GetMatchingItem(x,i) ((x->basis->binds[i].gm.theMatch != NULL) ? \                              (x->basis->binds[i].gm.theMatch->matchingItem) : NULL)/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static ACTIVATION             *PlaceDepthActivation(ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceBreadthActivation(ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceLEXActivation(void *,ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceMEAActivation(void *,ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceComplexityActivation(ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceSimplicityActivation(ACTIVATION *,struct salienceGroup *);   static ACTIVATION             *PlaceRandomActivation(ACTIVATION *,struct salienceGroup *);   static int                     ComparePartialMatches(void *,ACTIVATION *,ACTIVATION *);   static char                   *GetStrategyName(int);   static unsigned long long     *SortPartialMatch(void *,struct partialMatch *);   /******************************************************************//* PlaceActivation: Coordinates placement of an activation on the *//*   Agenda based on the current conflict resolution strategy.    *//******************************************************************/globle void PlaceActivation(  void *theEnv,  ACTIVATION **whichAgenda,  ACTIVATION *newActivation,  struct salienceGroup *theGroup)  {   ACTIVATION *placeAfter = NULL;   /*================================================*/   /* Set the flag which indicates that a change has */   /* been made to the agenda.                       */   /*================================================*/   EnvSetAgendaChanged(theEnv,TRUE);   /*=============================================*/   /* Determine the location where the activation */   /* should be placed in the agenda based on the */   /* current conflict resolution strategy.       */   /*==============================================*/   if (*whichAgenda != NULL)      {      switch (AgendaData(theEnv)->Strategy)        {         case DEPTH_STRATEGY:           placeAfter = PlaceDepthActivation(newActivation,theGroup);           break;         case BREADTH_STRATEGY:           placeAfter = PlaceBreadthActivation(newActivation,theGroup);           break;         case LEX_STRATEGY:           placeAfter = PlaceLEXActivation(theEnv,newActivation,theGroup);           break;         case MEA_STRATEGY:           placeAfter = PlaceMEAActivation(theEnv,newActivation,theGroup);           break;         case COMPLEXITY_STRATEGY:           placeAfter = PlaceComplexityActivation(newActivation,theGroup);           break;         case SIMPLICITY_STRATEGY:           placeAfter = PlaceSimplicityActivation(newActivation,theGroup);           break;         case RANDOM_STRATEGY:           placeAfter = PlaceRandomActivation(newActivation,theGroup);           break;        }     }    else     {      theGroup->first = newActivation;      theGroup->last = newActivation;     }   /*==============================================================*/   /* Place the activation at the appropriate place in the agenda. */   /*==============================================================*/   if (placeAfter == NULL) /* then place it at the beginning of then agenda. */     {      newActivation->next = *whichAgenda;      *whichAgenda = newActivation;      if (newActivation->next != NULL) newActivation->next->prev = newActivation;     }   else /* insert it in the agenda. */     {      newActivation->next = placeAfter->next;      newActivation->prev = placeAfter;      placeAfter->next = newActivation;      if (newActivation->next != NULL)        { newActivation->next->prev = newActivation; }     }  }/*******************************************************************//* PlaceDepthActivation: Determines the location in the agenda     *//*    where a new activation should be placed for the depth        *//*    strategy. Returns a pointer to the activation after which    *//*    the new activation should be placed (or NULL if the          *//*    activation should be placed at the beginning of the agenda). *//*******************************************************************/static ACTIVATION *PlaceDepthActivation(  ACTIVATION *newActivation,  struct salienceGroup *theGroup)  {   ACTIVATION *lastAct, *actPtr;   unsigned long long timetag;        /*============================================*/   /* Set up initial information for the search. */   /*============================================*/   timetag = newActivation->timetag;   if (theGroup->prev == NULL)     { lastAct = NULL; }   else     { lastAct = theGroup->prev->last; }   /*=========================================================*/   /* Find the insertion point in the agenda. The activation  */   /* is placed before activations of lower salience and      */   /* after activations of higher salience. Among activations */   /* of equal salience, the activation is placed before      */   /* activations with an equal or lower timetag (yielding    */   /* depth first traversal).                                 */   /*=========================================================*/   actPtr = theGroup->first;   while (actPtr != NULL)     {      if (timetag < actPtr->timetag)        {         lastAct = actPtr;         if (actPtr == theGroup->last)           { break; }         else            { actPtr = actPtr->next; }        }      else        { break; }     }   /*========================================*/   /* Update the salience group information. */   /*========================================*/      if ((lastAct == NULL) ||        ((theGroup->prev != NULL) && (theGroup->prev->last == lastAct)))     { theGroup->first = newActivation; }        if ((theGroup->last == NULL) || (theGroup->last == lastAct))     { theGroup->last = newActivation; }   /*===========================================*/   /* Return the insertion point in the agenda. */   /*===========================================*/   return(lastAct);  }/*******************************************************************//* PlaceBreadthActivation: Determines the location in the agenda   *//*    where a new activation should be placed for the breadth      *//*    strategy. Returns a pointer to the activation after which    *//*    the new activation should be placed (or NULL if the          *//*    activation should be placed at the beginning of the agenda). *//*******************************************************************/static ACTIVATION *PlaceBreadthActivation(  ACTIVATION *newActivation,  struct salienceGroup *theGroup)  {   unsigned long long timetag;   ACTIVATION *lastAct, *actPtr;   /*============================================*/   /* Set up initial information for the search. */   /*============================================*/   timetag = newActivation->timetag;   if (theGroup->last == NULL)     {          if (theGroup->prev == NULL)        { lastAct = NULL; }      else        { lastAct = theGroup->prev->last; }     }   else     { lastAct = theGroup->last; }   /*=========================================================*/   /* Find the insertion point in the agenda. The activation  */   /* is placed before activations of lower salience and      */   /* after activations of higher salience. Among activations */   /* of equal salience, the activation is placed after       */   /* activations with a lessor timetag (yielding breadth     */   /* first traversal).                                       */   /*=========================================================*/   actPtr = theGroup->last;   while (actPtr != NULL)     {      if (timetag < actPtr->timetag)        {         if (actPtr == theGroup->first)           {            if (theGroup->prev == NULL)              { lastAct = NULL; }            else              { lastAct = theGroup->prev->last; }            break;           }         else            { actPtr = actPtr->prev; }        }      else        {         lastAct = actPtr;          break;         }     }        /*========================================*/   /* Update the salience group information. */   /*========================================*/      if ((lastAct == NULL) ||        ((theGroup->prev != NULL) && (theGroup->prev->last == lastAct)))     { theGroup->first = newActivation; }        if ((theGroup->last == NULL) || (theGroup->last == lastAct))     { theGroup->last = newActivation; }   /*===========================================*/   /* Return the insertion point in the agenda. */   /*===========================================*/   return(lastAct);  }/*******************************************************************//* PlaceLEXActivation: Determines the location in the agenda       *//*    where a new activation should be placed for the lex          *//*    strategy. Returns a pointer to the activation after which    *//*    the new activation should be placed (or NULL if the          *//*    activation should be placed at the beginning of the agenda). *//*******************************************************************/static ACTIVATION *PlaceLEXActivation(  void *theEnv,  ACTIVATION *newActivation,  struct salienceGroup *theGroup)  {   unsigned long long timetag;   ACTIVATION *lastAct, *actPtr;   int flag;   /*============================================*/   /* Set up initial information for the search. */   /*============================================*/   timetag = newActivation->timetag;   if (theGroup->prev == NULL)     { lastAct = NULL; }   else     { lastAct = theGroup->prev->last; }   /*================================================*/   /* Look first at the very end of the group to see */   /* if the activation should be placed there.      */   /*================================================*/      actPtr = theGroup->last;   if (actPtr != NULL)     {      flag = ComparePartialMatches(theEnv,actPtr,newActivation);            if ((flag == LESS_THAN) ||          ((flag == EQUAL) &&  (timetag > actPtr->timetag)))        {         theGroup->last = newActivation;                   return(actPtr);        }     }        /*=========================================================*/   /* Find the insertion point in the agenda. The activation  */   /* is placed before activations of lower salience and      */   /* after activations of higher salience. Among activations */   /* of equal salience, the OPS5 lex strategy is used for    */   /* determining placement.                                  */   /*=========================================================*/   actPtr = theGroup->first;   while (actPtr != NULL)     {      flag = ComparePartialMatches(theEnv,actPtr,newActivation);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品综合在线观看| 久久精品国产亚洲高清剧情介绍| 制服丝袜日韩国产| 国产电影一区在线| 视频一区二区欧美| 成人免费小视频| 日韩欧美美女一区二区三区| 91免费精品国自产拍在线不卡| 免费一级片91| 亚洲一区在线视频| 中文字幕一区二区三区蜜月| 精品裸体舞一区二区三区| 欧美日韩中文字幕一区二区| 粉嫩aⅴ一区二区三区四区五区| 日韩高清在线不卡| 亚洲一区二区欧美| 亚洲欧洲韩国日本视频| 久久色在线观看| 日韩丝袜情趣美女图片| 欧美日韩和欧美的一区二区| 99在线精品视频| 国产成人丝袜美腿| 精品一区二区三区免费播放| 一区二区三区在线视频播放| 国产精品毛片大码女人| 精品国精品国产| 欧美二区在线观看| 欧美日韩和欧美的一区二区| 91久久一区二区| 色视频欧美一区二区三区| av在线不卡观看免费观看| 国产精品中文字幕日韩精品| 久久se精品一区精品二区| 日韩精品福利网| 亚洲成va人在线观看| 一区二区视频在线| 一区二区三区精品视频| 亚洲欧美另类综合偷拍| 亚洲啪啪综合av一区二区三区| 亚洲国产高清在线| 欧美国产日韩亚洲一区| 中文字幕久久午夜不卡| 国产精品美女久久久久久| 欧美国产1区2区| 国产精品久久久爽爽爽麻豆色哟哟 | 在线观看91精品国产麻豆| 欧美日韩国产美女| 91精品国产综合久久久久久| 884aa四虎影成人精品一区| 欧美一区二区三区免费| 日韩免费观看高清完整版在线观看| 欧美一卡2卡3卡4卡| 精品伦理精品一区| 久久精品亚洲精品国产欧美kt∨| 国产欧美日韩久久| 国产精品超碰97尤物18| 亚洲黄色免费电影| 视频精品一区二区| 蜜桃视频一区二区| 国产福利91精品一区| 99精品视频在线播放观看| 欧美亚洲综合一区| 日韩欧美不卡一区| 久久精品夜色噜噜亚洲aⅴ| 国产精品久久久久影院| 亚洲精品国产成人久久av盗摄| 亚洲444eee在线观看| 久久99久久99精品免视看婷婷| 国产成人av电影| 色狠狠av一区二区三区| 在线不卡中文字幕播放| 久久九九久精品国产免费直播| 国产精品青草久久| 亚洲不卡av一区二区三区| 蜜桃视频一区二区三区| 波多野结衣中文字幕一区二区三区 | 欧美xxxx在线观看| 18成人在线观看| 日韩电影免费在线观看网站| 国产精品18久久久久久vr| 91社区在线播放| 日韩女优毛片在线| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 亚洲综合色噜噜狠狠| 日本欧美一区二区三区| 国产99久久久国产精品| 欧美日韩三级在线| 日本一区二区免费在线| 午夜激情久久久| 国产成人av电影在线播放| 91精品国产综合久久福利| 国产精品久久久久久久久免费丝袜| 亚洲一二三四久久| 国产69精品久久777的优势| 欧美日韩色综合| 国产精品美女一区二区三区| 另类欧美日韩国产在线| 91久久精品网| 亚洲国产成人在线| 蜜臀久久99精品久久久画质超高清 | 91黄视频在线| 国产午夜亚洲精品不卡| 日韩精品视频网站| 一本色道久久综合亚洲91| 久久夜色精品一区| 五月天中文字幕一区二区| 91丨九色丨尤物| 欧美激情中文字幕一区二区| 午夜激情久久久| 色嗨嗨av一区二区三区| 国产精品欧美精品| 六月丁香婷婷久久| 欧美高清性hdvideosex| 樱桃国产成人精品视频| 国产成人免费高清| 亚洲精品一区二区在线观看| 视频在线观看一区二区三区| 99麻豆久久久国产精品免费| 国产午夜三级一区二区三| 国产一区二区三区不卡在线观看| 69久久夜色精品国产69蝌蚪网| 亚洲男人的天堂网| 91污片在线观看| 日韩久久一区二区| 成人黄动漫网站免费app| 26uuu久久天堂性欧美| 久久99精品久久久久久久久久久久| 欧美日韩国产首页| 亚洲成av人综合在线观看| 色94色欧美sute亚洲线路一久| 亚洲日本一区二区| 色综合中文字幕国产| 国产日韩欧美综合在线| 国产麻豆精品视频| 久久青草欧美一区二区三区| 久久精品国产精品亚洲红杏| 日韩一区二区不卡| 精品一区二区三区免费毛片爱| 精品国产精品网麻豆系列| 紧缚捆绑精品一区二区| 久久久久久久久久久电影| 国产一区二区三区不卡在线观看| 久久精品欧美日韩精品| 国产a久久麻豆| 国产精品电影一区二区三区| 99精品视频在线免费观看| 中文字幕一区二区三区四区| 色欧美乱欧美15图片| 亚洲成人动漫在线观看| 欧美精品一二三区| 久久成人久久爱| 国产日韩欧美a| 91在线精品一区二区三区| 一区二区欧美在线观看| 欧美福利视频导航| 黄色日韩三级电影| 国产欧美日韩卡一| 欧美优质美女网站| 蜜臀av一级做a爰片久久| 久久综合色播五月| 波多野结衣亚洲| 亚洲成人免费看| 久久久久久久综合狠狠综合| av不卡在线播放| 午夜在线电影亚洲一区| 精品国产91久久久久久久妲己 | 麻豆精品久久久| 国产欧美久久久精品影院| 99视频精品在线| 丝袜国产日韩另类美女| 久久久久国产精品厨房| 91视视频在线观看入口直接观看www | 色婷婷精品大在线视频| 日韩精品一级二级| 欧美国产欧美综合| 欧美人伦禁忌dvd放荡欲情| 久久se精品一区精品二区| 亚洲天堂成人在线观看| 欧美日韩在线不卡| 国产精品中文字幕日韩精品| 亚洲一区二区在线观看视频| 精品成人一区二区三区| 99精品欧美一区二区蜜桃免费| 亚洲一区中文在线| 欧美国产日韩在线观看| 67194成人在线观看| 春色校园综合激情亚洲| 天堂午夜影视日韩欧美一区二区| 国产欧美日韩综合| 制服丝袜亚洲网站| 色综合咪咪久久| 国产麻豆精品视频| 日韩在线播放一区二区| 国产精品成人免费精品自在线观看| 91精品国产91久久综合桃花| 大尺度一区二区| 紧缚捆绑精品一区二区| 日韩精品视频网站| 一区二区三区免费网站| 中文一区二区在线观看|