本文整理汇总了C++中BayesNet::GetGaussianWeights方法的典型用法代码示例。如果您正苦于以下问题:C++ BayesNet::GetGaussianWeights方法的具体用法?C++ BayesNet::GetGaussianWeights怎么用?C++ BayesNet::GetGaussianWeights使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BayesNet
的用法示例。
在下文中一共展示了BayesNet::GetGaussianWeights方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestGetGaussianMeanCovarWeights
void TestsPnlHigh::TestGetGaussianMeanCovarWeights()
{
printf("TestGetGaussianMeanCovarWeights\n");
BayesNet *net = SimpleCGM1();
net->SetPGaussian("Cont1", "0.0", "2.5", "1.0 3.0", "Tab0^State0");
net->SetPGaussian("Cont1", "-1.5", "0.75", "0.5 2.5", "Tab0^State1");
if (net->GetGaussianMean("Cont1", "Tab0^State0")[0].FltValue() != 0.0f)
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianMean works incorrectly");
};
if (net->GetGaussianMean("Cont1", "Tab0^State1")[0].FltValue() != -1.5f)
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianMean works incorrectly");
};
if (net->GetGaussianCovar("Cont1", "Tab0^State0")[0].FltValue() != 2.5f)
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianCovar works incorrectly");
};
if (net->GetGaussianCovar("Cont1", "Tab0^State1")[0].FltValue() != 0.75f)
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianCovar works incorrectly");
};
if (String(net->GetGaussianWeights("Cont1", "Cont0", "Tab0^State0")[0]) != "1.000000^3.000000")
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianCovar works incorrectly");
};
if (String(net->GetGaussianWeights("Cont1", "Cont0", "Tab0^State1")[0]) != "0.500000^2.500000")
{
PNL_THROW(pnl::CAlgorithmicException, "GetGaussianCovar works incorrectly");
};
delete net;
};