eg_2ptighten.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "dp_config.h"
#include "eg_mempool.h"
#include "eg_2ptighten.h"
#include "eg_ugraph.h"
#include "eg_bit.h"
#include "eg_util.h"
#include "eg_bbtree.h"
#include "eg_2pchecker.h"

Include dependency graph for eg_2ptighten.c:

Go to the source code of this file.

Data Structures

struct  KPTMove_t
 Structure to hold a movement. More...
struct  KPTFullMove_t
 Full move structure. More...
struct  KPTGdata_t
 Structure to hold information about the graph. More...
union  KPTEdata_t
 structure holding information regarding every edge More...
struct  KPTNdata_t

Defines

#define KPT_ENABLE   1
#define KPT_MAX_DOM   512U
#define KPT_MAX_DOM_LOG   9U
#define KPT_MAX_NODE   131072U
#define KPT_MAX_NODE_LOG   17U
#define KPT_MAX_DEPTH   1U
#define KPTMinImprovement   (-1e-7)
#define KPTgetEdge(__e_it)   ((EGuGraphEdge_t*)(__e_it->this))
#define KPTgetOtherEndId(__n_id, __e_it)   (__n_id == KPTgetEdge(__e_it)->head->id ? KPTgetEdge(__e_it)->tail->id : KPTgetEdge(__e_it)->head->id)
#define KPTgetEdgeId(__e_it)   (KPTgetEdge(__e_it)->id)
#define KPTNdata(__this)   ((KPTNdata_t*)(__this))
#define KPTmoveBH(__n_id)
#define KPTmoveAH(__n_id)
#define KPTmoveAdB(__n_id, __dom)
#define KPTmoveAAc(__n_id, __dom)
#define KPTmoveBBc(__n_id, __dom)
#define KPTmoveAcA(__n_id, __dom)
#define KPTmoveBcB(__n_id, __dom)
#define KPTmakeMoveBHcBH(__id, __val)   KPTmakeMoveBHBHc(__id,__val)
 This function make the move BHcBH,assuming the move is feasible.
#define KPTmakeMoveAHcAH(__id, __val)   KPTmakeMoveAHAHc(__id,__val)
 This function make the move AHcAH,assuming the move is feasible.
#define KPTmakeMoveAHAHcBHcBH(__id, __val)   KPTmakeMoveAHAHcBHBHc(__id,__val)
 This function make the move AHcAH,assuming the move is feasible.
#define KPTmakeMoveAHcAHBHBHc(__id, __val)   KPTmakeMoveAHAHcBHBHc(__id,__val)
 This function make the move AHcAH,assuming the move is feasible.
#define KPTmakeMoveAHcAHBHcBH(__id, __val)   KPTmakeMoveAHAHcBHBHc(__id,__val)
 This function make the move AHcAH,assuming the move is feasible.
#define KPTmakeMove(__move, __flags)   __KPTmakeMove(__move,__flags,__LINE__,__FILE__,__func__)
 given a node, and a move, make it
#define KPTupdateMove(__cmove, __bmove)   __KPTupdateMove(__cmove,__bmove)
 , check if we should update a move, if so, do the update
#define KPTpriceBHcBH(__move, __val)   KPTpriceBHBHc(__move,__val)
 This function prices the move BHcBH,assuming the move is feasible.
#define KPTpriceAHcAH(__id, __val)   KPTpriceAHAHc(__id,__val)
 This function prices the move AHcAH,assuming the move is feasible.
#define KPTpriceAHAHcBHcBH(__id, __val)   KPTpriceAHAHcBHBHc(__id,__val)
 This function prices the move AHcAH,assuming the move is feasible.
#define KPTpriceAHcAHBHBHc(__id, __val)   KPTpriceAHAHcBHBHc(__id,__val)
 This function prices the move AHcAH,assuming the move is feasible.
#define KPTpriceAHcAHBHcBH(__id, __val)   KPTpriceAHAHcBHBHc(__id,__val)
 This function prices the move AHcAH,assuming the move is feasible.
#define KPTgoDeeper(__depth)

Typedefs

typedef KPTNdata_t KPTNdata_t
typedef static KPTNdata_tnodeData = 0
typedef static KPTEdata_tedgeData = 0
typedef static KPTGdata_t graphData
typedef static EGuGraph_tG = 0
typedef static EGuGraphNode_t ** all_nodes
typedef static EGuGraphEdge_t ** all_edges
typedef static double const * weight
typedef static EGbbtree_ttree
typedef static EGbitset_t node_update [EGbitsetSize(KPT_MAX_NODE)]

Enumerations

enum  move {
  KPT_Tc_AB, KPT_Tc_AcB, KPT_Tc_ABc, KPT_Tc_AcBc,
  KPT_Tc_A, KPT_Tc_B, KPT_Tc_Ac, KPT_Tc_Bc,
  KPT_AHc_AH, KPT_BHc_BH, KPT_AHc_AH_BHc_BH, KPT_Ac_A,
  KPT_Bc_B, KPT_A_Ac, KPT_B_Bc, KPT_A_Ac_B_Bc,
  KPT_A_Ac_Bc_B, KPT_Ac_A_B_Bc, KPT_Ac_A_Bc_B, KPT_Ac_A_flipAH,
  KPT_Bc_B_flipBH, KPT_A_Ac_flipAH, KPT_B_Bc_flipBH, KPT_A_Ac_B_Bc_flipAH,
  KPT_A_Ac_Bc_B_flipAH, KPT_Ac_A_B_Bc_flipAH, KPT_Ac_A_Bc_B_flipAH, KPT_A_Ac_B_Bc_flipBH,
  KPT_A_Ac_Bc_B_flipBH, KPT_Ac_A_B_Bc_flipBH, KPT_Ac_A_Bc_B_flipBH, KPT_A_Ac_B_Bc_flipAHBH,
  KPT_A_Ac_Bc_B_flipAHBH, KPT_Ac_A_B_Bc_flipAHBH, KPT_Ac_A_Bc_B_flipAHBH, KPT_AH_AHc_BHc_BH,
  KPT_AHc_AH_BH_BHc, KPT_AcBc_Tc, KPT_AcB_Tc, KPT_ABc_Tc,
  KPT_AB_Tc, KPT_A_Tc, KPT_B_Tc, KPT_Ac_Tc,
  KPT_Bc_Tc, KPT_AH_AHc, KPT_BH_BHc, KPT_AH_AHc_BH_BHc,
  KPT_no_move
}

Functions

static void KPTpriceConstraint (double *l_violation)
static int EGdpTightNdataCompare (const void *N1, const void *N2)
 This function compare two node data information.
static int KPTmakeMoveBHBHc (KPTMove_t const *const cur_move, const unsigned int update_flags)
 This function make the move BHBHc,assuming the move is feasible.
