- determine the next move
- add the move into tabu list with a specified tabu iteration count in order to avoid cycling.
- aspiration strategy allowed if a move, despite in tabu, generates a better result than ever been.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(has("win32") || has("win95") || has("win64") || has("win16")) | |
let g:vimrc_iswindows=1 | |
let g:iswindows=1 | |
else | |
let g:vimrc_iswindows=0 | |
let g:iswindows=0 | |
endif | |
autocmd BufEnter * lcd %:p:h | |
set nocompatible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Partition(int a[], int left, int right) | |
{ | |
int piv = a[left]; | |
int l = left, r = right + 1; | |
do | |
{ | |
do | |
{ | |
++l; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct built_in_type_tag{}; | |
struct integer_type_tag : public built_in_type_tag {}; | |
struct user_defined_type_tag{}; | |
template<typename TypeT> | |
struct type_traits | |
{ | |
typedef typename TypeT::type_category type_category; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
class NewHandlerSupport | |
{ | |
public: | |
static std::new_handler set_new_handler(std::new_handler p) throw(); | |
static void* operator new(std::size_t size) throw(std::bad_alloc); | |
... | |
private: | |
static std::new_handler currentHandler; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using std::basic_string; | |
using std::char_traits; | |
using std::string; | |
using std::toupper;; | |
struct ichar_traits : char_traits<char> | |
{ | |
static bool eq(const char& _Left, const char& _Right) | |
{ | |
return toupper(_Left) == toupper(_Right); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
#include <cstdio> | |
#define PARENT(x) (((x) - 1) >> 1) | |
#define LEFTCHILD(x) (((x) << 1) + 1) | |
#define RIGHTCHILD(x) (((x) + 1) << 1) | |
template<typename T> | |
class CPriQueue | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NLComponent | |
{ | |
public: | |
virtual NLComponent* clone() const = 0; | |
}; | |
class TextBlocks : public NLComponent | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only a single object allowed | |
struct PrintJob | |
{ | |
PrintJob(const string& name) : Name(name) | |
{ | |
} | |
string Name; | |
}; | |
class Printer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// C# | |
class SeqTest | |
{ | |
string _inClassName; | |
public string InClassName | |
{ | |
get {return _inClassName;} | |
set {_inClassName = value;} |
OlderNewer