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

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

?? rifobackchain.c

?? intel ipp4.1性能庫的一些例子。
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* (C) Copyright 1997 Albert Ludwigs University Freiburg *     Institute of Computer Science * * All rights reserved. Use of this software is permitted for  * non-commercial research purposes, and it may be copied only  * for that use.  All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the  Albert Ludwigs University Freiburg make any warranty * about the software or its performance.  *//* Backchain on a conjunction of literals and determine   the ground facts from the initial state that are used.      Usual circle:   fbackchain_goals()   -->    fbackchain_one_goal()                           ^                         |                           |                         v		   cond_fbackchain_ops  <--    fbackchain_ops()*/#include "ipp.h"#include "rifo.h"#include "instantiateIV.h"static void pprefix( int count ); /* global variables */static int curdepth; /* current depth of backchaining search */int backchain_on_ini = 1; /* backchain on initial facts */long nodes_visited = 0;int unionstrategy;  int mindepth = 1, maxdepth = 20;int rifo_display_info = 0;settype* empty_set; /* a kind of constant which is initialised in		     find_relevant_initial_facts() */rifo_op_array rel_op_array;rifo_fact_array rel_fct_array;  /* relevance info for facts */Integers_ptr * op_lookup_table; /* look up actions that generate 				   a given fact *//* used to save actions, initial and goal state when using metastrategy */BitOperator *save_BitOperators;   FactInfoPair *save_initial_state;FactInfoPair *save_goal_state;settype *secondary_fact_set;int opslevel;/* used to print out current search depth  */void pprefix( int count ){  register int i;  for ( i=0; i<count; i++ ) printf( " " );  printf( "(%d)--",count );}/* some functions initializing the data structures */ /* initialize rel_op_array with operator list gbit_operators */void init_op_array( void ){   BitOperator *actop;  int i, j;#ifdef MEMORY_INFO  rifo_memory += MAX_OPS * sizeof( rifo_relevant_op );#endif  /* now put all operators into array */  if ( rifo_display_info >= 3 )     printf( "> Initializing operator array with operator list...\n" );  if ( gnum_bit_operators > MAX_OPS )    { fatal_error( "Number of Operators too high, increase MAX_OPS and recompile!\n"); }    actop = gbit_operators;  i=0;  while (actop)    {      rel_op_array[i].opnode = New_BitOperator (actop->name);      rel_op_array[i].opnode->p_preconds = actop->p_preconds;      rel_op_array[i].opnode->n_preconds = actop->n_preconds;      rel_op_array[i].opnode->unconditional = actop->unconditional;      rel_op_array[i].opnode->conditionals = actop->conditionals;      for (j=0; j < actop->num_vars;j++)	rel_op_array[i].opnode->inst_table[j] = actop->inst_table[j];      rel_op_array[i].opnode->num_vars = actop->num_vars;      actop = actop->next;      i++;          }}/* initialize rel_fct_array with initial state plus constants */void init_fct_array( void ){  int elcnt, i, index;#ifdef MEMORY_INFO  rifo_memory += (2*MAX_RELEVANT_FACTS + MAX_CONSTANTS_TABLE)* sizeof( rifo_relevant_fact );#endif  if ( rifo_display_info >= 3 )     printf( "> Initializing fact array with initial state...\n" );  /* initialise memcode with default value -1     meaning: fact has not been used yet */  for (i=0; i<2*gnum_relevant_facts+gconstants_table_size; i++)    {      rel_fct_array[i].memcode = -1;    }  elcnt = 0;  /* put initial facts into array with indices 0-2*gnum_relevant_facts-1 */    for ( i = 0; i < gnum_relevant_facts; i++ )     {       if ( get_bit( gbit_initial_state->positive->vector, gft_vector_length, i ))        { /* fact is positive */          rel_fct_array[i].is_relevant = 0;	  rel_fct_array[i].is_initial = 1;	  rel_fct_array[i].memcode = elcnt++;	  if ( rifo_display_info >= 5 )	    { 	     printf( ">> ... adding %d to fact array \n", i);	    }	  /* used_facts contains one set with one member: i */	  rel_fct_array[i].used_facts = make_set_list(i);	}          else if ( get_bit( gbit_initial_state->negative->vector, gft_vector_length, i))      { /* fact is negative */	index = i + gnum_relevant_facts;	rel_fct_array[index].is_relevant = 0;	rel_fct_array[index].is_initial = 1;	rel_fct_array[index].memcode = elcnt++;	if ( rifo_display_info >= 5 ) 	  printf( ">> ... adding %d to fact array \n", index);	/* used_facts contains one set with one member: index */	rel_fct_array[index].used_facts = make_set_list(index);      }     if ( elcnt > MAXSETSIZE-1 )      fatal_error ( "Too many initial facts.\n Change MAXSETSIZE and SETARSIZE and recompile!\n" );    }  /* now add constants to rel_fct_array with indices starting with      2*gnum_relevant_facts                                     */  for (i=2*gnum_relevant_facts; 	 i<2*gnum_relevant_facts+gconstants_table_size; i++)    {      rel_fct_array[i].is_relevant = 0;      rel_fct_array[i].memcode = elcnt++;      if ( rifo_display_info >= 5 )	printf( ">> ... adding constant %d to fact array \n", i);    }}void init_lookup_table( void ){  Effect *eff;  int i, j, t;  Integers *act;  op_lookup_table = (Integers_ptr *) calloc (2*gnum_relevant_facts, sizeof(Integers_ptr ));#ifdef MEMORY_INFO  rifo_memory += gnum_relevant_facts * 2 * sizeof( Integers_ptr );#endif  for ( j = 0; j<2*gnum_relevant_facts; j++ ) op_lookup_table[j] = NULL;     for ( i=0; i<gnum_bit_operators; i++ )    { /* go through all operators */      for ( t=0; t<2; t++)	{ /* first check unconditional, then conditional effects */	  if ( t==0 )	    eff = rel_op_array[i].opnode->unconditional;	  else 	    eff = rel_op_array[i].opnode->conditionals;	  while ( eff )	    { /* if any fact is an effect, put operator number into list*/ 	      for ( j=0; j<gnum_relevant_facts; j++ )		{		  if ( get_bit( eff->p_effects->vector, gft_vector_length, j ))		    { 		      if (op_lookup_table[j] == NULL)			op_lookup_table[j] = New_integers( i );		      else 			{			  act = op_lookup_table[j];			  while (!(act->next == NULL)) 			    { act = act->next; }			  act->next = New_integers( i ); 			}		    }		 		  if ( get_bit( eff->n_effects->vector, gft_vector_length, j ))		    { 		      if (op_lookup_table[j+gnum_relevant_facts] == NULL)			op_lookup_table[j+gnum_relevant_facts] = New_integers( i );		      else 			{			  act = op_lookup_table[j+gnum_relevant_facts];			  while (act->next != NULL) 			    { act = act->next; }			  act->next = New_integers( i );			}		 		    }		}	      eff = eff->next;	    }	}    }} /* the heart of this program: the backchaining functions *//* go back in the factgeneration tree from one fact to the operators   that could possibly create it */set_list fbackchain_one_goal( int depth, int index ){  struct rifo_relevant_fact f;  set_list sl;  int nolength, j , constindex;    if (index >= 2*gnum_relevant_facts)    fatal_error ( "fbackchain_one_goal: cannot backchain on objects!\n" );  f = rel_fct_array[index] ; /* get old entry */   if ( (f.memcode >= 0) && (f.is_initial) 	&& ( (!backchain_on_ini) || (depth<=0) ) )     { /* initial fact */      if ( rifo_display_info >= 4 ) 	{	  pprefix( curdepth-depth );	  printf( ">> reached initial fact %d: ", index );	  print_set_list( f.used_facts, "" );          for ( j=0; j<MAX_ARITY; j++ )	    {	      constindex = grelevant_facts[index % gnum_relevant_facts]->arguments[j];              rel_fct_array[2*gnum_relevant_facts+constindex].is_relevant = 1; 	    }	}      sl = set_copy_list( f.used_facts );    }   else if (( f.lastdepth >= depth ) && (f.lastdepth > 0))    { /* cached fact*/      if ( rifo_display_info >= 4 ) {	pprefix( curdepth-depth );	printf( ">> fact %d already cached on level %d, current level %d: ", 		 index, f.lastdepth, depth );	print_set_list( f.used_facts, "" );      }      sl = set_copy_list( f.used_facts );    }   else     { /* not known yet, cached at deeper level, or backchain on ini */      if ( depth <= 0 ) return NULL;      if ( rifo_display_info >= 4 ) 	{	  pprefix( curdepth-depth );          if( f.memcode >= 0 )            printf( ">> backchaining on fact %d ...\n", index );          else             printf( ">> cached fact %d on level %d, try again ...\n",		       index, curdepth - f.lastdepth );	}      /* that's the point: from the goal node find all possible operators	 by backchaining and save the possibility set sl */      sl = fbackchain_ops( depth-1, index ); /* backchain to get result ... */      if ( f.memcode >= 0 ) 	set_merge_into_list( &sl, &nolength, make_set( index ),0 );      if ( rifo_display_info >= 4 ) 	{	  pprefix( curdepth-depth );          if ( index < gnum_relevant_facts)	    {               printf( ">> result for positive fact %d: ", index );	      print_set_list( sl, "" );	    }          else  	    {              printf( ">> result for negative fact %d: ", index );	      print_set_list( sl, "" );            }        }      /* make entry relevant */      rel_fct_array[index].is_relevant = 1 ;      /* free if a list was created previously */      set_free_list( rel_fct_array[index].used_facts );       rel_fct_array[index].lastdepth = depth;      rel_fct_array[index].used_facts = set_copy_list( sl );    }  return sl;}/* All objects used in an instantiated operator are relevant for   this operator   They are included into a set which is the basis for the set   of relevant initial facts */set_list check_constants( int depth, short int objects[MAX_VARS], 			  short int num_objects ){  set_list sl;  int i;  int constindex;  sl = make_set_list( NOELEMENT );  for ( i = 0; i < num_objects; i++ )     {      /* adding 2*gnum_relevant_facts, because constants are stored in        rel_fct_array after pos. and neg. facts */      constindex = 2*gnum_relevant_facts + objects[i];      rel_fct_array[constindex].is_relevant = 1;      /* include object into set */      set_insert_el( sl->item, constindex );    }  return sl;}/* backchain on each of the given goals and try to reach all (AND node).   depth is the current search depth, constants_used is NULL in the beginning   and later contains the objects used by the ground operator whose preconds   are our actual goals */set_list fbackchain_goals( int depth, FactInfoPair *goals,                            short int objects_used[MAX_VARS], short int num_objects ){  set_list sl, new_sl;  int i;  nodes_visited++;        /* first find the set including all objects used on next higher level       by the ground op we're backchaining on...   */  sl = check_constants( depth, objects_used, num_objects);   for (i=0; (i<gnum_relevant_facts) && sl; i++) {       /* backchain on first goal, then make new possibility set sl from       old sl and the new set for the first goal. This is done       as long as there are still goals to backchain and the       possibility set is not empty, which would mean there is no       possibility to reach the goals */    if (get_bit(goals->positive->vector, gft_vector_length ,i))               {       new_sl = fbackchain_one_goal( depth, i);       sl = set_multiply_lists( sl, new_sl );      }    if (get_bit(goals->negative->vector, gft_vector_length ,i))               {       new_sl = fbackchain_one_goal( depth, i + gnum_relevant_facts);       sl = set_multiply_lists( sl, new_sl );      }    }  if ( rifo_display_info >= 5 )     {      pprefix( curdepth-depth );      printf( "- result: " );      pprefix( curdepth-depth );      print_set_list( sl, "- " );      printf( "\n" );    }  return sl;}/* backchains on preconditions and effect conditions because one of   the effects in eff is needed */set_list cond_fbackchain_ops( int depth, int op_number, Effect *eff ){  BitOperator *op;  FactInfoPair *new_goals;  FactInfo *pos, *neg;  set_list setl;  op = rel_op_array[op_number].opnode;    /* backchain on preconditions AND effect conditions */  pos = merge_FactInfo( op->p_preconds, eff->p_conds );  neg = merge_FactInfo( op->n_preconds, eff->n_conds );  new_goals = New_fact_info_pair( pos, neg );  setl = fbackchain_goals( (depth-1), new_goals, op->inst_table, op->num_vars );  if ( opslevel == 2 )          { /* if operator appears first time in backchaining, select it */      if ( !rel_op_array[op_number].was_selected )	{ 	  rel_op_array[op_number].was_selected = TRUE;	}      set_free_list( rel_op_array[op_number].used_facts );      rel_op_array[op_number].used_facts = set_copy_list( setl );      rel_op_array[op_number].lastdepth = depth;    }  if ( rifo_display_info >= 4 )     {      pprefix( curdepth-depth );      printf( "==== results for " );      print_op(op);      printf( "\n" );      pprefix( curdepth-depth );      print_set_list( setl, "==== " );    }  Free_fact_info( pos );  Free_fact_info( neg );  free( new_goals );   return setl;}/* in this function we backchain on one single goal and try to reach   it with different operators (OR node) */set_list fbackchain_ops( int depth, int index ){  set_list setl = NULL, new_setl = NULL;  Effect *eff;  FactInfo *eff_vector;  int op_num;  Integers *op_indices;  nodes_visited++;    if ( rifo_display_info >= 4 )     {      pprefix( curdepth-depth );      printf( ">>> trying to find operators for fact %d ...\n", index );    }       op_indices = op_lookup_table[index];  while ( op_indices != NULL )    { /* check all operator indices in list, they can generate our fact */       /* check unconditional effects */      op_num = op_indices->index;      eff = rel_op_array[op_num].opnode->unconditional;      while ( eff )	{	  if ( index < gnum_relevant_facts )	    eff_vector = eff->p_effects;	  else eff_vector = eff->n_effects;	  /* check if goal is unconditional positive effect of op */	  if ( get_bit(eff_vector->vector, gft_vector_length, index % gnum_relevant_facts)){	    if ( rifo_display_info >= 4 ) {	      pprefix( curdepth-depth );	      printf( ">>> backchaining on effect %d of operator ",		      index);	      print_op(rel_op_array[op_num].opnode);	      printf("\n");	    }	    /* mark operator as selected */	    rel_op_array[op_num].was_selected = TRUE;	    /* now backchain on operator preconditions */	    new_setl = cond_fbackchain_ops( depth, op_num, eff );	    setl = set_merge_lists( setl, new_setl );	  }	  eff = eff->next;	}          /* check conditional effects */      eff = rel_op_array[op_num].opnode->conditionals;      while ( eff ) 	{	  if (index < gnum_relevant_facts)	    eff_vector = eff->p_effects;	  else eff_vector = eff->n_effects;	  /* check if goal is a conditional positive effect of op */	  if ( get_bit(eff_vector->vector, gft_vector_length, index % gnum_relevant_facts)){	    if ( rifo_display_info >= 4 ) {	      pprefix( curdepth-depth );	      printf( ">>> backchaining on conditional effect %d of operator ",		      index);	      print_op(rel_op_array[op_num].opnode);	      printf("\n");	    }	    /* mark operator as selected */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲主播在线播放| 免费人成在线不卡| 亚洲国产日韩精品| 成人一级视频在线观看| 欧美伦理电影网| 中文字幕av一区二区三区高| 亚洲国产日韩一级| 成人sese在线| 久久久美女毛片 | 亚洲精品一区二区三区福利 | 日韩女优电影在线观看| 一区二区免费在线播放| 国产精品77777| 91精品国产欧美日韩| 一区二区三区精品视频| 韩国成人在线视频| 欧美剧情电影在线观看完整版免费励志电影| 国产欧美中文在线| 精品一区二区综合| 69堂成人精品免费视频| 亚洲卡通欧美制服中文| 成人美女在线观看| 久久久久国产精品麻豆ai换脸| 日韩高清一级片| 欧美午夜影院一区| 亚洲一区二区三区不卡国产欧美| 99久久久免费精品国产一区二区| 2023国产精品| 久久成人av少妇免费| 91精品国产一区二区| 亚洲国产欧美日韩另类综合| 91精品1区2区| 亚洲综合色成人| 欧洲日韩一区二区三区| 怡红院av一区二区三区| 色婷婷亚洲婷婷| 艳妇臀荡乳欲伦亚洲一区| 色狠狠av一区二区三区| 一区二区三区日韩在线观看| 91久久香蕉国产日韩欧美9色| 日韩理论在线观看| 欧美性色aⅴ视频一区日韩精品| 亚洲免费视频中文字幕| 91行情网站电视在线观看高清版| 亚洲欧美激情插| 欧美无砖专区一中文字| 日韩国产欧美视频| 久久天堂av综合合色蜜桃网| 国产精品一区一区三区| 中文字幕av一区二区三区免费看| 成人18精品视频| 亚洲国产精品天堂| 欧美xxxx老人做受| 国产91精品在线观看| 日韩毛片一二三区| 欧美日本一区二区三区四区| 青青草97国产精品免费观看无弹窗版| 日韩一区二区视频| 国产精品影视天天线| 尤物视频一区二区| 日韩免费在线观看| voyeur盗摄精品| 香蕉影视欧美成人| 欧美激情综合在线| 欧美日韩亚洲综合一区二区三区| 免费观看久久久4p| 自拍偷拍亚洲欧美日韩| 日韩一级欧美一级| 99r国产精品| 日本中文字幕一区| 国产精品久久久久久久久晋中| 欧美视频中文字幕| 国产99一区视频免费| 亚洲一区在线观看网站| 久久综合久久综合久久| 一本色道久久综合亚洲精品按摩| 麻豆视频观看网址久久| 中文字幕一区二区三区蜜月| 91.com在线观看| 成a人片国产精品| 久久精品国产精品亚洲红杏| 亚洲欧美偷拍三级| 久久一区二区三区四区| 欧美伦理电影网| 91在线精品一区二区| 激情五月激情综合网| 亚洲国产成人av网| 中文字幕一区二区日韩精品绯色| 欧美大片免费久久精品三p| 成人黄页在线观看| 国产综合久久久久影院| 婷婷激情综合网| 一区二区三区在线视频观看58| 2024国产精品视频| 日韩色视频在线观看| 欧美综合视频在线观看| 99re这里只有精品6| 国产精品亚洲人在线观看| 天天色综合天天| 亚洲国产视频一区| 一个色在线综合| 亚洲三级在线免费| 成人免费在线播放视频| 久久久高清一区二区三区| 欧美一区二区在线看| 欧美视频一区二区三区在线观看| 99麻豆久久久国产精品免费优播| 国产在线播精品第三| 久久成人精品无人区| 蜜桃av一区二区三区电影| 日日夜夜精品免费视频| 亚洲一区二区三区四区在线观看| 亚洲精品一卡二卡| 亚洲精品中文字幕乱码三区| 日韩毛片一二三区| 亚洲精品一卡二卡| 一二三四社区欧美黄| 亚洲一二三区不卡| 午夜精品久久久| 视频一区二区国产| 久久精品久久精品| 国产精品1024| 成人a区在线观看| 91在线一区二区三区| 91啪亚洲精品| 欧美日韩一区二区三区四区| 欧美视频精品在线| 欧美一级在线视频| 亚洲精品在线观看视频| 中文字幕av免费专区久久| 综合av第一页| 丝袜亚洲另类欧美综合| 蜜臀av在线播放一区二区三区| 激情伊人五月天久久综合| 豆国产96在线|亚洲| 91看片淫黄大片一级| 欧美美女一区二区三区| 欧美成人一区二区三区在线观看 | 激情综合五月天| 国产在线国偷精品产拍免费yy| 精品制服美女丁香| av中文字幕亚洲| 国产在线观看免费一区| 水蜜桃久久夜色精品一区的特点 | 精品久久人人做人人爽| 日韩一区二区中文字幕| 91精品国产色综合久久不卡蜜臀| 91精品婷婷国产综合久久竹菊| 日韩视频永久免费| 国产精品三级久久久久三级| 国产精品无圣光一区二区| 国产精品国产三级国产a| 中文字幕五月欧美| 亚洲图片你懂的| 国产精品亲子乱子伦xxxx裸| 欧美国产一区在线| 性欧美大战久久久久久久久| 麻豆一区二区三| 成人免费观看av| 欧美三级乱人伦电影| 精品乱人伦小说| 亚洲国产精品黑人久久久| 图片区日韩欧美亚洲| 国内不卡的二区三区中文字幕 | 蜜桃av一区二区三区| av亚洲精华国产精华| 日本高清免费不卡视频| 日韩欧美一区二区免费| 国产精品视频看| 亚洲午夜一区二区| av一二三不卡影片| 欧美肥妇free| 亚洲欧洲一区二区三区| 国产精品国产三级国产普通话99| 麻豆精品久久久| 成人精品免费网站| 91麻豆精品国产自产在线| 国产精品天天看| 国产一区免费电影| 懂色一区二区三区免费观看| 国产乱码精品1区2区3区| 欧美日韩一级大片网址| 久久久久久免费| 香蕉久久一区二区不卡无毒影院| 国产盗摄女厕一区二区三区 | 精品精品国产高清a毛片牛牛 | 欧美综合久久久| 国产亚洲综合性久久久影院| 日韩国产在线一| 99免费精品在线观看| 久久色成人在线| 午夜成人免费视频| 91久久精品网| 国产欧美一区二区精品仙草咪| 亚洲成a人片综合在线| 成人aaaa免费全部观看| 国产精品久久久久久久午夜片| 欧美bbbbb| 欧美午夜精品一区二区三区| 国产精品久久午夜|