static int KPTmakeMoveAHAHc (KPTMove_t const *const cur_move, const unsigned int update_flags)
 This function make the move AHAHc,assuming the move is feasible.
static int KPTmakeMoveAHAHcBHBHc (KPTMove_t const *const cur_move, const unsigned int update_flags)
 This function make the move AHAHcBHBHc,assuming the move is feasible.
static int KPTmakeMoveAcBTc (const KPTMove_t *const cur_move)
 This function make the move AcBTc, assuming the move is feasible.
static int KPTmakeMoveABcTc (const KPTMove_t *const cur_move)
 This function make the move ABcTc, assuming the move is feasible.
static int KPTmakeMoveAcBcTc (const KPTMove_t *const cur_move)
 This function make the move AcBcTc, assuming the move is feasible.
static int KPTmakeMoveBBcflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move BBcflipBH, assuming the move is feasible.
static int KPTmakeMoveBcBflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move BcBflipBH, assuming the move is feasible.
static int KPTmakeMoveAAcflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AAcflipAH, assuming the move is feasible.
static int KPTmakeMoveAcAflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcAflipAH, assuming the move is feasible.
static int KPTmakeMoveBBc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move BBc, assuming the move is feasible.
static int KPTmakeMoveBcB (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move BcB, assuming the move is feasible.
static int KPTmakeMoveAAc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AAc, assuming the move is feasible.
static int KPTmakeMoveAcA (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcA, assuming the move is feasible.
static int KPTmakeMoveAcABBc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcABBc, assuming the move is feasible.
static int KPTmakeMoveAAcBcB (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBcB, assuming the move is feasible.
static int KPTmakeMoveAcABcB (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AcABcB, assuming the move is feasible.
static int KPTmakeMoveAAcBBc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBBc, assuming the move is feasible.
static int KPTmakeMoveAcABBcflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcABBcflipAH, assuming the move is feasible.
static int KPTmakeMoveAAcBcBflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBcBflipAH, assuming the move is feasible.
static int KPTmakeMoveAcABcBflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AcABcBflipAH, assuming the move is feasible.
static int KPTmakeMoveAAcBBcflipAH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBBcflipAH, assuming the move is feasible.
static int KPTmakeMoveAcABBcflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcABBcflipBH, assuming the move is feasible.
static int KPTmakeMoveAAcBcBflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBcBflipBH, assuming the move is feasible.
static int KPTmakeMoveAcABcBflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AcABcBflipBH, assuming the move is feasible.
static int KPTmakeMoveAAcBBcflipBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBBcflipBH, assuming the move is feasible.
static int KPTmakeMoveAcABBcflipAHBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function make the move AcABBcflipAHBH, assuming the move is feasible.
static int KPTmakeMoveAAcBcBflipAHBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBcBflipAHBH, assuming the move is feasible.
static int KPTmakeMoveAcABcBflipAHBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AcABcBflipAHBH, assuming the move is feasible.
static int KPTmakeMoveAAcBBcflipAHBH (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makeMoves the move AAcBBcflipAHBH, assuming the move is feasible.
static int KPTmakeMoveABTc (const KPTMove_t *const cur_move)
 This function makes the move ABTc, assuming the move is feasible.
static int KPTmakeMoveTcAcBc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makes the move TcAcBc,assuming the move is feasible.
static int KPTmakeMoveTcABc (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makes the move Tc ABc,assuming the move is feasible.
static int KPTmakeMoveTcAcB (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makes the move Tc AcB,assuming the move is feasible.
static int KPTmakeMoveTcAB (const KPTMove_t *const cur_move, const unsigned int update_flags)
 This function makes the move Tc AB, assuming the move is feasible.
static int KPTmakeMoveTcA (KPTMove_t const *const move, const unsigned int update_flags)
 Perform a KPT_TcA move.
static int KPTmakeMoveTcAc (KPTMove_t const *const move, const unsigned int update_flags)
 Perform a KPT_TcAc move.
static int KPTmakeMoveTcB (KPTMove_t const *const move, const unsigned int update_flags)
 Perform a KPT_TcB move.
static int KPTmakeMoveTcBc (KPTMove_t const *const move, const unsigned int update_flags)
 Perform a KPT_TcBc move.
static int KPTmakeMoveATc (KPTMove_t const *const move)
 Perform a KPT_ATc move.
static int KPTmakeMoveAcTc (KPTMove_t const *const move)
 Perform a KPT_AcTc move.
static int KPTmakeMoveBTc (KPTMove_t const *const move)
 Perform a KPT_BTc move.
static int KPTmakeMoveBcTc (KPTMove_t const *const move)
 Perform a KPT_BcTc move.
static int KPTTestEdges (void)
 This function check that the edges got the wright values in their data.
static int __KPTmakeMove (KPTMove_t const *const move, const unsigned int update_flags, const int line, const char *file, const char *function)
static int KPTmakeInvMove (KPTMove_t const *const move, const unsigned int update_flags)
 given a node, and a move, make the inverse move
static int KPTisMoveFeasible (KPTMove_t const *const move, const unsigned int update_flags)
 given a node, and a move, check if it is feasible, if update_flags is set to one, then it will check the constrains imposed by them.
static int KPTisFullMoveFeasible (KPTFullMove_t const *const full_move)
 check if a full move is feasible
static int __KPTupdateMove (const KPTFullMove_t *const cur_move, KPTFullMove_t *const best_move)
static int KPTpriceBHBHc (KPTMove_t const *const cur_move, double *const move_val)
 This function prices the move BHBHc,assuming the move is feasible.
static int KPTpriceAHAHc (KPTMove_t const *const cur_move, double *const move_val)
 This function prices the move AHAHc,assuming the move is feasible.
static int KPTpriceAHAHcBHBHc (KPTMove_t const *const cur_move, double *const move_val)
 This function prices the move AHAHcBHBHc,assuming the move is feasible.
static int KPTpriceAcBTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcBTc, assuming the move is feasible.
static int KPTpriceABcTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move ABcTc, assuming the move is feasible.
static int KPTpriceAcBcTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcBTc, assuming the move is feasible.
static int KPTpriceBBcflipBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BBcflipBH, assuming the move is feasible.
static int KPTpriceBcBflipBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BcBflipBH, assuming the move is feasible.
static int KPTpriceAAcflipAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcflipAH, assuming the move is feasible.
static int KPTpriceAcAflipAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcAflipAH, assuming the move is feasible.
static int KPTpriceBBc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BBc, assuming the move is feasible.
static int KPTpriceBcB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BcB, assuming the move is feasible.
static int KPTpriceAAc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAc, assuming the move is feasible.
static int KPTpriceAcA (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcA, assuming the move is feasible.
static int KPTpriceAcABBc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABBc, assuming the move is feasible.
static int KPTpriceAAcBcB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBcB, assuming the move is feasible.
static int KPTpriceAcABcB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABcB, assuming the move is feasible.
static int KPTpriceAAcBBc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBBc, assuming the move is feasible.
static int KPTpriceAcABBcBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABBcBH, assuming the move is feasible.
static int KPTpriceAAcBcBBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBcBBH, assuming the move is feasible.
static int KPTpriceAcABcBBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABcBBH, assuming the move is feasible.
static int KPTpriceAAcBBcBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBBcBH, assuming the move is feasible.
static int KPTpriceAcABBcAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABBcAH, assuming the move is feasible.
static int KPTpriceAAcBcBAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBcBAH, assuming the move is feasible.
static int KPTpriceAcABcBAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABcBAH, assuming the move is feasible.
static int KPTpriceAAcBBcAH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBBcAH, assuming the move is feasible.
static int KPTpriceAcABBcAHBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABBcAHBH, assuming the move is feasible.
static int KPTpriceAAcBcBAHBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBcBAHBH, assuming the move is feasible.
static int KPTpriceAcABcBAHBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcABcBAHBH, assuming the move is feasible.
static int KPTpriceAAcBBcAHBH (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AAcBBcAHBH, assuming the move is feasible.
static int KPTpriceABTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move ABTc, assuming the move is feasible.
static int KPTpriceTcAcBc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move TcAcBc,assuming the move is feasible.
static int KPTpriceTcABc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move Tc ABc,assuming the move is feasible.
static int KPTpriceTcAcB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move Tc AcB,assuming the move is feasible.
static int KPTpriceTcAB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move Tc AB, assuming the move is feasible.
static int KPTpriceTcBc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move TcBc, assuming the move is feasible.
static int KPTpriceTcB (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move Tc B, assuming the move is feasible.
static int KPTpriceTcAc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move TcAc, assuming the move is feasible.
static int KPTpriceTcA (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move Tc A, assuming the move is feasible.
static int KPTpriceBcTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BcTc, assuming the move is feasible.
static int KPTpriceBTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move BTc, assuming the move is feasible.
static int KPTpriceAcTc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move AcTc, assuming the move is feasible.
static int KPTpriceATc (const KPTMove_t *const cur_move, double *const move_val)
 This function prices the move ATc, assuming the move is feasible.
static int KPTmakeFullMove (KPTFullMove_t const *const full_move)
 Make a full move (in his whole depth ).
static int KPTSetBestMove (const unsigned int nc_id, KPTFullMove_t *const best_move, KPTFullMove_t *const base_move, const unsigned int depth)
 , given a node, compute the best possible move for it, taking into acount if the node has been added to the T set before or not, remember that the priority is to add, and then to substract, note that this change is not reflected in the tree of best moves, you have to do it outside this function. the best move and value is stored in the given field, the actual best move stored inside the node data is not changed.
static int KPTresetFlags (void)
 This function reset all flags to zero, we do this every time that we make a substancial improvement.
static int KPTStoreFullMove (const unsigned int nc_id, KPTFullMove_t const *const full_move)
 This function stores a move in a node.
static int KPTResetMove (KPTFullMove_t *move)
 reset a full move to all no-move
static int KPTupdateNeighMove (KPTFullMove_t *full_move)
 This function update the moves of all neighbours in a full move.
int KPtighten (int const n_nodes, int const n_edges, int const *const edges, double const *const external_weight, int const n2dominos, int const *const naset, int const *const nbset, int const *const ntset, int const nahandle, int const nbhandle, int **const aset, int **const bset, int **const tset, int const *const ahandle, int const *const bhandle, int **const new_naset, int **const new_nbset, int **const new_ntset, int *const new_nahandle, int *const new_nbhandle, int ***const new_aset, int ***const new_bset, int ***const new_tset, int **const new_ahandle, int **const new_bhandle, double *const violation)

Variables

static const char move_name [61][40]
static unsigned char KPT_inv_move [61]


Define Documentation

#define KPT_ENABLE   1
 

Definition at line 6 of file eg_2ptighten.c.

#define KPT_MAX_DEPTH   1U
 

Definition at line 19 of file eg_2ptighten.c.

#define KPT_MAX_DOM   512U
 

Definition at line 15 of file eg_2ptighten.c.

#define KPT_MAX_DOM_LOG   9U
 

Definition at line 16 of file eg_2ptighten.c.

#define KPT_MAX_NODE   131072U
 

Definition at line 17 of file eg_2ptighten.c.

#define KPT_MAX_NODE_LOG   17U
 

Definition at line 18 of file eg_2ptighten.c.

#define KPTgetEdge __e_it   )     ((EGuGraphEdge_t*)(__e_it->this))
 

Definition at line 331 of file eg_2ptighten.c.

#define KPTgetEdgeId __e_it   )     (KPTgetEdge(__e_it)->id)
 

Definition at line 333 of file eg_2ptighten.c.

#define KPTgetOtherEndId __n_id,
__e_it   )     (__n_id == KPTgetEdge(__e_it)->head->id ? KPTgetEdge(__e_it)->tail->id : KPTgetEdge(__e_it)->head->id)
 

Definition at line 332 of file eg_2ptighten.c.

#define KPTgoDeeper __depth   ) 
 

Value:

if(__depth+1<KPT_MAX_DEPTH){\
  /* now we call deeper moves */\
  KPTmakeMove(base_move->move+__depth,0);\
  for( e_it = all_nodes[nc_id]->edges->begin; e_it ; e_it=e_it->next){\
    /*if(KPTgetOtherEndId(nc_id,e_it)<nc_id)*/\
    KPTSetBestMove( KPTgetOtherEndId( nc_id, e_it), best_move, \
                    base_move, __depth + 1);}\
  /* undo the last move */\
  KPTmakeInvMove(base_move->move+__depth,0);\
  }
@ brief, call the best move on a deeper base

Definition at line 6562 of file eg_2ptighten.c.

#define KPTmakeMove __move,
__flags   )     __KPTmakeMove(__move,__flags,__LINE__,__FILE__,__func__)
 

given a node, and a move, make it

Definition at line 3402 of file eg_2ptighten.c.

#define KPTmakeMoveAHAHcBHcBH __id,
__val   )     KPTmakeMoveAHAHcBHBHc(__id,__val)
 

This function make the move AHcAH,assuming the move is feasible.

Definition at line 721 of file eg_2ptighten.c.

#define KPTmakeMoveAHcAH __id,
__val   )     KPTmakeMoveAHAHc(__id,__val)
 

This function make the move AHcAH,assuming the move is feasible.

Definition at line 686 of file eg_2ptighten.c.

#define KPTmakeMoveAHcAHBHBHc __id,
__val   )     KPTmakeMoveAHAHcBHBHc(__id,__val)
 

This function make the move AHcAH,assuming the move is feasible.

Definition at line 726 of file eg_2ptighten.c.

#define KPTmakeMoveAHcAHBHcBH __id,
__val   )     KPTmakeMoveAHAHcBHBHc(__id,__val)
 

This function make the move AHcAH,assuming the move is feasible.

Definition at line 731 of file eg_2ptighten.c.

#define KPTmakeMoveBHcBH __id,
__val   )     KPTmakeMoveBHBHc(__id,__val)
 

This function make the move BHcBH,assuming the move is feasible.

Definition at line 657 of file eg_2ptighten.c.

#define KPTMinImprovement   (-1e-7)
 

Definition at line 166 of file eg_2ptighten.c.

#define KPTmoveAAc __n_id,
__dom   ) 
 

Value:

{\
  graphData.n_A[1][__dom]--;\
  graphData.n_A[0][__dom]++;\
  EGbitUnset(nodeData[__n_id].Ia,__dom);\
  nodeData[__n_id].n_in_A--;}

Definition at line 606 of file eg_2ptighten.c.

#define KPTmoveAcA __n_id,
__dom   ) 
 

Value:

{\
  graphData.n_A[0][__dom]--;\
  graphData.n_A[1][__dom]++;\
  EGbitSet(nodeData[__n_id].Ia,__dom);\
  nodeData[__n_id].n_in_A++;}

Definition at line 618 of file eg_2ptighten.c.

#define KPTmoveAdB __n_id,
__dom   ) 
 

Value:

{\
  if(EGbitTest(graphData.Kdom,__dom)){\
  graphData.n_AdB[EGbitTest(nodeData[__n_id].Iadb,__dom)?1U:0U][__dom]--;\
  graphData.n_AdB[EGbitTest(nodeData[__n_id].Iadb,__dom)?0U:1U][__dom]++;\
  EGbitTest(nodeData[__n_id].Iadb,__dom) ? \
  EGbitUnset(nodeData[__n_id].Iadb,__dom): \
  EGbitSet(nodeData[__n_id].Iadb,__dom);}}

Definition at line 598 of file eg_2ptighten.c.

#define KPTmoveAH __n_id   ) 
 

Value:

{\
  graphData.n_AH[nodeData[__n_id].in_AH]--;\
  nodeData[__n_id].in_AH++;\
  graphData.n_AH[nodeData[__n_id].in_AH]++;}

Definition at line 593 of file eg_2ptighten.c.

#define KPTmoveBBc __n_id,
__dom   ) 
 

Value:

{\
  graphData.n_B[1][__dom]--;\
  graphData.n_B[0][__dom]++;\
  EGbitUnset(nodeData[__n_id].Ib,__dom);\
  nodeData[__n_id].n_in_B--;}

Definition at line 612 of file eg_2ptighten.c.

#define KPTmoveBcB __n_id,
__dom   ) 
 

Value:

{\
  graphData.n_B[0][__dom]--;\
  graphData.n_B[1][__dom]++;\
  EGbitSet(nodeData[__n_id].Ib,__dom);\
  nodeData[__n_id].n_in_B++;}

Definition at line 624 of file eg_2ptighten.c.

#define KPTmoveBH __n_id   ) 
 

Value:

{\
  graphData.n_BH[nodeData[__n_id].in_BH]--;\
  nodeData[__n_id].in_BH++;\
  graphData.n_BH[nodeData[__n_id].in_BH]++;}

Definition at line 588 of file eg_2ptighten.c.

#define KPTNdata __this   )     ((KPTNdata_t*)(__this))
 

Definition at line 334 of file eg_2ptighten.c.

#define KPTpriceAHAHcBHcBH __id,
__val   )     KPTpriceAHAHcBHBHc(__id,__val)
 

This function prices the move AHcAH,assuming the move is feasible.

Definition at line 4332 of file eg_2ptighten.c.

#define KPTpriceAHcAH __id,
__val   )     KPTpriceAHAHc(__id,__val)
 

This function prices the move AHcAH,assuming the move is feasible.

Definition at line 4298 of file eg_2ptighten.c.

#define KPTpriceAHcAHBHBHc __id,
__val   )     KPTpriceAHAHcBHBHc(__id,__val)
 

This function prices the move AHcAH,assuming the move is feasible.

Definition at line 4337 of file eg_2ptighten.c.

#define KPTpriceAHcAHBHcBH __id,
__val   )     KPTpriceAHAHcBHBHc(__id,__val)
 

This function prices the move AHcAH,assuming the move is feasible.

Definition at line 4342 of file eg_2ptighten.c.

#define KPTpriceBHcBH __move,
__val   )     KPTpriceBHBHc(__move,__val)
 

This function prices the move BHcBH,assuming the move is feasible.

Definition at line 4270 of file eg_2ptighten.c.

#define KPTupdateMove __cmove,
__bmove   )     __KPTupdateMove(__cmove,__bmove)
 

, check if we should update a move, if so, do the update

Definition at line 4189 of file eg_2ptighten.c.


Typedef Documentation

typedef static EGuGraphEdge_t** all_edges [static]
 

Definition at line 156 of file eg_2ptighten.c.

typedef static EGuGraphNode_t** all_nodes [static]
 

Definition at line 155 of file eg_2ptighten.c.

typedef static KPTEdata_t* edgeData = 0 [static]
 

Definition at line 152 of file eg_2ptighten.c.

typedef static EGuGraph_t* G = 0 [static]
 

Definition at line 154 of file eg_2ptighten.c.

typedef static KPTGdata_t graphData [static]
 

Definition at line 153 of file eg_2ptighten.c.

typedef struct KPTNdata_t KPTNdata_t
 

Definition at line 146 of file eg_2ptighten.c.

typedef static EGbitset_t node_update[EGbitsetSize(KPT_MAX_NODE)] [static]
 

Definition at line 159 of file eg_2ptighten.c.

typedef static KPTNdata_t* nodeData = 0 [static]
 

Definition at line 151 of file eg_2ptighten.c.

typedef static EGbbtree_t* tree [static]
 

Definition at line 158 of file eg_2ptighten.c.

typedef static double const* weight [static]
 

Definition at line 157 of file eg_2ptighten.c.


Enumeration Type Documentation

enum move
 

Enumerator:
KPT_Tc_AB 
KPT_Tc_AcB 
KPT_Tc_ABc 
KPT_Tc_AcBc 
KPT_Tc_A 
KPT_Tc_B 
KPT_Tc_Ac 
KPT_Tc_Bc 
KPT_AHc_AH 
KPT_BHc_BH 
KPT_AHc_AH_BHc_BH 
KPT_Ac_A 
KPT_Bc_B 
KPT_A_Ac 
KPT_B_Bc 
KPT_A_Ac_B_Bc 
KPT_A_Ac_Bc_B 
KPT_Ac_A_B_Bc 
KPT_Ac_A_Bc_B 
KPT_Ac_A_flipAH 
KPT_Bc_B_flipBH 
KPT_A_Ac_flipAH 
KPT_B_Bc_flipBH 
KPT_A_Ac_B_Bc_flipAH 
KPT_A_Ac_Bc_B_flipAH 
KPT_Ac_A_B_Bc_flipAH 
KPT_Ac_A_Bc_B_flipAH 
KPT_A_Ac_B_Bc_flipBH 
KPT_A_Ac_Bc_B_flipBH 
KPT_Ac_A_B_Bc_flipBH 
KPT_Ac_A_Bc_B_flipBH 
KPT_A_Ac_B_Bc_flipAHBH 
KPT_A_Ac_Bc_B_flipAHBH 
KPT_Ac_A_B_Bc_flipAHBH 
KPT_Ac_A_Bc_B_flipAHBH 
KPT_AH_AHc_BHc_BH 
KPT_AHc_AH_BH_BHc 
KPT_AcBc_Tc 
KPT_AcB_Tc 
KPT_ABc_Tc 
KPT_AB_Tc 
KPT_A_Tc 
KPT_B_Tc 
KPT_Ac_Tc 
KPT_Bc_Tc 
KPT_AH_AHc 
KPT_BH_BHc 
KPT_AH_AHc_BH_BHc 
KPT_no_move 

Definition at line 169 of file eg_2ptighten.c.


Function Documentation

static int __KPTmakeMove KPTMove_t const *const   move,
const unsigned int  update_flags,
const int  line,
const char *  file,
const char *  function
[static]
 

Definition at line 3403 of file eg_2ptighten.c.

static int __KPTupdateMove const KPTFullMove_t *const   cur_move,
KPTFullMove_t *const   best_move
[static]
 

Definition at line 4191 of file eg_2ptighten.c.

static int EGdpTightNdataCompare const void *  N1,
const void *  N2
[static]
 

This function compare two node data information.

Definition at line 537 of file eg_2ptighten.c.

int KPtighten int const   n_nodes,
int const   n_edges,
int const *const   edges,
double const *const   external_weight,
int const   n2dominos,
int const *const   naset,
int const *const   nbset,
int const *const   ntset,
int const   nahandle,
int const   nbhandle,
int **const   aset,
int **const   bset,
int **const   tset,
int const *const   ahandle,
int const *const   bhandle,
int **const   new_naset,
int **const   new_nbset,
int **const   new_ntset,
int *const   new_nahandle,
int *const   new_nbhandle,
int ***const   new_aset,
int ***const   new_bset,
int ***const   new_tset,
int **const   new_ahandle,
int **const   new_bhandle,
double *const   violation
 

Definition at line 7414 of file eg_2ptighten.c.

static int KPTisFullMoveFeasible KPTFullMove_t const *const   full_move  )  [inline, static]
 

check if a full move is feasible

Definition at line 4160 of file eg_2ptighten.c.

static int KPTisMoveFeasible KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

given a node, and a move, check if it is feasible, if update_flags is set to one, then it will check the constrains imposed by them.

Definition at line 3737 of file eg_2ptighten.c.

static int KPTmakeFullMove KPTFullMove_t const *const   full_move  )  [inline, static]
 

Make a full move (in his whole depth ).

Definition at line 6551 of file eg_2ptighten.c.

static int KPTmakeInvMove KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

given a node, and a move, make the inverse move

Definition at line 3571 of file eg_2ptighten.c.

static int KPTmakeMoveAAc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AAc, assuming the move is feasible.

Definition at line 1240 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBBc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBBc, assuming the move is feasible.

Definition at line 1569 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBBcflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBBcflipAH, assuming the move is feasible.

Definition at line 1871 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBBcflipAHBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBBcflipAHBH, assuming the move is feasible.

Definition at line 2467 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBBcflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBBcflipBH, assuming the move is feasible.

Definition at line 2171 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBcB const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBcB, assuming the move is feasible.

Definition at line 1415 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBcBflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBcBflipAH, assuming the move is feasible.

Definition at line 1721 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBcBflipAHBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBcBflipAHBH, assuming the move is feasible.

Definition at line 2321 of file eg_2ptighten.c.

static int KPTmakeMoveAAcBcBflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AAcBcBflipBH, assuming the move is feasible.

Definition at line 2021 of file eg_2ptighten.c.

static int KPTmakeMoveAAcflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AAcflipAH, assuming the move is feasible.

Definition at line 1043 of file eg_2ptighten.c.

static int KPTmakeMoveABcTc const KPTMove_t *const   cur_move  )  [static]
 

This function make the move ABcTc, assuming the move is feasible.

Definition at line 805 of file eg_2ptighten.c.

static int KPTmakeMoveABTc const KPTMove_t *const   cur_move  )  [static]
 

This function makes the move ABTc, assuming the move is feasible.

Definition at line 2540 of file eg_2ptighten.c.

static int KPTmakeMoveAcA const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcA, assuming the move is feasible.

Definition at line 1288 of file eg_2ptighten.c.

static int KPTmakeMoveAcABBc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcABBc, assuming the move is feasible.

Definition at line 1338 of file eg_2ptighten.c.

static int KPTmakeMoveAcABBcflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcABBcflipAH, assuming the move is feasible.

Definition at line 1646 of file eg_2ptighten.c.

static int KPTmakeMoveAcABBcflipAHBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcABBcflipAHBH, assuming the move is feasible.

Definition at line 2248 of file eg_2ptighten.c.

static int KPTmakeMoveAcABBcflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcABBcflipBH, assuming the move is feasible.

Definition at line 1946 of file eg_2ptighten.c.

static int KPTmakeMoveAcABcB const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AcABcB, assuming the move is feasible.

Definition at line 1492 of file eg_2ptighten.c.

static int KPTmakeMoveAcABcBflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AcABcBflipAH, assuming the move is feasible.

Definition at line 1796 of file eg_2ptighten.c.

static int KPTmakeMoveAcABcBflipAHBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AcABcBflipAHBH, assuming the move is feasible.

Definition at line 2394 of file eg_2ptighten.c.

static int KPTmakeMoveAcABcBflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makeMoves the move AcABcBflipBH, assuming the move is feasible.

Definition at line 2096 of file eg_2ptighten.c.

