本文整理汇总了C#中Graph.DF方法的典型用法代码示例。如果您正苦于以下问题:C# Graph.DF方法的具体用法?C# Graph.DF怎么用?C# Graph.DF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graph
的用法示例。
在下文中一共展示了Graph.DF方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main()
{
int s = 1;
string fname = "wGraph3.txt";
Graph g = new Graph(fname);
g.display();
g.DF(s);
}
示例2: Main
public static void Main()
{
int s = 2; //needed to increase by one in order to skip having @ for 0
string fname = "wGraph2.txt";
Graph g = new Graph(fname);
g.display();
g.DF(s);
}
示例3: Main
public static void Main()
{
int s = 1;
string fname = "wGraph3.txt";
Graph g = new Graph(fname);
g.display();
g.DF(s);
Console.WriteLine();
g.iterativeDF(s);
fname = "wGraph2.txt";
g = new Graph(fname);
g.display();
g.DF(s);
Console.WriteLine();
g.iterativeDF(s);
}
示例4: Main
public static void Main()
{
int s = 7;
string fname = "wgraph2.txt";
Graph g = new Graph(fname);
g.display();
Console.WriteLine();
Console.WriteLine("Depth First, using Linked Lists - Recursive");
g.DF(s);
Console.WriteLine();
Console.WriteLine("Depth First, using Linked Lists - Iterative");
g.dfIter(s);
Console.ReadKey();
}