Skip to content

Customizing pairwise costs #24

@blurgyy

Description

@blurgyy

Hello, thank you for the great library!

I want to implement a custom pairwise cost functor, which takes labels and maps the labels to something else to calculate the costs. For example, if the labels are indices of some set of n-dimensional points, I want to define the pairwise costs as the distance between the points which the labels point to. Is this possible?

I have tried implementing a class derived from mapmap::PairwiseCosts, and override the get_pairwise_costs method. When I try to output the labels vector in get_pairwise_costs, sometimes it outputs undefined values (i.e. not labels). Could you please give some instructions on how to define custom pairwise costs? I would be very appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions