-
The set of active nodes in ascending line order.
PageBreakingAlgorithm.bestNodeForLastPage
BreakingAlgorithm.KnuthNode.next
next possible node in the same line
best node for the preceding breakpoint
Compare two KnuthNodes and return the node with the least demerit.
BreakingAlgorithm.createNode(int position,
int line,
int fitness,
int totalWidth,
int totalStretch,
int totalShrink)
Creates a new active node for a break from the best active node of the given
fitness class to the element at the given position.
BreakingAlgorithm.createNode(int position,
int line,
int fitness,
int totalWidth,
int totalStretch,
int totalShrink,
double adjustRatio,
int availableShrink,
int availableStretch,
int difference,
double totalDemerits,
BreakingAlgorithm.KnuthNode previous)
Creates a new active node for a feasible breakpoint at the given position.
Return the last node that yielded a too short line.
BreakingAlgorithm.BestRecords.getNode(int fitness)
BreakingAlgorithm.getNode(int line)
Returns the first active node for the given line.
Recover from an overflow condition.
protected void
protected void
Add a node at the end of the given line's existing active nodes.
void
Registers the new best active node for the given fitness class.
protected void
Determines the set of optimal breakpoints corresponding to the given active node.
Compare two KnuthNodes and return the node with the least demerit.
protected double
Return the adjustment ratio needed to make up for the difference.
protected double
Computes the demerits of the current breaking (that is, up to the given element),
if the next-to-last chosen breakpoint is the given active node.
protected double
Computes the demerits of the current breaking (that is, up to the given element),
if the next-to-last chosen breakpoint is the given active node.
protected int
Return the difference between the natural width of a line that would be made
between the given active node and the given element, and the available width of the
real line.
protected void
BreakingAlgorithm.createForcedNodes(BreakingAlgorithm.KnuthNode node,
int line,
int elementIdx,
int difference,
double r,
double demerits,
int fitnessClass,
int availableShrink,
int availableStretch,
int newWidth,
int newStretch,
int newShrink)
BreakingAlgorithm.createNode(int position,
int line,
int fitness,
int totalWidth,
int totalStretch,
int totalShrink,
double adjustRatio,
int availableShrink,
int availableStretch,
int difference,
double totalDemerits,
BreakingAlgorithm.KnuthNode previous)
Creates a new active node for a feasible breakpoint at the given position.
protected void
Deactivate the given node
protected void
BreakingAlgorithm.forceNode(BreakingAlgorithm.KnuthNode node,
int line,
int elementIdx,
int difference,
double r,
double demerits,
int fitnessClass,
int availableShrink,
int availableStretch)
protected void
Remove the given active node registered for the given line.
protected int
Restart from the given node at the given index.
abstract void
Empty method, hook for subclasses.
KnuthNode(int position,
int line,
int fitness,
int totalWidth,
int totalStretch,
int totalShrink,
double adjustRatio,
int availableShrink,
int availableStretch,
int difference,
double totalDemerits,
BreakingAlgorithm.KnuthNode previous)