Bounded monotonous priority queue: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Test") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | |||
[[Category:Checkup]] | |||
[[Category:Abstract Data Structure]] | |||
[[Category:Sequence]] | |||
== General information == | |||
'''Representation invariant:''' | |||
Identical to [[Bounded prority queue]] | |||
== Method == | |||
'''Name:''' insert | |||
Identical to [[Bounded prority queue]] | |||
== Method == | |||
'''Name:''' extract minimum | |||
Identical to [[Bounded prority queue]] | |||
== Method == | |||
'''Name:''' find minimum | |||
Identical to [[Bounded prority queue]] | |||
== Method == | |||
'''Name:''' decrease key | |||
Identical to [[Bounded prority queue]] except for: | |||
'''Precondition:''' | |||
# All preconditions of that method in [[Bounded prority queue]] | |||
# The value of <math>x</math> is not smaller than the current minimum value. | |||
== Method == | |||
'''Name:''' number | |||
Identical to [[Bounded prority queue]] | |||
== Known implementations == | |||
# All implementations of [[Bounded priority queue]] | |||
# [[Dial implementation]] | |||
== Remark == | |||
As the known implementations show, [[Bounded priority queue]] should be derived Bounded monotonous priority queue rather than the other way round, to avoid a violation of the Liskov substitution principle. | |||
== Reference == |
Revision as of 06:44, 7 October 2014
General information
Representation invariant: Identical to Bounded prority queue
Method
Name: insert
Identical to Bounded prority queue
Method
Name: extract minimum
Identical to Bounded prority queue
Method
Name: find minimum
Identical to Bounded prority queue
Method
Name: decrease key
Identical to Bounded prority queue except for:
Precondition:
- All preconditions of that method in Bounded prority queue
- The value of [math]\displaystyle{ x }[/math] is not smaller than the current minimum value.
Method
Name: number
Identical to Bounded prority queue
Known implementations
- All implementations of Bounded priority queue
- Dial implementation
Remark
As the known implementations show, Bounded priority queue should be derived Bounded monotonous priority queue rather than the other way round, to avoid a violation of the Liskov substitution principle.