Next: Computation Time.
Up: Implementation
Previous: Implementation
Step (1c): Procedure when the
th packet
of
is taken from
.
For each
do the following computations.
- Compute
When we move graph
and
along the Y-axis so that
and
are at the same level 0 on the Y-axis,
the two graphs (named as
and
) are repositioned as follows:
is the index of
at which
is the lowest position above
, and is computed using
as the starting position by the following equation.
is a special case indicating that the height of graph
above 0 exceeds that of
so that no more packet
of
is needed for computing
for
.
- Compute
and
We then compute
, the area surrounded by graph
and
in the range
on the Y-axis.
is the maximum difference and
is the minimum difference on the X-axis between
and
in the range
on the Y-axis.
These values are computed using the values at
by the following equations.
If
, the last term of (6) is not added, and
is not counted in (7) either.
- Compute
If
, the range on the Y-axis of
covers the range on the Y-axis of
(
).
Then
, the area surrounded by two graphs when we move
as close as possible to
along the X-axis, can be computed by the following equation.
We can compute
by the following equation if either
or
is defined.
 |
(7) |
After all the computations for
are done,
is the area surrounded by graph
and
in the vertical range of
when
moves horizontally and vertically without crossing
so that
is as close as possible to
, where
is a sub array of
:
If
is not defined, the deviation for
from
cannot be defined.
We can delete objects (such as
) associated with
allocated in memory except for the ones at the minimum.
(
is defined by
or
if
.)
When we have finished processing all the packets in
and suppose the number of packets in
is
, the deviation for
from
is obtained by
.
Next: Computation Time.
Up: Implementation
Previous: Implementation
Yoda
2000-11-20