汉密尔顿循环中的图形设计问题 [英] Graphic design problem in hamilton cycle
问题描述
大家好!
我使用的是Visual C ++ 2008,因此完成了在无向图中找到汉密尔顿循环"的问题.编写控制台应用程序后.
我想将该程序改进为窗口窗体应用程序,并且要完成2个任务:
1.如何从富文本框中读取邻接矩阵到整数数组.
2.如何绘制顶点和边之间的图形.我需要一本指导手册来阅读和遵循.
有人可以让我开始吗?
Hello everybody!
I''m using Visual C++ 2008 and I''ve done problem "finding hamilton cycle in an undirected graph" after writing a console application.
I want improve the program to a window form application and I have 2 missions to complete:
1. How to read an adjacency matrix from a rich text box to an array of integers.
2. How to draw a graph with vertices and edges between them. I need a guide book to read and follow.
May someone get me started?
Thank you in advanced!
推荐答案
我认为通过Form表示您的意思是您正在考虑使用C ++/CLI和.Net.
我建议您使用WPF,因为图形将易于实现.
使用类似这样的内容来解析输入(在C#中)
I assume that by Form you mean that you are considering to use C++/CLI and .Net.
I''d advice you to use WPF since the graphics will be much easier to implement.
use something like this to parse input (in C#)
string s = "1,2,3,4,5,6";
string[] arrayOfStrings = s.Split('','');
使用C ++/CLI为您现有的C ++代码创建.Net .dll程序集.
以下系列展示了渲染图形所需的许多知识:
WPF图表设计器-第4部分 [
Use C++/CLI to create a .Net .dll assembly for your existing C++ code.
Here is a series showing much of what you need to know to render your graph:
WPF Diagram Designer - Part 4[^]
Regards
Espen Harlinn
这篇关于汉密尔顿循环中的图形设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!