mapmap_cpu icon indicating copy to clipboard operation
mapmap_cpu copied to clipboard

why only set pairwise once?

Open s20163081161 opened this issue 2 years ago • 1 comments

/* cost types / using unary_t = UnaryTable<cost_t, simd_w>; using pairwise_t = PairwiseTruncatedLinear<cost_t, simd_w>; ....... / construct pairwise costs */ pairwise = std::unique_ptr<pairwise_t>(new pairwise_t({1.0, 2.0})); .....

for(luint_t n = 0; n < num_nodes; ++n) mapmap.set_unary(n, unaries[n].get()); mapmap.set_pairwise(pairwise.get());

why only set pairwise once? what dose "new pairwise_t({1.0, 2.0})" mean ?

Look forward to your reply. Thanks!

s20163081161 avatar Jul 28 '21 09:07 s20163081161

Hi,

setting this only once means that all edges hare the same cost function. Parameters {1.0, 2.0} lead to the following cst function: c(l_1, l_2) = 1.0 * min(abs(l_1 - l_2), 2.0) as is seen in line135ff of the code.

dthuerck avatar Nov 02 '21 12:11 dthuerck