本文整理汇总了C++中CFactor::SetModelDomain方法的典型用法代码示例。如果您正苦于以下问题:C++ CFactor::SetModelDomain方法的具体用法?C++ CFactor::SetModelDomain怎么用?C++ CFactor::SetModelDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFactor
的用法示例。
在下文中一共展示了CFactor::SetModelDomain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyWithNewDomain
//.........这里部分代码省略.........
CFactor *pNewFactor;
switch ( factor->GetFactorType() )
{
case ftPotential:
{
switch ( factor->GetDistributionType() )
{
case dtTabular:
{
pNewFactor = CTabularPotential::
Copy(static_cast<const CTabularPotential*>(factor) );
break;
}
case dtGaussian:
{
pNewFactor = CGaussianPotential::
Copy(static_cast<const CGaussianPotential*>(factor));
break;
}
case dtScalar:
{
pNewFactor = CScalarPotential::
Copy( static_cast<const CScalarPotential*>(factor) );
break;
}
default:
{
PNL_THROW(CNotImplemented, "distribution type" );
}
}
break;
}
case ftCPD:
{
switch ( factor->GetDistributionType() )
{
case dtTabular:
{
pNewFactor = CTabularCPD::
Copy(static_cast<const CTabularCPD*>(factor));
break;
}
case dtGaussian:
{
pNewFactor = CGaussianCPD::
Copy(static_cast<const CGaussianCPD*>(factor));
break;
}
case dtCondGaussian:
{
pNewFactor = CGaussianCPD::
Copy(static_cast<const CGaussianCPD*>(factor));
break;
}
case dtSoftMax:
{
pNewFactor = CSoftMaxCPD::
Copy(static_cast<const CSoftMaxCPD*>(factor));
break;
}
case dtCondSoftMax:
{
pNewFactor = CSoftMaxCPD::
Copy(static_cast<const CSoftMaxCPD*>(factor));
break;
}
case dtMixGaussian:
{
pNewFactor = CMixtureGaussianCPD::Copy(
static_cast<const CMixtureGaussianCPD*>(factor));
break;
}
default:
{
PNL_THROW(CNotImplemented, "distribution type" );
}
}
break;
}
default:
{
PNL_THROW(CNotImplemented, "factor type" );
}
}
PNL_CHECK_IF_MEMORY_ALLOCATED(pNewFactor);
/*
if( pMDNew == factor->GetModelDomain())
{
return pNewFactor;
}
else*/
{
pNewFactor->m_Domain = intVector(domain);
pNewFactor->SetModelDomain(pMDNew, 0);
return pNewFactor;
}
}