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

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

?? structures.h

?? 最快速的可滿足性分析工具軟件
?? H
字號:
/* * structures.h: This file contains all important defintions. * You should study this file first if you want to modify the code * of RSat. * * Below, you will see defintions of data structures, * macro definitions, and function prototypes. * * The main structures are * - my_var      [variable] * - my_lit      [literal] * - my_clause   [clause] * - my_manager  [solving manager] *  */#ifndef STRUCTURES_DEFINED #define STRUCTURES_DEFINED #include "flags.h"//format string for printing large integers#ifdef _MSC_VERtypedef __int64  int64;#define i64d "I64d"#elsetypedef long long int64;#define i64d "lld"#endif//all allocation calls are made through these 2 wraping functions (defined in mem_alloc.cpp)#define calloc my_calloc#define malloc my_malloc//type definition for variables and literals/************************************************************ * Variables. Variables are often used as indices into arrays. * Variables ranges from 1 to # of variables. * For example, if the input problem contains 100 variables, * the variable indices will range from 1 to 100. ************************************************************/typedef int my_var;   /************************************************************ * Literals. The positive literal of the variable v is  * represented as (v<<1). The negative literal is (v<<1)|1. * There are many macros that can be used to manipulate literals. * Please see their definition below (search for 'macros'). * * For example, if l is of type my_lit * var(l) is the variable of l (type my_var). * lit_index(l) is the integer representation of l (can be * printed with %d). * neg(l) is the negation of l (type my_lit). * ************************************************************/typedef int my_lit;   //all functions related to heap are in heap.cpptypedef struct heap_t{  my_var* order;    //order[i] = variable at heap position i  int* indices;     //indices[x] = index of variable x in the (heap) order array  int size;         //current heap size (# items in heap)} heap;//type definition for the queue of implications used in bcptypedef heap implication_queue; //a clause contains an index, an array of literals and a sizetypedef struct clause_tt{    /*   * About clause index.   * Original clauses have negative indices [-1,-2,-3,...].   * Learned clauses have non-negative indices [0,1,2,...].   * This is because we keep a few information about learned clauses in arrays.   * This way, we can simply use indices of learned clauses as array indices.   * On the other hand, we do not have any array for orignal clauses.   */  int index;    //the clause index  my_lit* lits; //array of literals in this clause  int size;     //the size of this clause  } my_clause;//this is the main data structure for managing various things during the search//all functions related to initialization of this structure are in manager.cpptypedef struct manager_tt{  int vc;    //number of variables in the problem  int64 cc;  //number of original clauses (after some simplification in read_cnf)  my_clause** original_clauses;   //array of original clauses  int original_clauses_array_len; //the capacity of the original_clauses array  my_clause** learned_clauses;    //array of learned clauses  int learned_clauses_array_len;  //the capacity of the learned_clauses array    //Levels start at 1 (top level). 0 means that varaible is not yet assigned.   int* level;  //array of variables' levels. my_var-indexed.  my_lit* assign; //array of assignments. This is really the assignment stack.  my_lit* assign_top; //the top of the assignment stack.  my_lit** decision_lit; //array of decision literals. Indexed by the level of the decision.  int decision_lit_size; //the capacity of the decision_lit array.  my_lit* status;        //array of assignments of variables. my_var-indexed. status[v] is 0 if v is a free variable.或plit(var_index) 或nlit(var_index)  my_clause** reason;    //array of reasons for each implication. my_var-indexed. Decision variables have NULL reasons.  double* score;         //array of (vsids) scores of variables. my_var-inded.#if(ALLOW_PARTIAL_ORDER)  int* partial_order; //array of partial order "score". High score means high preference.                      //Scores in this array have higher priority than those in the 'score' array.#endif  my_clause*** watched;  //array of watched list for all literals. The entry of literal l is at position watched_index(l).  int* watched_size;     //the size of the watched list of each literal. Indexed by watched_index(l).  int* watched_len;      //the capacity of the watched list of each literal. Indexed by watched_index(l).  int decision_level;    //the current decision level  double restart_conflict_incr;   int64 next_restart_conflict; //the number of conflicts the solver has to reach to restart  int restart;                 //the number of restarts performed by the solver so far  int stack_offset;            //the offset into the assignment stack (assign). This is used only for enqueuing unit original clauses (see enqueue/process_unit_literal_queue).  char ok;                     //a flag used for indicating inconsistency during input reading. If ok==0, it means that the instance is trivially unsatisfiable.  my_clause* conflicting_clause;//the most recent conflicting clause.  my_clause* conflict_clause;  //the most recent conflict clause.  int assertion_level;         //the assertion level of the most recent conlict clause.  int conflict_level;          //the level of the most recent conflict.  implication_queue* imp;      //the queue of implications used in bcp.#if(VERIFY_SOLUTION)  my_lit* solution_stack;  my_lit* solution_stack_top;#endif  char save_progress;          //a flag. Whether to progress saving is ON or OFF.  my_lit* saved;               //the saved literal array. my_var-indexed. Used for progress saving implementation.  double* learned_clause_scores; //array of scores for all learned clauses. Indexed by the indices of learned clauses.  my_lit* cdc;  //a temporary array of literals (for conflict clause). Used in the function derive_conflict_clause.  int cdc_size; //the capacity of the cdc array.  int cdc_index; //the next free position in the cdc array.    char* seen;    //a temporary array used in derive_conflict_clause and removable. my_var-indexed.  my_lit* stack; //a temporary stack used in removable.   int stack_size; //the capacity of stack.  int* save;      //a temporary array used in removable.  int save_size;  //the capacity of save.  heap* var_order_heap; //the heap used for variable ordering (see heap.cpp).  double score_inc;  //the current variable score increment amount.  double score_inc_factor;  //the factor to increase score_inc by.    int64 decisions;          //the number of decisions made by the solver so far  int64 conflicts;          //the number of conflicts experienced by the solver so far  //the following variables are mostly for stats  int64 cdc_count;          //total number of learned clauses ever learned (some may have been deleted).  int64 cdl_count;          //total number of literals ever appear in learned clauses.  int64 cur_cdc_count;      //the current number of learned clauses.  int64 cur_cdl_count;      //the current number of literals in learned clauses.  int64 cur_cc;             //the current number of original clauses.  int64 cur_lit_count;      //the current number of literals in original clauses.  int64 original_literals_count; //total number of literals in the original instance that still remain  int64 original_clauses_count;  //total number of clauses in the original instance that still remain  int max_decision_level;   //the maximum decision level ever reached by the solver    int kb_reduction_count;  //number of times we have performed learned clause deletion  double clause_score_inc; //the current clause score increment amount.  double max_learned_clauses;  //the maximum number of learned clauses allowed before we need to delete some.    int kb_simplification_count; //number of times we have performed knowledge base simplification.  int num_conflicts_for_next_simplify; //number of conflicts to perform knowledge base simplification.  int next_simplify_increment;         //amount to increment num_conflicts_for_next_simplify by.  char simplify_orig_kb;               //a flag whether to perform (orig.) knowledge base simplication.  char simplify_learned_kb;            //a flag whether to perform (learned) knowledge base simplication.  double random_seed;   //a random seed used by the solver  int luby_unit;     //the number of conflicts used as the unit in our restarting policy calculation.  //these variables are for the implementation of periodic progress saving.  //they control when progress saving is turned ON or OFF. See analyze_conflict().  int on_th;         //how many conflicts to turn progress saving on for  int on_th_inc;     //increment amount for on_th every time we switch  int off_th;        //how many conflicts to turn progress saving off for  int off_th_inc;    //increment amount for off_th every time we switch  int next_sp_switch;//the next amount of conflicts to swich the state of progress saving    /*   * Result printing mode:   * 0: (default) print result line but not solution line   * 1: print nothing!   * 2: print result line AND solution line   */  char print_mode;  char verbose;  //varaibles below are for progres printing (see print_utils.cpp)  int64 previous_decision_count;  int64 previous_conflicts;  int previous_reduce_kb_count;  int previous_simplify_kb_count;  int base_unit_clause_learned;} my_manager;//Some frequently used macros.#define sign(l) (l&1)   //sign(l) is 1 if l is a negative literal#define neg(l)  (l^1)   //compute the negation of literal l#define lit_index(l) (sign(l)?-(l>>1):l>>1)  //compute the integer representation of literal l#define var(l) (l>>1)   //the variable of l#define plit(v) (v<<1)  //the positive literal of v#define nlit(v) ((v<<1)|1) //the negative literal of v#define set(l) (status[var(l)]==l) //1 iff l is set to true. *** status must point to my_m  ->status at the call location.#define watched_index(l) (2*(var(l)-1)+sign(l)) //the index of literal l in various arrays.literal的數組中的元素1 2 3 4 5 6  ,按宏計算其下標為0  1 2 3 4 5#define lit_from_int(in) (in<0?((-in)<<1)|1:in<<1) //convert integer in into a literal of type my_lit#define unresolved(l) (status[var(l)]!=neg(l)) //1 iff l is true or free.#define free_lit(l) (status[var(l)]==0)  //1 iff l is a free literal.#define resolved(l) (status[var(l)]==neg(l)) //1 iff l is set to false.#define var_ind(x) (x<0?-x:x)  //essentially abs(x)#define max(x,y) (x>y?x:y) //max of x and y#define min(x,y) (x<y?x:y) //min of x and y//operations for heap#define left(i) (i*2)#define right(i) ((i*2)+1)#define parent(i) (i/2) //this automatically rounds down//function for printing out a comment line#define rprintf(format, args...) ( printf("c "), printf(format , ## args), fflush(stdout) )//function prototypesvoid* my_calloc(size_t,size_t);void* my_malloc(size_t);//input parsingvoid read_cnf(char*);void enqueue(my_lit);#if(ALLOW_PARTIAL_ORDER)void read_po_file(char*);#endif//core functionschar process_unit_literal_queue();void add_conflict_clause();void analyze_conflict(my_clause*,int level);char set_decision(my_lit);int get_luby(int i);char assert_conflict_clause();int solve();void backtrack(int);char bcp(my_lit);//watched listvoid init_watched_literals();void remove_watched_clause(my_lit,my_clause*);void add_watched_clause(my_lit,my_clause*);void declare_watched_literals(my_clause*);//my_managerchar finish_up_init_manager();void init_clause(int*,int,int);void init_manager();void free_manager();//printingvoid print_progress_header();void print_progress();void print_progress_footer();void print_clause(my_clause*);void print_stats();void print_location();void print_solution();void print_watched_list(my_lit l);void print_indices(heap* h,int var_count);void print_order(heap* h);void print_usage();//debuggingvoid check_watched_list(char);void check_watched_literal_completeness();void check_sorted_clause_array(my_clause**,double*,int);void check_assignment_stack();void check_heap_property(heap* h,int var_count);void save_solution_to_file();#if(VERIFY_SOLUTION)void save_solution();char verify_solution();#endif//endif verif solution//kb managementvoid remove_clause(my_clause*);void sort_clauses_by_scores(my_clause***,double**,int);void simplify_kb();void simplify_original_kb();void reduce_kb();char add_base_clause(my_clause*); //added 10/11/07//heap relatedvoid init_heap(heap* h,int n);my_var get_min_element(heap* h);char empty(heap* h);void insert(heap* h,my_var v);void increase(heap* h,int v);void update(heap* h,int v);void undo(heap* h,my_var v);my_var select_variable();my_var dequeue(implication_queue* q);void rescale_variable_scores();void increment_literal_score(my_lit);void increment_clause_score(my_clause* c);void free_heap(heap* h);void reset_heap(heap*);//array size manipulationvoid double_decision_lit_len();void double_stack_len();void double_save_len();void double_cdc_len();void half_decision_lit_len();void double_learned_clauses_array();void* double_array_len(void*,int*,size_t);//functions for recursive/exhaustive SAT implementation (experimental_code.cpp)int solve_recursively(); //not used by the normal solverlong count_models();char at_assertion_level();char bcp2(my_lit);char decide(my_lit);void undo_decide();char assert_cd_literal();//time measuring function#ifdef _MSC_VER#include <ctime>static inline double get_cpu_time(void) {    return (double)clock() / CLOCKS_PER_SEC; }#else#include <sys/time.h>#include <sys/resource.h>static inline double get_cpu_time(void) {  struct rusage ru;  getrusage(RUSAGE_SELF, &ru);  return (double)ru.ru_utime.tv_sec + (double)ru.ru_utime.tv_usec / 1000000; }#endif#endif//endif ifndef (topmost)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图制服丝袜| 日韩免费看的电影| 日韩视频123| 国产一区二区女| 美国av一区二区| 久久国产剧场电影| 国产一区二区免费看| 国产精品99久久久久久宅男| 国产伦精品一区二区三区视频青涩 | 免费久久精品视频| 天天爽夜夜爽夜夜爽精品视频| 性久久久久久久久久久久| 日欧美一区二区| 青青草91视频| 国产福利91精品一区| 99国产一区二区三精品乱码| 亚洲影视在线观看| 亚洲人成网站色在线观看| 亚洲免费av观看| 国产精品福利一区| 一区二区三区在线观看国产| 亚洲第一主播视频| 久久激情五月激情| 不卡在线观看av| 欧美日韩一卡二卡三卡| 亚洲精品一区二区三区在线观看| 久久久久久一级片| 亚洲一区精品在线| 久久精品99久久久| 日本韩国视频一区二区| 欧美一级淫片007| 一色屋精品亚洲香蕉网站| 亚洲成人动漫在线免费观看| 国产精品77777| 欧美亚洲高清一区| 国产精品你懂的在线欣赏| 日韩精品高清不卡| 成人av在线观| 日韩三级av在线播放| 亚洲精品视频免费看| 国产剧情av麻豆香蕉精品| 91福利视频网站| 欧美经典三级视频一区二区三区| 亚洲影视资源网| 成人黄色小视频| 精品欧美乱码久久久久久1区2区| 亚洲女人小视频在线观看| 久久精品免费看| 欧美日韩色一区| 亚洲精品欧美激情| 成人av一区二区三区| 欧美一级在线视频| 婷婷亚洲久悠悠色悠在线播放| zzijzzij亚洲日本少妇熟睡| 久久综合国产精品| 韩日欧美一区二区三区| 日韩免费视频一区| 丝袜亚洲精品中文字幕一区| 色视频成人在线观看免| 中文子幕无线码一区tr| 国产精品一级黄| 韩国理伦片一区二区三区在线播放| 国产欧美日韩在线| 欧美视频一区在线| 日韩欧美精品三级| 日本一二三四高清不卡| 欧美日韩国产三级| 国产麻豆91精品| 成人免费视频免费观看| 精品福利一区二区三区| 蜜桃视频一区二区| 日韩一区二区精品| 日韩avvvv在线播放| 欧美日韩一区二区三区不卡| 亚洲精品日韩一| 色婷婷综合中文久久一本| 亚洲激情在线播放| 在线观看三级视频欧美| 亚洲一区二区黄色| 欧美军同video69gay| 日本不卡123| 91精品国产欧美日韩| 裸体歌舞表演一区二区| 久久久久免费观看| 不卡av电影在线播放| 一区二区三区.www| 欧洲精品在线观看| 日韩高清不卡一区二区三区| 日韩免费一区二区三区在线播放| 麻豆精品视频在线| 国产色综合一区| 丁香六月综合激情| 99re在线视频这里只有精品| 色成年激情久久综合| 亚洲视频网在线直播| 亚洲福利国产精品| 欧美三区在线视频| 寂寞少妇一区二区三区| 欧美激情一区二区三区全黄| 在线看国产一区二区| 另类小说一区二区三区| 国产欧美日产一区| 欧美午夜电影在线播放| 久久9热精品视频| 亚洲美女在线一区| 日韩亚洲欧美一区二区三区| eeuss鲁片一区二区三区在线观看| 一区二区高清在线| www一区二区| 欧美性色黄大片手机版| 国产自产高清不卡| 亚洲综合免费观看高清在线观看| 在线精品视频一区二区三四| 亚洲国产精品传媒在线观看| 欧美三区在线观看| 国产裸体歌舞团一区二区| 一区二区三区免费| 国产欧美精品一区二区色综合 | eeuss鲁片一区二区三区在线看| 亚洲成人在线免费| 国产精品不卡一区二区三区| 制服丝袜亚洲色图| 91小视频在线| 国产久卡久卡久卡久卡视频精品| 亚洲国产综合视频在线观看| 国产精品久久久久永久免费观看| 欧美日韩免费电影| 97精品久久久久中文字幕| 国产在线精品不卡| 美女国产一区二区| 亚洲www啪成人一区二区麻豆| 中文字幕高清不卡| 久久这里只有精品6| 日韩一级大片在线观看| 欧美日韩国产小视频在线观看| 成人av网在线| 成人精品高清在线| 国产成人三级在线观看| 狠狠色丁香久久婷婷综合丁香| 欧美aⅴ一区二区三区视频| 亚洲精品国产高清久久伦理二区 | 色偷偷久久人人79超碰人人澡| 国产一区二区三区美女| 美女视频网站黄色亚洲| 日本v片在线高清不卡在线观看| 五月综合激情婷婷六月色窝| 亚洲自拍另类综合| 亚洲午夜久久久久久久久久久| 亚洲色图另类专区| 亚洲欧美精品午睡沙发| 亚洲欧美一区二区不卡| 国产精品成人免费| 国产精品电影院| 亚洲色图.com| 亚洲高清免费视频| 午夜欧美电影在线观看| 青青青爽久久午夜综合久久午夜 | 国产91精品欧美| 波多野结衣亚洲| 一本大道av伊人久久综合| 99re热这里只有精品视频| 色婷婷精品久久二区二区蜜臂av| aaa亚洲精品一二三区| 色88888久久久久久影院按摩 | 久久久国际精品| 国产偷国产偷亚洲高清人白洁| 国产精品美女www爽爽爽| 最新不卡av在线| 日韩在线a电影| 老司机精品视频在线| 国产精品综合网| 91性感美女视频| 3atv一区二区三区| 国产亚洲一区二区三区| 最新日韩在线视频| 日韩电影一区二区三区| 国产一区二区三区香蕉| 一本大道综合伊人精品热热 | 欧美嫩在线观看| 亚洲精品在线观看视频| 亚洲欧洲综合另类| 蜜桃一区二区三区在线| 丁香亚洲综合激情啪啪综合| 91福利在线看| 久久久久久97三级| 亚洲妇熟xx妇色黄| 成人激情开心网| 日韩写真欧美这视频| 亚洲丝袜精品丝袜在线| 麻豆91精品视频| 欧美视频一二三区| 国产精品美女视频| 秋霞午夜鲁丝一区二区老狼| 91在线码无精品| 精品少妇一区二区| 一区二区三区四区蜜桃 | 日本欧美大码aⅴ在线播放| 成人av在线播放网址| 精品日韩成人av| 亚洲123区在线观看|