本文整理汇总了C++中CFactor::CreateAllNecessaryMatrices方法的典型用法代码示例。如果您正苦于以下问题:C++ CFactor::CreateAllNecessaryMatrices方法的具体用法?C++ CFactor::CreateAllNecessaryMatrices怎么用?C++ CFactor::CreateAllNecessaryMatrices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFactor
的用法示例。
在下文中一共展示了CFactor::CreateAllNecessaryMatrices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateWithRandomMatrices
CMNet* CMNet::CreateWithRandomMatrices( const intVecVector& clqs,
CModelDomain* pMD)
{
CMNet* pMNet = CMNet::Create( clqs, pMD );
pMNet->AllocFactors();
int numFactors = pMNet->GetNumberOfFactors();
int i;
for( i = 0; i < numFactors; i++ )
{
pMNet->AllocFactor( i );
CFactor* ft = pMNet->GetFactor(i);
ft->CreateAllNecessaryMatrices();
}
return pMNet;
}
示例2:
//create mnet with random matrices
CMRF2* CMRF2::CreateWithRandomMatrices( int numberOfCliques,
const int *cliqueSizes,
const int **cliques,
CModelDomain* pMD)
{
CMRF2* pMRF2 = CMRF2::Create( numberOfCliques, cliqueSizes, cliques, pMD );
pMRF2->AllocFactors();
int numFactors = pMRF2->GetNumberOfFactors();
int i;
for( i = 0; i < numFactors; i++ )
{
pMRF2->AllocFactor( i );
CFactor* ft = pMRF2->GetFactor(i);
ft->CreateAllNecessaryMatrices();
}
return pMRF2;
}