Search this API

y.layout
Interface ProfitModel

All Known Implementing Classes:
LabelRanking

public interface ProfitModel

A ProfitModel ranks LabelCandidates used for prioritizing certain label locations over others.

Generic labeling algorithms like SALabeling and GreedyMISLabeling will use the ranking to decide which LabelCandidates to eliminate.

LabelCandidates with a high profit will be preferred over LabelCandidates with a low profit.

 

Method Summary
 double getProfit(LabelCandidate candidate)
          Returns the profit for placing a label using the given LabelCandidate.
 

Method Detail

getProfit

double getProfit(LabelCandidate candidate)
Returns the profit for placing a label using the given LabelCandidate.

Higher profit means better candidates. Hence, there is a higher probability that the candidate is chosen by a labeling algorithm.

Profits need to have a value between 0 and 1.

Parameters:
candidate - the candidate
Returns:
the profit of the candidate

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.