MOAL.data_structures.linear.lists package¶
Submodules¶
MOAL.data_structures.linear.lists.free_list module¶
-
class
MOAL.data_structures.linear.lists.free_list.
MemoryManager
[source]¶ -
__init__
()¶
-
__str__
()¶
-
_divvy_ram
(ram)¶ This is an arbitrary, somewhat meaningless method, to simulate the notion of free blocks of ram that must be allocated and referenced via pointer. A given program may require X ram, but the location of available ram may be disparate, so various blocks have to be stored as a free linked list, or similar data structure. Since we’ve already covered linked lists, association lists, etc..., there isn’t much value outside learning the context of this data structure, which tends to be in memory management.
-
free
(item)¶
-
malloc
(item, ram)¶
-
MOAL.data_structures.linear.lists.skip_lists module¶
-
class
MOAL.data_structures.linear.lists.skip_lists.
SkipList
[source]¶ -
__init__
()¶
-
_balance_length
(node)¶
-
find
(elem, updated=None)¶ Finds an item in the list. Allows the optional updated flag to be passed in, which represents an updated copy to search from instead.
-
insert
(elem)¶
-
random_height
()¶
-
remove
(elem)¶
-
update_list
(elem)¶
-
view
()¶
-