- Add swap() method signature to SchedulableQueue
- Export swap() to SWIG - Add sort function (just its documentation, actually, implementation will follow) to Policy.py git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@385 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
eecb9f109f
commit
47451bf78d
3 changed files with 34 additions and 0 deletions
|
@ -1,5 +1,22 @@
|
|||
from Abstract import *
|
||||
|
||||
## @brief this function implements a quicksort in place
|
||||
# using the SchedulableQueue methods
|
||||
#
|
||||
# The compare parameter should be a user defined function
|
||||
# name returning either True or False, defined like:
|
||||
# @code
|
||||
# def compare(SchedulableA,SchedulableB):
|
||||
# return SchedulableA.someProperty() < SchedulableB.someProperty()
|
||||
# @endcode
|
||||
#
|
||||
# @param queue The SchedulableQueue to be sorted in place
|
||||
# @param cmp The binary function to use to compare elements
|
||||
# @returns None
|
||||
def sort(queue, cmp):
|
||||
pass
|
||||
|
||||
|
||||
class Policy:
|
||||
## @var Avoid instantiation of an abstract class
|
||||
__metaclass__ = Metaclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue