sivtools.data_structures package

Submodules

sivtools.data_structures.deque module

Linked list implementation of Deque

class sivtools.data_structures.deque.Deque

Bases: object

append_left(value)
append_right(value)
is_empty()
pop_left()
pop_right()
size()

Get size of Deque

class sivtools.data_structures.deque.Node(value, prev_node, next_node)

Bases: object

sivtools.data_structures.linked_list module

Implementation of Python list using Linked List

class sivtools.data_structures.linked_list.LinkedList(items=None)

Bases: object

List implemented via Linked List

append(item)

Add item to back of list

index(value)

Return the index of the first item in value

insert(index, value)

Inserts value at index

is_empty()

Checks to see if list is empty

pop(index=None)

Pop element at index from list and return

class sivtools.data_structures.linked_list.Node(data, next_=None)

Bases: object

Node that holds data and a link to the next node

sivtools.data_structures.mapping module

Mapping like data structures

class sivtools.data_structures.mapping.DotDict(mapping)

Bases: object

Dictionary that allows for the retrival of items via dot notation

Can only access keys that are valid identifiers as defined by str.isidentifier

sivtools.data_structures.stack module

Linked list implementation of Stack

class sivtools.data_structures.stack.Node(value, next_node)

Bases: object

class sivtools.data_structures.stack.Stack

Bases: object

is_empty()
pop()
push(value)

Push item into stack

size()

Module contents