void CMNet::CreateTabularPotential( const intVector& domain, const floatVector& data ) { AllocFactor( domain.size(), &domain.front() ); pFactorVector factors; int numFactors = GetFactors( domain.size(), &domain.front(), &factors ); if( numFactors != 1 ) { PNL_THROW( CInconsistentSize, "domain must be the same as corresponding domain size got from graph" ); } factors[0]->AllocMatrix( &data.front(), matTable ); }
void CGraphicalModel::AllocFactor( const intVector& domainIn) { AllocFactor( domainIn.size(), &domainIn.front() ); };