小编Yab*_*uar的帖子

"爬山"和"贪婪"算法有什么区别?

请解释"爬山"和"贪婪"算法之间的区别.

看起来两者都很相似,我怀疑"爬山"是一种算法; 这似乎是一种优化.它是否正确?

algorithm

26
推荐指数
2
解决办法
2万
查看次数

"不等于"的F#语法是什么?

在C代码中,它将是这样的:

if (c != 0) { //some code ...}
Run Code Online (Sandbox Code Playgroud)

在F#怎么样?

f#

25
推荐指数
4
解决办法
1万
查看次数

关于F#的堆栈和列表的问题

堆栈与F#中的List是一样的吗?那么F#中的堆栈和序列呢?队列怎么样?

f#

5
推荐指数
2
解决办法
605
查看次数

将C#结构转换为F#

我在C#中有这样的代码:

namespace WumpusWorld
    {
        class PlayerAI
        {
            //struct that simulates a cell in the AI replication of World Grid
            struct cellCharacteristics
            {
                public int pitPercentage;
                public int wumpusPercentage;
                public bool isPit;
                public bool neighborsMarked;
                public int numTimesvisited;
            }

            private cellCharacteristics[,] AIGrid;                    //array that simulates World Grid for the AI
            private enum Move { Up, Down, Right, Left, Enter, Escape };   //enum that represents integers that trigger movement in WumpusWorldForm class
            Stack<int> returnPath;                                      //keeps track of each move of AI to …
Run Code Online (Sandbox Code Playgroud)

c# f#

5
推荐指数
1
解决办法
925
查看次数

如何使用F#从给定数据创建树

有人可以教我如何使用F#从给定数据制作树吗?例如:数字列表或城市名称列表等.我没有任何线索如何在F#中制作树,需要帮助:)

例如:输入来自运行时,假设它来自文本文件:城市的列表名称

输出结果:图形

tree f#

2
推荐指数
1
解决办法
2065
查看次数

标签 统计

f# ×4

algorithm ×1

c# ×1

tree ×1