static int KPTmakeMoveAcAflipAH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AcAflipAH, assuming the move is feasible.

Definition at line 1092 of file eg_2ptighten.c.

static int KPTmakeMoveAcBcTc const KPTMove_t *const   cur_move  )  [static]
 

This function make the move AcBcTc, assuming the move is feasible.

Definition at line 874 of file eg_2ptighten.c.

static int KPTmakeMoveAcBTc const KPTMove_t *const   cur_move  )  [static]
 

This function make the move AcBTc, assuming the move is feasible.

Definition at line 736 of file eg_2ptighten.c.

static int KPTmakeMoveAcTc KPTMove_t const *const   move  )  [static]
 

Perform a KPT_AcTc move.

Definition at line 3184 of file eg_2ptighten.c.

static int KPTmakeMoveAHAHc KPTMove_t const *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AHAHc,assuming the move is feasible.

Definition at line 662 of file eg_2ptighten.c.

static int KPTmakeMoveAHAHcBHBHc KPTMove_t const *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move AHAHcBHBHc,assuming the move is feasible.

Definition at line 692 of file eg_2ptighten.c.

static int KPTmakeMoveATc KPTMove_t const *const   move  )  [static]
 

Perform a KPT_ATc move.

Definition at line 3130 of file eg_2ptighten.c.

static int KPTmakeMoveBBc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move BBc, assuming the move is feasible.

Definition at line 1141 of file eg_2ptighten.c.

static int KPTmakeMoveBBcflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move BBcflipBH, assuming the move is feasible.

Definition at line 943 of file eg_2ptighten.c.

static int KPTmakeMoveBcB const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move BcB, assuming the move is feasible.

Definition at line 1190 of file eg_2ptighten.c.

static int KPTmakeMoveBcBflipBH const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move BcBflipBH, assuming the move is feasible.

Definition at line 993 of file eg_2ptighten.c.

static int KPTmakeMoveBcTc KPTMove_t const *const   move  )  [static]
 

Perform a KPT_BcTc move.

Definition at line 3289 of file eg_2ptighten.c.

static int KPTmakeMoveBHBHc KPTMove_t const *const   cur_move,
const unsigned int  update_flags
[static]
 

This function make the move BHBHc,assuming the move is feasible.

Definition at line 633 of file eg_2ptighten.c.

static int KPTmakeMoveBTc KPTMove_t const *const   move  )  [static]
 

Perform a KPT_BTc move.

Definition at line 3236 of file eg_2ptighten.c.

static int KPTmakeMoveTcA KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

Perform a KPT_TcA move.

Definition at line 2908 of file eg_2ptighten.c.

static int KPTmakeMoveTcAB const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makes the move Tc AB, assuming the move is feasible.

Definition at line 2832 of file eg_2ptighten.c.

static int KPTmakeMoveTcABc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makes the move Tc ABc,assuming the move is feasible.

Definition at line 2684 of file eg_2ptighten.c.

static int KPTmakeMoveTcAc KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

Perform a KPT_TcAc move.

Definition at line 2965 of file eg_2ptighten.c.

static int KPTmakeMoveTcAcB const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makes the move Tc AcB,assuming the move is feasible.

Definition at line 2758 of file eg_2ptighten.c.

static int KPTmakeMoveTcAcBc const KPTMove_t *const   cur_move,
const unsigned int  update_flags
[static]
 

This function makes the move TcAcBc,assuming the move is feasible.

Definition at line 2612 of file eg_2ptighten.c.

static int KPTmakeMoveTcB KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

Perform a KPT_TcB move.

Definition at line 3020 of file eg_2ptighten.c.

static int KPTmakeMoveTcBc KPTMove_t const *const   move,
const unsigned int  update_flags
[static]
 

Perform a KPT_TcBc move.

Definition at line 3076 of file eg_2ptighten.c.

static int KPTpriceAAc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAc, assuming the move is feasible.

Definition at line 4787 of file eg_2ptighten.c.

static int KPTpriceAAcBBc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBBc, assuming the move is feasible.

Definition at line 5065 of file eg_2ptighten.c.

static int KPTpriceAAcBBcAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBBcAH, assuming the move is feasible.

Definition at line 5585 of file eg_2ptighten.c.

static int KPTpriceAAcBBcAHBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBBcAHBH, assuming the move is feasible.

Definition at line 5827 of file eg_2ptighten.c.

static int KPTpriceAAcBBcBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBBcBH, assuming the move is feasible.

Definition at line 5325 of file eg_2ptighten.c.

static int KPTpriceAAcBcB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBcB, assuming the move is feasible.

Definition at line 4935 of file eg_2ptighten.c.

static int KPTpriceAAcBcBAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBcBAH, assuming the move is feasible.

Definition at line 5455 of file eg_2ptighten.c.

static int KPTpriceAAcBcBAHBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBcBAHBH, assuming the move is feasible.

Definition at line 5709 of file eg_2ptighten.c.

static int KPTpriceAAcBcBBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcBcBBH, assuming the move is feasible.

Definition at line 5195 of file eg_2ptighten.c.

static int KPTpriceAAcflipAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AAcflipAH, assuming the move is feasible.

Definition at line 4618 of file eg_2ptighten.c.

static int KPTpriceABcTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move ABcTc, assuming the move is feasible.

Definition at line 4408 of file eg_2ptighten.c.

static int KPTpriceABTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move ABTc, assuming the move is feasible.

Definition at line 5886 of file eg_2ptighten.c.

static int KPTpriceAcA const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcA, assuming the move is feasible.

Definition at line 4828 of file eg_2ptighten.c.

static int KPTpriceAcABBc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABBc, assuming the move is feasible.

Definition at line 4870 of file eg_2ptighten.c.

static int KPTpriceAcABBcAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABBcAH, assuming the move is feasible.

Definition at line 5390 of file eg_2ptighten.c.

static int KPTpriceAcABBcAHBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABBcAHBH, assuming the move is feasible.

Definition at line 5650 of file eg_2ptighten.c.

static int KPTpriceAcABBcBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABBcBH, assuming the move is feasible.

Definition at line 5130 of file eg_2ptighten.c.

static int KPTpriceAcABcB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABcB, assuming the move is feasible.

Definition at line 5000 of file eg_2ptighten.c.

static int KPTpriceAcABcBAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABcBAH, assuming the move is feasible.

Definition at line 5520 of file eg_2ptighten.c.

static int KPTpriceAcABcBAHBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABcBAHBH, assuming the move is feasible.

Definition at line 5768 of file eg_2ptighten.c.

static int KPTpriceAcABcBBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcABcBBH, assuming the move is feasible.

Definition at line 5260 of file eg_2ptighten.c.

static int KPTpriceAcAflipAH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcAflipAH, assuming the move is feasible.

Definition at line 4661 of file eg_2ptighten.c.

static int KPTpriceAcBcTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcBTc, assuming the move is feasible.

Definition at line 4469 of file eg_2ptighten.c.

static int KPTpriceAcBTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcBTc, assuming the move is feasible.

Definition at line 4347 of file eg_2ptighten.c.

static int KPTpriceAcTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AcTc, assuming the move is feasible.

Definition at line 6461 of file eg_2ptighten.c.

static int KPTpriceAHAHc KPTMove_t const *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AHAHc,assuming the move is feasible.

Definition at line 4275 of file eg_2ptighten.c.

static int KPTpriceAHAHcBHBHc KPTMove_t const *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move AHAHcBHBHc,assuming the move is feasible.

Definition at line 4304 of file eg_2ptighten.c.

static int KPTpriceATc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move ATc, assuming the move is feasible.

Definition at line 6506 of file eg_2ptighten.c.

static int KPTpriceBBc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BBc, assuming the move is feasible.

Definition at line 4704 of file eg_2ptighten.c.

static int KPTpriceBBcflipBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BBcflipBH, assuming the move is feasible.

Definition at line 4531 of file eg_2ptighten.c.

static int KPTpriceBcB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BcB, assuming the move is feasible.

Definition at line 4745 of file eg_2ptighten.c.

static int KPTpriceBcBflipBH const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BcBflipBH, assuming the move is feasible.

Definition at line 4574 of file eg_2ptighten.c.

static int KPTpriceBcTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BcTc, assuming the move is feasible.

Definition at line 6371 of file eg_2ptighten.c.

static int KPTpriceBHBHc KPTMove_t const *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BHBHc,assuming the move is feasible.

Definition at line 4247 of file eg_2ptighten.c.

static int KPTpriceBTc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move BTc, assuming the move is feasible.

Definition at line 6416 of file eg_2ptighten.c.

static void KPTpriceConstraint double *  l_violation  )  [inline, static]
 

Definition at line 475 of file eg_2ptighten.c.

static int KPTpriceTcA const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move Tc A, assuming the move is feasible.

Definition at line 6326 of file eg_2ptighten.c.

static int KPTpriceTcAB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move Tc AB, assuming the move is feasible.

Definition at line 6130 of file eg_2ptighten.c.

static int KPTpriceTcABc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move Tc ABc,assuming the move is feasible.

Definition at line 6008 of file eg_2ptighten.c.

static int KPTpriceTcAc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move TcAc, assuming the move is feasible.

Definition at line 6281 of file eg_2ptighten.c.

static int KPTpriceTcAcB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move Tc AcB,assuming the move is feasible.

Definition at line 6069 of file eg_2ptighten.c.

static int KPTpriceTcAcBc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move TcAcBc,assuming the move is feasible.

Definition at line 5947 of file eg_2ptighten.c.

static int KPTpriceTcB const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move Tc B, assuming the move is feasible.

Definition at line 6236 of file eg_2ptighten.c.

static int KPTpriceTcBc const KPTMove_t *const   cur_move,
double *const   move_val
[inline, static]
 

This function prices the move TcBc, assuming the move is feasible.

Definition at line 6191 of file eg_2ptighten.c.

static int KPTresetFlags void   )  [inline, static]
 

This function reset all flags to zero, we do this every time that we make a substancial improvement.

Definition at line 7277 of file eg_2ptighten.c.

static int KPTResetMove KPTFullMove_t move  )  [inline, static]
 

reset a full move to all no-move

Definition at line 7320 of file eg_2ptighten.c.

static int KPTSetBestMove const unsigned int  nc_id,
KPTFullMove_t *const   best_move,
KPTFullMove_t *const   base_move,
const unsigned int  depth
[static]
 

, given a node, compute the best possible move for it, taking into acount if the node has been added to the T set before or not, remember that the priority is to add, and then to substract, note that this change is not reflected in the tree of best moves, you have to do it outside this function. the best move and value is stored in the given field, the actual best move stored inside the node data is not changed.

Definition at line 6582 of file eg_2ptighten.c.

static int KPTStoreFullMove const unsigned int  nc_id,
KPTFullMove_t const *const   full_move
[inline, static]
 

This function stores a move in a node.

Definition at line 7298 of file eg_2ptighten.c.

static int KPTTestEdges void   )  [static]
 

This function check that the edges got the wright values in their data.

Definition at line 3341 of file eg_2ptighten.c.

static int KPTupdateNeighMove KPTFullMove_t full_move  )  [inline, static]
 

This function update the moves of all neighbours in a full move.

Definition at line 7330 of file eg_2ptighten.c.


Variable Documentation

unsigned char KPT_inv_move[61] [static]
 

