我想用一个通用TKey创建一个类,其中TKey是可以创建的System.Tuple类型之一.
public class Class1<TKey> where TKey : System.Tuple
{
/// Class Stuff Goes Here where TKey is one of the 8 tuple
types found in the link in (1)
}
Run Code Online (Sandbox Code Playgroud)我不太确定如何实现这一点.目标是防止自己为每个元组类实现一个类.
似乎visual studio 2005的cmath没有erf(x).我正在使用NIST统计测试套件用于随机和伪随机数生成器.在cephes.c的方法中,双cephes_normal(double x),它使用C99数学函数erf(x),我认为它不支持visual studio 2005.
我怎样才能克服这个问题?我在这里看到了一个C++解决方案:http: //social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/9f5f4bf4-c0ae-4620-8039-4dc36e98d718/
有人使用了boost C++数学库.但我认为我不能将c ++标头包含在C源文件中.