# This is a combination of 2 commits.
# The first commit's message is:

# This is a combination of 2 commits.
# The first commit's message is:

Changes to graph_mapper.py

Switches to using `collections.defaultdict` (https://docs.python.org/2/library/collections.html)
which saves querying whether a key exists and then adding an empty set.

# This is the 2nd commit message:

Final modifications to graph mapper.

 - Remove type checks
 - Raises KeyError when objects are not in the mapper.
 - Raises ValueError when values are incorrect.

# This is the 2nd commit message:

changes to graph_mapper extra that i missed
Merge branch 'master' into neaten-graph-mapper2

Conflicts:
	pacman/model/graph_mapper/graph_mapper.py
Merge branch 'master' into neaten-graph-mapper2

Conflicts:
	pacman/model/graph_mapper/graph_mapper.py
Merge branch 'neaten-graph-mapper2' of github.com:SpiNNakerManchester/PACMAN into neaten-graph-mapper2
Fixes for graph mapper tests.

Fixes to align with API changes, some flake8 corrections.
Generalise graph/subgraph mapper.

- Removes the multiple dictionaries being used to store data about
  subvertices and subedges.  While relatively fast these seem like
  a latent bug (if further functions are added and they are no longer
  in sync).  The new accessor functions are also pretty fast.
- Added two new functions to retrieve subedges and subvertices which
  match a predicate.  These functions are used to implement
  `get_subvertices_from_vertex` and `get_partitioned_edges_from...`.
- Will remove the need for #9.
Neaten predicates in graph mapper.

Predicates passed to `get_matching_partitioned_` functions now expect
1 argument, the partitioned object.
Merge remote-tracking branch 'origin/subgraph-mapper-q2'
rweverting graph mapper to master version