Initial value:

 {
  [KPT_A_Tc] = KPT_Tc_A,
  [KPT_B_Tc] = KPT_Tc_B,
  [KPT_Ac_Tc] = KPT_Tc_Ac,
  [KPT_Bc_Tc] = KPT_Tc_Bc,
  [KPT_Tc_A] = KPT_A_Tc,
  [KPT_Tc_B] = KPT_B_Tc,
  [KPT_Tc_Ac] = KPT_Ac_Tc,
  [KPT_Tc_Bc] = KPT_Bc_Tc,
  [KPT_Tc_AB] = KPT_AB_Tc,
  [KPT_Tc_AcB] = KPT_AcB_Tc,
  [KPT_Tc_ABc] = KPT_ABc_Tc,
  [KPT_Tc_AcBc] = KPT_AcBc_Tc,
  [KPT_AHc_AH] = KPT_AH_AHc,
  [KPT_BHc_BH] = KPT_BH_BHc,
  [KPT_AHc_AH_BHc_BH] = KPT_AH_AHc_BH_BHc,
  [KPT_Ac_A] = KPT_A_Ac,
  [KPT_Bc_B] = KPT_B_Bc,
  [KPT_A_Ac] = KPT_Ac_A,
  [KPT_B_Bc] = KPT_Bc_B,
  [KPT_Ac_A_Bc_B] = KPT_A_Ac_B_Bc,
  [KPT_A_Ac_B_Bc] = KPT_Ac_A_Bc_B,
  [KPT_A_Ac_Bc_B] = KPT_Ac_A_B_Bc,
  [KPT_Ac_A_B_Bc] = KPT_A_Ac_Bc_B,
  [KPT_Ac_A_Bc_B_flipBH] = KPT_A_Ac_B_Bc_flipBH,
  [KPT_A_Ac_Bc_B_flipBH] = KPT_Ac_A_B_Bc_flipBH,
  [KPT_Ac_A_B_Bc_flipBH] = KPT_A_Ac_Bc_B_flipBH,
  [KPT_A_Ac_B_Bc_flipBH] = KPT_Ac_A_Bc_B_flipBH,
  [KPT_Ac_A_Bc_B_flipAH] = KPT_A_Ac_B_Bc_flipAH,
  [KPT_A_Ac_Bc_B_flipAH] = KPT_Ac_A_B_Bc_flipAH,
  [KPT_Ac_A_B_Bc_flipAH] = KPT_A_Ac_Bc_B_flipAH,
  [KPT_A_Ac_B_Bc_flipAH] = KPT_Ac_A_Bc_B_flipAH,
  [KPT_Ac_A_Bc_B_flipAHBH] = KPT_A_Ac_B_Bc_flipAHBH,
  [KPT_A_Ac_Bc_B_flipAHBH] = KPT_Ac_A_B_Bc_flipAHBH,
  [KPT_Ac_A_B_Bc_flipAHBH] = KPT_A_Ac_Bc_B_flipAHBH,
  [KPT_A_Ac_B_Bc_flipAHBH] = KPT_Ac_A_Bc_B_flipAHBH,
  [KPT_AH_AHc_BHc_BH] = KPT_AHc_AH_BH_BHc,
  [KPT_AHc_AH_BH_BHc] = KPT_AH_AHc_BHc_BH,
  [KPT_Ac_A_flipAH] = KPT_A_Ac_flipAH,
  [KPT_Bc_B_flipBH] = KPT_B_Bc_flipBH,
  [KPT_A_Ac_flipAH] = KPT_Ac_A_flipAH,
  [KPT_B_Bc_flipBH] = KPT_Bc_B_flipBH,
  [KPT_AB_Tc] = KPT_Tc_AB,
  [KPT_AcB_Tc] = KPT_Tc_AcB,
  [KPT_ABc_Tc] = KPT_Tc_ABc,
  [KPT_AcBc_Tc] = KPT_Tc_AcBc,
  [KPT_AHc_AH] = KPT_AH_AHc,
  [KPT_BH_BHc] = KPT_BHc_BH,
  [KPT_AH_AHc_BH_BHc] = KPT_AHc_AH_BHc_BH,
  [KPT_no_move] = KPT_no_move
}

Definition at line 277 of file eg_2ptighten.c.

const char move_name[61][40] [static]
 

Initial value:

 {
  [KPT_A_Tc] = "KPT_A_Tc",
  [KPT_B_Tc] = "KPT_B_Tc",
  [KPT_Ac_Tc] = "KPT_Ac_Tc",
  [KPT_Bc_Tc] = "KPT_Bc_Tc",
  [KPT_Tc_A] = "KPT_Tc_A",
  [KPT_Tc_B] = "KPT_Tc_B",
  [KPT_Tc_Ac] = "KPT_Tc_Ac",
  [KPT_Tc_Bc] = "KPT_Tc_Bc",
  [KPT_Tc_AB] = "KPT_Tc_AB",
  [KPT_Tc_AcB] = "KPT_Tc_AcB",
  [KPT_Tc_ABc] = "KPT_Tc_ABc",
  [KPT_Tc_AcBc] = "KPT_Tc_AcBc",
  [KPT_AHc_AH] = "KPT_AHc_AH",
  [KPT_BHc_BH] = "KPT_BHc_BH",
  [KPT_AHc_AH_BHc_BH] = "KPT_AHc_AH_BHc_BH",
  [KPT_Ac_A] = "KPT_Ac_A",
  [KPT_Bc_B] = "KPT_Bc_B",
  [KPT_A_Ac] = "KPT_A_Ac",
  [KPT_B_Bc] = "KPT_B_Bc",
  [KPT_Ac_A_Bc_B] = "KPT_Ac_A_Bc_B",
  [KPT_A_Ac_Bc_B] = "KPT_A_Ac_Bc_B",
  [KPT_Ac_A_B_Bc] = "KPT_Ac_A_B_Bc",
  [KPT_A_Ac_B_Bc] = "KPT_A_Ac_B_Bc",
  [KPT_Ac_A_Bc_B_flipAH] = "KPT_Ac_A_Bc_B_flipAH",
  [KPT_A_Ac_Bc_B_flipAH] = "KPT_A_Ac_Bc_B_flipAH",
  [KPT_Ac_A_B_Bc_flipAH] = "KPT_Ac_A_B_Bc_flipAH",
  [KPT_A_Ac_B_Bc_flipAH] = "KPT_A_Ac_B_Bc_flipAH",
  [KPT_Ac_A_Bc_B_flipBH] = "KPT_Ac_A_Bc_B_flipBH",
  [KPT_A_Ac_Bc_B_flipBH] = "KPT_A_Ac_Bc_B_flipBH",
  [KPT_Ac_A_B_Bc_flipBH] = "KPT_Ac_A_B_Bc_flipBH",
  [KPT_A_Ac_B_Bc_flipBH] = "KPT_A_Ac_B_Bc_flipBH",
  [KPT_Ac_A_Bc_B_flipAHBH] = "KPT_Ac_A_Bc_B_flipAHBH",
  [KPT_A_Ac_Bc_B_flipAHBH] = "KPT_A_Ac_Bc_B_flipAHBH",
  [KPT_Ac_A_B_Bc_flipAHBH] = "KPT_Ac_A_B_Bc_flipAHBH",
  [KPT_A_Ac_B_Bc_flipAHBH] = "KPT_A_Ac_B_Bc_flipAHBH",
  [KPT_AH_AHc_BHc_BH] = "KPT_AH_AHc_BHc_BH",
  [KPT_AHc_AH_BH_BHc] = "KPT_AHc_AH_BH_BHc",
  [KPT_Ac_A_flipAH] = "KPT_Ac_A_flipAH",
  [KPT_Bc_B_flipBH] = "KPT_Bc_B_flipBH",
  [KPT_A_Ac_flipAH] = "KPT_A_Ac_flipAH",
  [KPT_B_Bc_flipBH] = "KPT_B_Bc_flipBH",
  [KPT_AB_Tc] = "KPT_AB_Tc",
  [KPT_AcB_Tc] = "KPT_AcB_Tc",
  [KPT_ABc_Tc] = "KPT_ABc_Tc",
  [KPT_AcBc_Tc] = "KPT_AcBc_Tc",
  [KPT_AHc_AH] = "KPT_AHc_AH",
  [KPT_BH_BHc] = "KPT_BH_BHc",
  [KPT_AH_AHc_BH_BHc] = "KPT_AH_AHc_BH_BHc",
  [KPT_no_move] = "KPT_no_move"
}

Definition at line 225 of file eg_2ptighten.c.


Generated on Thu Oct 20 14:58:48 2005 for DominoParitySeparator by  doxygen 1.4.5