资源简介
问题描述:对中国地图进行着色,两个共同边界的省份染不同的颜色,当可以选择7、6、5、4种不同的颜色的情况下,由程序自动进行处理,给出具体的染色方案。
基本要求:
(1)建立以省为节点,以是否相邻为边的一个无向图;
(2)从颜色模板中选取一个颜色赋值给每个节点;
(3) 相邻节点颜色不能相同;
测试数据:学生可以自己选取颜色模板做为测试数据;分别需要测试7、6、5、4种不同的颜色。
提高要求:当用4种颜色染色时,给出不同的染色方案,着色是彩色图

代码片段和文件信息
// ChinaMap.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “ChinaMap.h“
#include “ChinaMapDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChinaMapApp
BEGIN_MESSAGE_MAP(CChinaMapApp CWinApp)
//{{AFX_MSG_MAP(CChinaMapApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChinaMapApp construction
CChinaMapApp::CChinaMapApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CChinaMapApp object
CChinaMapApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CChinaMapApp initialization
BOOL CChinaMapApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CChinaMapDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1178848 2012-03-17 19:59 课设\ChinaMap\ChinaMap.aps
文件 151422 2012-03-17 19:59 课设\ChinaMap\res\cc.ico
文件 1078 2012-03-17 19:59 课设\ChinaMap\res\ChinaMap.ico
文件 400 2012-03-17 19:59 课设\ChinaMap\res\ChinaMap.rc2
文件 766 2012-03-17 19:59 课设\ChinaMap\res\icon1.ico
文件 990054 2012-03-17 19:59 课设\ChinaMap\res\中国地图.bmp
文件 5538816 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.bsc
文件 240960 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.ilk
文件 12930 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.obj
文件 410624 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.pdb
文件 0 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.sbr
文件 0 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMapDlg.sbr
文件 10760 2012-03-17 19:59 课设\ChinaMap\Debug\ColorDlg.obj
文件 0 2012-03-17 19:59 课设\ChinaMap\Debug\ColorDlg.sbr
文件 105507 2012-03-17 19:59 课设\ChinaMap\Debug\StdAfx.obj
文件 1175646 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.exe
文件 263168 2012-03-17 19:59 课设\ChinaMap\Debug\vc60.idb
文件 462848 2012-03-17 19:59 课设\ChinaMap\Debug\vc60.pdb
文件 990054 2012-03-17 19:59 课设\ChinaMap\Debug\中国地图.bmp
文件 41299 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMapDlg.obj
文件 14340 2012-03-17 19:59 课设\ChinaMap\Debug\color4.txt
文件 14340 2012-03-17 19:59 课设\ChinaMap\Debug\color5.txt
文件 14340 2012-03-17 19:59 课设\ChinaMap\Debug\color6.txt
文件 14340 2012-03-17 19:59 课设\ChinaMap\Debug\color7.txt
文件 7104144 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.pch
文件 1144840 2012-03-17 19:59 课设\ChinaMap\Debug\ChinaMap.res
文件 1374935 2012-03-17 19:59 课设\ChinaMap\Debug\StdAfx.sbr
文件 1247 2012-03-17 19:59 课设\ChinaMap\ChinaMap.clw
文件 2094 2012-03-17 19:59 课设\ChinaMap\ChinaMap.cpp
文件 1346 2012-03-17 19:59 课设\ChinaMap\ChinaMap.h
............此处省略39个文件信息
- 上一篇:jeecms开发文档
- 下一篇:.rar
相关资源
- S7-300全套模块接线图
- Visio大全模具(含Cisco、IBM等常用拓扑
- 遥感图像几何校正模型探讨
- 开源1A锂电池充电板TP4056原理图+PCB
- axure 框架图模板设计.rp
- Scratch 变脸(将人物图片变成各种各样
- 普通心理学思维导图
- 计算机图形学 边填充算法实现代码
- Visio图标-最新最全的网络通信图标库
- 联想W520/T520笔记本电脑电路原理图
- LED灯串电路图说明
- 三星DDR800内存条PCB文件和原理图
- 图像的小波包分解
- SigmaPlot教程之各种柱形图的数据排列
- 嵌入式图形界面MiniGUI的示例程序9例
- PowerBuilder*图书馆管理系统*需求分析
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- 基于MFC扩展CListCtrl子项显示图片并叠
- 数据库课设:图书管理系统报告
- NE555电路应用原理图及PCB
- 黑白棋(带简单AI)
- 在大图中查找小图显示位置
- 计算机图形学课设 画板
- 图论软件包(图论里的程序)
- silicon lab公司的收音IC SI47XX全套开发工
- 图像二值化
- 加密cad图形的lisp文件
- MFC程序-碰撞的小球
- 在高斯白噪声信道下的QPSK编码误码率
评论
共有 条评论