|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.LabelRanking
public class LabelRanking
LabelRanking
implements the ranking for edge and node labels.
In this implementation node label positions have no ranking, the profit for all
candidates is 1
.
The ranking of edge label positions depends on the locations described in the
PreferredPlacementDescriptor
associated with an edge.
Note that this implementation only works correctly if the label model is either a SliderEdgeLabelModel
or a DiscreteEdgeLabelModel
.
Constructor Summary | |
---|---|
LabelRanking()
Creates a new instance of LabelRanking . |
Method Summary | |
---|---|
double |
getProfit(LabelCandidate candidate)
Returns the profit for placing a label using the given LabelCandidate . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelRanking()
LabelRanking
.
Method Detail |
---|
public double getProfit(LabelCandidate candidate)
ProfitModel
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
.
getProfit
in interface ProfitModel
candidate
- the candidate
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |