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

  • 大小: 27KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-01
  • 語言: C#
  • 標(biāo)簽: C#????拓?fù)渑判?/b>??

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;

namespace?Graph
{
????public?class?Graph
????{
????????int?numVertex;
????????int?maxVertex;
????????Vertex[]?vertexs;
????????int[]?adjMatrix;
????????public?Graph(int?maxvertex1)
????????{
????????????this.maxVertex?=?maxvertex1;
????????????vertexs=new?Vertex[maxVertex];
????????????adjMatrix=new?int[maxVertexmaxVertex];
????????????numVertex?=?0;
????????????for?(int?i?=?0;?i?????????????{
????????????????for?(int?j?=?0;?j?????????????????{
????????????????????adjMatrix[i?j]?=?0;
????????????????}
????????????}
????????}

????????public?void?AddVertex(string?label1)
????????{
????????????vertexs[numVertex++]?=?new?Vertex(label1);
????????}

????????public?void?AddEdge(int?start?int?end)
????????{
????????????adjMatrix[start?end]?=?1;
????????}

????????public?void?ShowVertex(int?v)
????????{
????????????Console.Write(?vertexs[v].label?+?“?“);
????????}

????????public?int?NoSuccessors()
????????{
????????????bool?isEdge??;
????????????for?(int?i?=?0;?i?????????????{
????????????????isEdge?=?false;
????????????????for?(int?j?=?0;?j?????????????????{
????????????????????if?(adjMatrix[i?j]?>?0)
????????????????????{
????????????????????????isEdge?=?true;
????????????????????????break;
????????????????????}
????????????????}
????????????????if?(!isEdge)
????????????????{
????????????????????return?i;
????????????????}
????????????}
????????????return?-1;
????????}

????????public?void?Delete(int?index)
????????{
????????????if?(index?!=?maxVertex?-?1)
????????????{
????????????????for?(int?i?=?index;?i?????????????????{
????????????????????vertexs[i]?=?vertexs[i?+?1];
????????????????}
????????????????for?(int?i?=?index;?i?????????????????{
????????????????????RemoveRow(index);
????????????????}
????????????????for?(int?i?=?0;?i?????????????????{
????????????????????RemoveCol(index);
????????????????}
????????????}
????????????maxVertex--;
????????}

????????private?void?RemoveCol(int?index)
????????{
????????????for?(int?i?=?0;?i?????????????{
????????????????adjMatrix[iindex]=adjMatrix[iindex+1];
????????????}
????????}

????????private?void?RemoveRow(int?index)
????????{
????????????for?(int?i?=?0;?i?????????????{
????????????????adjMatrix[indexi]=adjMatrix[index+1i];
????????????}
????????}

????????public?void?TopVertList()
????????{
????????????Stack?stack?=?new?Stack();
????????????while?(maxVertex?>?0)
????????????{
????????????????int?index=NoSuccessors();
????????????????if?(index?==?-1)
????????????????{
????????????????????Console.WriteLine(“節(jié)點包含環(huán)“);
????????????????????return;
????????????????}
????????????????stack.Push(vertexs[index].label);
?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????I.A....??????6656??2012-11-27?19:21??Graph\Graph\bin\Debug\Graph.exe

????I.A....?????19968??2012-11-27?19:21??Graph\Graph\bin\Debug\Graph.pdb

????I.A....?????11600??2012-11-27?19:22??Graph\Graph\bin\Debug\Graph.vshost.exe

????I.A....???????490??2010-03-17?22:39??Graph\Graph\bin\Debug\Graph.vshost.exe.manifest

????I.A....??????3256??2012-11-27?19:21??Graph\Graph\Graph.cs

????I.A....??????2550??2012-11-27?19:21??Graph\Graph\Graph.csproj

????I.A....??????5814??2012-11-27?19:21??Graph\Graph\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

????I.A....???????408??2012-11-27?19:22??Graph\Graph\obj\x86\Debug\Graph.csproj.FileListAbsolute.txt

????I.A....??????6656??2012-11-27?19:21??Graph\Graph\obj\x86\Debug\Graph.exe

????I.A....?????19968??2012-11-27?19:21??Graph\Graph\obj\x86\Debug\Graph.pdb

????I.A....???????744??2012-11-27?19:21??Graph\Graph\Program.cs

????I.A....??????1360??2012-11-27?10:51??Graph\Graph\Properties\AssemblyInfo.cs

????I.A....???????176??2012-11-27?19:21??Graph\Graph\TopologicalSort.cs

????I.A....???????348??2012-11-27?13:25??Graph\Graph\Vertex.cs

????I.A....???????857??2012-11-27?10:51??Graph\Graph.sln

????I.A..H.?????16896??2012-11-27?19:43??Graph\Graph.suo

????I..D...?????????0??2012-11-27?10:51??Graph\Graph\obj\x86\Debug\TempPE

????I..D...?????????0??2012-11-27?19:21??Graph\Graph\obj\x86\Debug

????I..D...?????????0??2012-11-27?19:21??Graph\Graph\bin\Debug

????I..D...?????????0??2012-11-27?10:51??Graph\Graph\obj\x86

????I..D...?????????0??2012-11-27?10:51??Graph\Graph\bin

????I..D...?????????0??2012-11-27?10:51??Graph\Graph\obj

????I..D...?????????0??2012-11-27?10:51??Graph\Graph\Properties

????I..D...?????????0??2012-11-27?18:19??Graph\Graph

????I..D...?????????0??2012-11-27?10:51??Graph

-----------?---------??----------?-----??----

????????????????97747????????????????????25


評論

共有 條評論