Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why only set pairwise once? #25

Open
s20163081161 opened this issue Jul 28, 2021 · 1 comment
Open

why only set pairwise once? #25

s20163081161 opened this issue Jul 28, 2021 · 1 comment

Comments

@s20163081161
Copy link

/* 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!

@dthuerck
Copy link
Owner

dthuerck commented Nov 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants