This PR addresses #14 by introducing a new script argument neighbor_type: str that allows defining when two cells of same rank will be considered neighbors. The possible values for this argument are:
adjacency: 2 cells with rank i are neighbors if they are both subsets of another cell with rank i + 1
any_adjacency: 2 cells with rank i are neighbors if they are both subsets of another cell with rank j > i
coadjacency: 2 cells with rank i are neighbors if they are both supersets of another cell with rank i - 1
any_coadjacency: 2 cells with rank i are neighbors if they are both supersets of another cell with rank j < i
direct: 2 cells with rank i are neighbors if they are adjacent or coadjacent
all: 2 cells with rank i are neighbors if any of the above holds.
If we add a supernode representing the graph and pick either any_adjacency or all, all cells with the same rank will be connected to each other.
After writing unit tests for the new methods, our code coverage increased to 37% :partying_face:
This PR addresses #14 by introducing a new script argument
neighbor_type: str
that allows defining when two cells of same rank will be considered neighbors. The possible values for this argument are:adjacency
: 2 cells with ranki
are neighbors if they are both subsets of another cell with ranki + 1
any_adjacency
: 2 cells with ranki
are neighbors if they are both subsets of another cell with rankj > i
coadjacency
: 2 cells with ranki
are neighbors if they are both supersets of another cell with ranki - 1
any_coadjacency
: 2 cells with ranki
are neighbors if they are both supersets of another cell with rankj < i
direct
: 2 cells with ranki
are neighbors if they areadjacent
orcoadjacent
all
: 2 cells with ranki
are neighbors if any of the above holds.If we add a supernode representing the graph and pick either
any_adjacency
orall
, all cells with the same rank will be connected to each other.After writing unit tests for the new methods, our code coverage increased to 37% :partying_face: