def templateAssertRaises(self, size, type_conn, height, width): try: network(size, type_conn, height, width); assert(False); # assert must occure except: pass;
def testGridFourConnectionsRectangeList40Representation(self): net = network(40, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.LIST, height=4, width=10) self.templateGridFourConnectionsTest(net) net = network(40, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.LIST, height=10, width=4) self.templateGridFourConnectionsTest(net)
def testGridFourConnectionsRectange10MatrixRepresentation(self): net = network(10, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.MATRIX, height=1, width=10) self.templateGridFourConnectionsTest(net) net = network(10, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.MATRIX, height=10, width=1) self.templateGridFourConnectionsTest(net)
def testGridEightConnectionsRectange40MatrixRepresentation(self): net = network(40, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.MATRIX, height=4, width=10) self.templateGridEightConnectionsTest(net) net = network(40, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.MATRIX, height=10, width=4) self.templateGridEightConnectionsTest(net)
def testGridEightConnectionsRectangeList1Representation(self): net = network(1, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.LIST, height=1, width=1) self.templateGridEightConnectionsTest(net) net = network(1, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.LIST, height=1, width=1) self.templateGridEightConnectionsTest(net)
def testGridEightStructure40GridProperty(self): net = network(40, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.LIST, height=20, width=2) assert (net.height == 20) assert (net.width == 2)
def testGridEightStructure1GridProperty(self): net = network(1, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.LIST, height=1, width=1) assert (net.height == 1) assert (net.width == 1)
def testGridFourConnectionsListRepresentation(self): net = network(25, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.LIST) self.templateGridFourConnectionsTest(net)
def testBidirListConnections(self): net = network(10, type_conn=conn_type.LIST_BIDIR) self.templateBidirListConnectionsTest(net)
def testAllToAllConnections(self): # Check creation of coupling between oscillator in all-to-all case net = network(10, type_conn=conn_type.ALL_TO_ALL) self.templateAllToAllConnectionsTest(net)
def testBidirListConnectionsListRepresentation(self): net = network(10, type_conn = conn_type.LIST_BIDIR, conn_represent = conn_represent.LIST); self.templateBidirListConnectionsTest(net);
def testNoneConnectionsListRepresentation(self): net = network(10, type_conn = conn_type.NONE, conn_represent = conn_represent.LIST); self.templateNoneConnectionsTest(net);
def testAllToAllConnectionsListRepresentation(self): net = network(10, type_conn = conn_type.ALL_TO_ALL, conn_represent = conn_represent.LIST); self.templateAllToAllConnectionsTest(net);
def testGridFourConnectionsRectangeList10Representation(self): net = network(10, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 1, width = 10); self.templateGridFourConnectionsTest(net); net = network(10, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 10, width = 1); self.templateGridFourConnectionsTest(net);
def testGridEightConnectionsRectange10MatrixRepresentation(self): net = network(10, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.MATRIX, height = 1, width = 10); self.templateGridEightConnectionsTest(net); net = network(10, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.MATRIX, height = 10, width = 1); self.templateGridEightConnectionsTest(net);
def testGridEightConnectionsRectangeList40Representation(self): net = network(40, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 4, width = 10); self.templateGridEightConnectionsTest(net); net = network(40, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 10, width = 4); self.templateGridEightConnectionsTest(net);
def testGridEightConnections1ListRepresentation(self): net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST); self.templateGridEightConnectionsTest(net);
def testGridEightConnections1MatrixRepresentation(self): net = network(1, type_conn = conn_type.GRID_EIGHT); self.templateGridEightConnectionsTest(net);
def testGridFourConnectionsRectangeList1Representation(self): net = network(1, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 1, width = 1); self.templateGridFourConnectionsTest(net); net = network(1, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 1, width = 1); self.templateGridFourConnectionsTest(net);
def testGridFourConnectionsRectange1MatrixRepresentation(self): net = network(1, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.MATRIX, height = 1, width = 1); self.templateGridFourConnectionsTest(net); net = network(1, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.MATRIX, height = 1, width = 1); self.templateGridFourConnectionsTest(net);
def testGridEightConnections1MatrixRepresentation(self): net = network(1, type_conn=conn_type.GRID_EIGHT) self.templateGridEightConnectionsTest(net)
def testGridEightConnectionsRectange1MatrixRepresentation(self): net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.MATRIX, height = 1, width = 1); self.templateGridEightConnectionsTest(net); net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.MATRIX, height = 1, width = 1); self.templateGridEightConnectionsTest(net);
def testGridEightConnectionsRectangeList1Representation(self): net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 1, width = 1); self.templateGridEightConnectionsTest(net); net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 1, width = 1); self.templateGridEightConnectionsTest(net);
def testAllToAllConnections(self): # Check creation of coupling between oscillator in all-to-all case net = network(10, type_conn = conn_type.ALL_TO_ALL); self.templateAllToAllConnectionsTest(net);
def testGridFourStructure1GridProperty(self): net = network(1, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 1, width = 1); assert(net.height == 1); assert(net.width == 1);
def testNoneConnections(self): net = network(10, type_conn = conn_type.NONE); self.templateNoneConnectionsTest(net);
def testGridEightStructure1GridProperty(self): net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 1, width = 1); assert(net.height == 1); assert(net.width == 1);
def testBidirListConnections(self): # Check creation of coupling between oscillator in bidirectional list case net = network(10, type_conn = conn_type.LIST_BIDIR); self.templateBidirListConnectionsTest(net);
def testGridFourStructure40GridProperty(self): net = network(40, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST, height = 20, width = 2); assert(net.height == 20); assert(net.width == 2);
def testGridFourConnectionsListRepresentation(self): # Check creation of coupling between oscillator in grid with four neighbors case net = network(25, type_conn=conn_type.GRID_FOUR, conn_represent=conn_represent.LIST) self.templateGridFourConnectionsTest(net)
def testGridEightStructure40GridProperty(self): net = network(40, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST, height = 20, width = 2); assert(net.height == 20); assert(net.width == 2);
def testBidirListConnections(self): # Check creation of coupling between oscillator in bidirectional list case net = network(10, type_conn=conn_type.LIST_BIDIR) self.templateBidirListConnectionsTest(net)
def testAllToAll25Connections(self): net = network(25, type_conn=conn_type.ALL_TO_ALL) self.templateAllToAllConnectionsTest(net)
def testBidirListConnectionsListRepresentation(self): net = network(10, type_conn=conn_type.LIST_BIDIR, conn_represent=conn_represent.LIST) self.templateBidirListConnectionsTest(net)
def testNoneConnections(self): net = network(10, type_conn=conn_type.NONE) self.templateNoneConnectionsTest(net)
def testGridFourConnections1MatrixRepresentation(self): net = network(1, type_conn=conn_type.GRID_FOUR) self.templateGridFourConnectionsTest(net)
def testGridFourConnectionsListRepresentation(self): net = network(25, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST); self.templateGridFourConnectionsTest(net);
def testGridEightConnections1ListRepresentation(self): net = network(1, type_conn=conn_type.GRID_EIGHT, conn_represent=conn_represent.LIST) self.templateGridEightConnectionsTest(net)
def testGridFourConnectionsListRepresentation(self): # Check creation of coupling between oscillator in grid with four neighbors case net = network(25, type_conn = conn_type.GRID_FOUR, conn_represent = conn_represent.LIST); self.templateGridFourConnectionsTest(net);
def testBidirListConnections(self): net = network(10, type_conn = conn_type.LIST_BIDIR); self.templateBidirListConnectionsTest(net);
def testGridFourConnections1MatrixRepresentation(self): net = network(1, type_conn = conn_type.GRID_FOUR); self.templateGridFourConnectionsTest(net);
def testAllToAll25ConnectionsListRepresentation(self): net = network(25, type_conn=conn_type.ALL_TO_ALL, conn_represent=conn_represent.LIST) self.templateAllToAllConnectionsTest(net)
def testAllToAll10Connections(self): net = network(10, type_conn = conn_type.ALL_TO_ALL); self.templateAllToAllConnectionsTest(net);
def testNoneConnectionsListRepresentation(self): net = network(10, type_conn=conn_type.NONE, conn_represent=conn_represent.LIST) self.templateNoneConnectionsTest(net)
def testAllToAll25Connections(self): net = network(25, type_conn = conn_type.ALL_TO_ALL); self.templateAllToAllConnectionsTest(net);