91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

求解無向圖中任意兩點之間的所有路徑的C#實現 本文檔只是根據網上搜到的資料,翻譯成C#版本。當初為了項目需要,在網上找了很長時間,另外 自己也曾經廢了老牛鼻子勁,也沒有看懂網上的一些C++版本的算法實現。所以我上傳上這個文件, 只希望急需的朋友們用,本人在此希望算法的原實現作者不要怪罪。

資源截圖

代碼片段和文件信息

using?System;
using?System.Data;
using?System.Configuration;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.Collections;

public?partial?class?_Default?:?System.Web.UI.Page?
{
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????int[]?graph?=?new?int[5?5];
????????graph?=?InitArray(graph?5);
????????ArrayList?paths?=?(new?MapPath(5)).ShowAllWays(graph?3?2);
????????foreach?(object?obj?in?paths)
????????{
????????????Response.Write(obj.ToString()+““);
????????}
????}
????private?static?int[]?InitArray(int[]?graph?int?vexNum)
????{
????????for?(int?i?=?0;?i?????????{
????????????for?(int?j?=?0;?j?????????????{
????????????????graph[i?j]?=?0;
????????????}
????????}
????????graph[0?1]?=?1;
????????graph[0?3]?=?1;
????????graph[0?4]?=?1;

????????graph[1?0]?=?1;
????????graph[1?2]?=?1;
????????graph[1?3]?=?1;

????????graph[2?1]?=?1;

????????graph[3?0]?=?1;
????????graph[3?1]?=?1;
????????graph[3?4]?=?1;

????????graph[4?0]?=?1;
????????graph[4?3]?=?1;
????????return?graph;
????}

}

評論

共有 條評論