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

Method unaryEnergy

dependency/densecrf3d/src/densecrf.cpp:236–248  ·  view source on GitHub ↗

////////////// Debug ///// //////////////

Source from the content-addressed store, hash-verified

234///// Debug /////
235///////////////////
236VectorXf DenseCRF::unaryEnergy(const VectorXs & l) {
237 assert( l.cols() == N_ );
238 VectorXf r( N_ );
239 r.fill(0.f);
240 if( unary_ ) {
241 MatrixXf unary = unary_->get();
242
243 for( int i=0; i<N_; i++ )
244 if ( 0 <= l[i] && l[i] < M_ )
245 r[i] = unary( l[i], i );
246 }
247 return r;
248}
249VectorXf DenseCRF::pairwiseEnergy(const VectorXs & l, int term) {
250 assert( l.cols() == N_ );
251 VectorXf r( N_ );

Callers

nothing calls this directly

Calls 3

colsMethod · 0.45
fillMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected