首次试用 Math.Net 并从 C++\Cli 迁移到 C# 以使用 Math.Net,所以今天一切都是新的。
如何设置和运行诸如Matrix Transpose之类的示例。我应该创建一个类并将此代码复制到其中吗?我注意到缺少接口(错误:找不到命名空间 IExample),但我也注意到这可能在此处提供Interface。我把这个放在哪里?
这就是我所拥有的 Program.cs(省略了基本细节):
namespace Examples.LinearAlgebraExamples
{
/// Defines the base interface for examples.
public interface IExample
{
string Name
{
get;
}
string Description
{
get;
}
void Run();
}
/// Matrix transpose and inverse
public class MatrixTransposeAndInverse : IExample
{
// rest of the example code
}
class Program
{
static void Main(string[] args)
{
// how to call the above routines?
}
}
}