state.h
来自「八皇后的A*算法 利用矩阵的行列变换」· C头文件 代码 · 共 34 行
H
34 行
// state.h: interface for the state class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_STATE_H__F3B52883_134B_4D07_9716_E82D1F097D27__INCLUDED_)
#define AFX_STATE_H__F3B52883_134B_4D07_9716_E82D1F097D27__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define N 8
class state
{
public:
state();
virtual ~state();
int x[N];
void show();
void compute_g(); //同时修改f
void inc_h();
int get_f();
void trans(int i, int j);
void operator =(state p);
bool operator ==(state p);
private:
int f;
int g;
int h;
};
#endif // !defined(AFX_STATE_H__F3B52883_134B_4D07_9716_E82D1F097D27__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?