|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.router.polyline.PenaltySettings
public class PenaltySettings
Provides the cost penalties that are applied for violating restrictions during a path search.
The PathSearch
calculates the 'shortest' path from a source to a target at which 'shortest' path means the
path with the lowest costs. Costs results from violations of restrictions that are defined by the different PathSearchExtension
s. This class defines penalties for the various violations. The path search can be
adapted to specific needs by varying these penalties. In order to avoid a certain violation, the appropriate penalty
must be increased.
Constructor Summary | |
---|---|
protected |
PenaltySettings()
Creates a new instance. |
Method Summary | |
---|---|
PenaltySettings |
createCopy()
Creates a copy of this instance. |
int |
getBendPenalty()
Returns the penalty for an edge bend. |
int |
getBendsInNodeToEdgeDistancePenalty()
Returns the penalty for an edge bend being closer to the border of the source node, the target node or one of their ancestor group nodes then the minimal node to edge distance. |
int |
getEdgeCrossingPenalty()
Returns the penalty for a crossing of two edges. |
int |
getEdgeLabelCrossingPenalty()
Returns the penalty that an edge crosses a label of an edge that is not routed. |
int |
getGroupNodeCrossingPenalty()
Returns the penalty that an edge crosses a group node. |
int |
getInvalidEdgeGroupingPenalty()
Returns the penalty for an edge that is not grouped at source or target side. |
int |
getMinimalEdgeToEdgeDistancePenalty()
Returns the penalty for violation the minimal distance between any two edges. |
int |
getMinimalFirstLastSegmentLengthPenalty()
Returns the penalty for violation the minimal length of the first and last segment of an edge. |
int |
getMinimalGroupNodeToEdgeDistancePenalty()
Returns the penalty for violation the minimal distance between any edge and any group node side. |
int |
getMinimalNodeCornerDistancePenalty()
Returns the penalty for violation the minimal distance the edge shall keep from node corners when entering or leaving the node. |
int |
getMinimalNodeToEdgeDistancePenalty()
Returns the penalty for violation the minimal distance between any edge and any non-group node side. |
int |
getMonotonyViolationPenalty()
Returns the penalty for violation the monotonic path restrictions of an edge. |
int |
getNodeCrossingPenalty()
Returns the penalty that an edge crosses a non-group node. |
int |
getNodeLabelCrossingPenalty()
Returns the penalty that an edge crosses a node label. |
int |
getPartitionGridCellReentrancePenalty()
Returns the penalty for leaving and reentering an edge in the same partition grid cell. |
int |
getPortViolationPenalty()
Returns the penalty if an edge does not comply with its PortCandidate s or PortConstraint s. |
protected PenaltySettings |
newInstance()
Factory method, which is used by createCopy() . |
void |
setBendPenalty(int penalty)
Sets the penalty for an edge bend. |
void |
setBendsInNodeToEdgeDistancePenalty(int penalty)
Sets the penalty for an edge bend being closer to the border of the source node, the target node or one of their ancestor group nodes then the minimal node to edge distance. |
void |
setEdgeCrossingPenalty(int penalty)
Sets the penalty for a crossing of two edges. |
void |
setEdgeLabelCrossingPenalty(int penalty)
Sets the penalty that an edge crosses a label of an edge that is not routed. |
void |
setGroupNodeCrossingPenalty(int penalty)
Sets the penalty that an edge crosses a group node. |
void |
setInvalidEdgeGroupingPenalty(int penalty)
Sets the penalty for an edge that is not grouped at source or target side. |
void |
setMinimalEdgeToEdgeDistancePenalty(int penalty)
Sets the penalty for violation the minimal distance between any two edges. |
void |
setMinimalFirstLastSegmentLengthPenalty(int penalty)
Sets the penalty for violation the minimal length of the first and last segment of an edge. |
void |
setMinimalGroupNodeToEdgeDistancePenalty(int penalty)
Sets the penalty for violation the minimal distance between any edge and any group node side. |
void |
setMinimalNodeCornerDistancePenalty(int penalty)
Sets the penalty for violation the minimal distance the edge shall keep from node corners when entering or leaving the node. |
void |
setMinimalNodeToEdgeDistancePenalty(int penalty)
Sets the penalty for violation the minimal distance between any edge and any non-group node side. |
void |
setMonotonyViolationPenalty(int penalty)
Sets the penalty for violation the monotonic path restrictions of an edge. |
void |
setNodeCrossingPenalty(int penalty)
Sets the penalty that an edge crosses a non-group node. |
void |
setNodeLabelCrossingPenalty(int penalty)
Sets the penalty that an edge crosses a node label. |
void |
setPartitionGridCellReentrancePenalty(int penalty)
Sets the penalty for leaving and reentering an edge in the same partition grid cell. |
void |
setPortViolationPenalty(int penalty)
Sets the penalty if an edge does not comply with its PortCandidate s or PortConstraint s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PenaltySettings()
Method Detail |
---|
public int getBendPenalty()
public void setBendPenalty(int penalty)
3
.
The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltypublic int getEdgeCrossingPenalty()
public void setEdgeCrossingPenalty(int penalty)
1
.
The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltypublic int getNodeCrossingPenalty()
public void setNodeCrossingPenalty(int penalty)
30
.
The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltypublic int getGroupNodeCrossingPenalty()
public void setGroupNodeCrossingPenalty(int penalty)
20
.
The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltypublic int getNodeLabelCrossingPenalty()
EdgeRouter.setConsiderNodeLabelsEnabled(boolean)
to set whether node labels should be considered when routing the edges.
EdgeRouter.setConsiderNodeLabelsEnabled(boolean)
public void setNodeLabelCrossingPenalty(int penalty)
EdgeRouter.setConsiderNodeLabelsEnabled(boolean)
to
set whether node labels should be considered when routing the edges. By default this value is set to
13
. The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltyEdgeRouter.setConsiderNodeLabelsEnabled(boolean)
public int getEdgeLabelCrossingPenalty()
EdgeRouter.setConsiderEdgeLabelsEnabled(boolean)
to set whether edge labels should be considered when routing the
edges.
EdgeRouter.setConsiderEdgeLabelsEnabled(boolean)
public void setEdgeLabelCrossingPenalty(int penalty)
EdgeRouter.setConsiderEdgeLabelsEnabled(boolean)
to set whether edge labels should be considered when routing the
edges. By default this value is set to 13
. The value must be >= 0
, otherwise the
default value will be assigned.
penalty
- the penaltyEdgeRouter.setConsiderNodeLabelsEnabled(boolean)
public int getMinimalNodeToEdgeDistancePenalty()
EdgeRouter.setMinimalNodeToEdgeDistance(double)
to set the minimal distance.
EdgeRouter.setMinimalNodeToEdgeDistance(double)
public void setMinimalNodeToEdgeDistancePenalty(int penalty)
EdgeRouter.setMinimalNodeToEdgeDistance(double)
to set the minimal distance.
By default this value is set to 7
. The value must be >= 0
, otherwise the default
value will be assigned.
penalty
- the penaltyEdgeRouter.setMinimalNodeToEdgeDistance(double)
public int getMinimalGroupNodeToEdgeDistancePenalty()
EdgeRouter.setMinimalNodeToEdgeDistance(double)
to set the minimal distance.
EdgeRouter.setMinimalNodeToEdgeDistance(double)
public void setMinimalGroupNodeToEdgeDistancePenalty(int penalty)
EdgeRouter.setMinimalNodeToEdgeDistance(double)
to set the minimal distance. By default this value is set to
7
. The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltyEdgeRouter.setMinimalNodeToEdgeDistance(double)
public int getMinimalEdgeToEdgeDistancePenalty()
EdgeLayoutDescriptor.setMinimalEdgeToEdgeDistance(double)
to set the minimal distance for a certain edge to any other
edge.
EdgeLayoutDescriptor.setMinimalEdgeToEdgeDistance(double)
public void setMinimalEdgeToEdgeDistancePenalty(int penalty)
EdgeLayoutDescriptor.setMinimalEdgeToEdgeDistance(double)
to set the minimal distance for a certain edge to any
other edge. By default this value is set to 5
. The value must be >= 0
, otherwise the
default value will be assigned.
penalty
- the penaltyEdgeLayoutDescriptor.setMinimalEdgeToEdgeDistance(double)
public int getMinimalNodeCornerDistancePenalty()
EdgeLayoutDescriptor.setMinimalNodeCornerDistance(double)
to set the minimal distance
for a certain edge.
EdgeLayoutDescriptor.setMinimalNodeCornerDistance(double)
public void setMinimalNodeCornerDistancePenalty(int penalty)
EdgeLayoutDescriptor.setMinimalNodeCornerDistance(double)
to set the minimal distance for a
certain edge. By default this value is set to 6
. The value must be >= 0
, otherwise
the default value will be assigned.
penalty
- the penaltyEdgeLayoutDescriptor.setMinimalNodeCornerDistance(double)
public int getMinimalFirstLastSegmentLengthPenalty()
EdgeLayoutDescriptor.setMinimalFirstSegmentLength(double)
to set the minimal length of the first segment and
EdgeLayoutDescriptor.setMinimalLastSegmentLength(double)
to set the minimal length of the last segment of a
certain edge.
EdgeLayoutDescriptor.setMinimalFirstSegmentLength(double)
,
EdgeLayoutDescriptor.setMinimalLastSegmentLength(double)
public void setMinimalFirstLastSegmentLengthPenalty(int penalty)
EdgeLayoutDescriptor.setMinimalFirstSegmentLength(double)
to set the minimal length of the first segment and
EdgeLayoutDescriptor.setMinimalLastSegmentLength(double)
to set the minimal length of the last segment of a
certain edge. By default this value is set to 8
. The value must be >= 0
, otherwise
the default value will be assigned.
penalty
- the penaltyEdgeLayoutDescriptor.setMinimalFirstSegmentLength(double)
,
EdgeLayoutDescriptor.setMinimalLastSegmentLength(double)
public int getBendsInNodeToEdgeDistancePenalty()
EdgeRouter.setMinimalNodeToEdgeDistance(double)
public void setBendsInNodeToEdgeDistancePenalty(int penalty)
6
. The
value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltyEdgeRouter.setMinimalNodeToEdgeDistance(double)
public int getMonotonyViolationPenalty()
EdgeLayoutDescriptor.setMonotonicPathRestriction(byte)
to set the monotonic path restrictions of a certain edge.
EdgeLayoutDescriptor.setMonotonicPathRestriction(byte)
public void setMonotonyViolationPenalty(int penalty)
EdgeLayoutDescriptor.setMonotonicPathRestriction(byte)
to set the monotonic path restrictions of a certain edge.
By default this value is set to 14
. The value must be >= 0
, otherwise the default
value will be assigned.
penalty
- the penaltyEdgeLayoutDescriptor.setMonotonicPathRestriction(byte)
public int getPartitionGridCellReentrancePenalty()
public void setPartitionGridCellReentrancePenalty(int penalty)
7
. The value must be >= 0
, otherwise the default value will be assigned.
penalty
- the penaltypublic int getPortViolationPenalty()
PortCandidate
s or PortConstraint
s.
PortCandidate
,
PortConstraint
public void setPortViolationPenalty(int penalty)
PortCandidate
s or PortConstraint
s. By default this value is set to 115
. The value must be >=
0
, otherwise the default value will be assigned.
penalty
- the penaltyPortCandidate
,
PortConstraint
public int getInvalidEdgeGroupingPenalty()
PortConstraintKeys.SOURCE_GROUPID_KEY
or PortConstraintKeys.TARGET_GROUPID_KEY
key.
PortConstraintKeys.SOURCE_GROUPID_KEY
,
PortConstraintKeys.TARGET_GROUPID_KEY
public void setInvalidEdgeGroupingPenalty(int penalty)
PortConstraintKeys.SOURCE_GROUPID_KEY
or PortConstraintKeys.TARGET_GROUPID_KEY
key. By
default this value is set to 25
. The value must be >= 0
, otherwise the default value
will be assigned.
penalty
- the penaltyPortConstraintKeys.SOURCE_GROUPID_KEY
,
PortConstraintKeys.TARGET_GROUPID_KEY
public PenaltySettings createCopy()
newInstance()
to get a new instance.
protected PenaltySettings newInstance()
createCopy()
. Subclasses can override this method in order to return a
more specialized version.
PenaltySettings
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |