MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / setLabelCompatibilityParameters

Method setLabelCompatibilityParameters

dependency/densecrf3d/src/densecrf.cpp:416–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414 return r;
415}
416void DenseCRF::setLabelCompatibilityParameters( const VectorXf & v ) {
417 std::vector< int > n;
418 for( unsigned int k=0; k<pairwise_.size(); k++ )
419 n.push_back( pairwise_[k]->parameters().rows() );
420 int np=0;
421 for( unsigned int k=0; k<pairwise_.size(); k++ )
422 np += n[k];
423
424 for( unsigned int k=0,i=0; k<pairwise_.size(); k++ ) {
425 pairwise_[k]->setParameters( v.segment( i, n[k] ) );
426 i += n[k];
427 }
428}
429VectorXf DenseCRF::kernelParameters() const {
430 std::vector< VectorXf > terms;
431 for( unsigned int k=0; k<pairwise_.size(); k++ )

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.45
push_backMethod · 0.45
rowsMethod · 0.45
parametersMethod · 0.45
setParametersMethod · 0.45

Tested by

no test coverage detected