예제 #1
0
 def templateAssertRaises(self, size, type_conn, height, width):
     try:
         network(size, type_conn, height, width);
         assert(False); # assert must occure
         
     except:
         pass;
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
    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)
예제 #6
0
 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)
예제 #7
0
 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)
예제 #8
0
 def testGridFourConnectionsListRepresentation(self):
     net = network(25,
                   type_conn=conn_type.GRID_FOUR,
                   conn_represent=conn_represent.LIST)
     self.templateGridFourConnectionsTest(net)
예제 #9
0
 def testBidirListConnections(self):
     net = network(10, type_conn=conn_type.LIST_BIDIR)
     self.templateBidirListConnectionsTest(net)
예제 #10
0
 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)
예제 #11
0
 def testBidirListConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR, conn_represent = conn_represent.LIST);
     self.templateBidirListConnectionsTest(net);     
예제 #12
0
 def testNoneConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.NONE, conn_represent = conn_represent.LIST);
     self.templateNoneConnectionsTest(net);
예제 #13
0
 def testAllToAllConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.ALL_TO_ALL, conn_represent = conn_represent.LIST);
     self.templateAllToAllConnectionsTest(net);        
예제 #14
0
 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);
예제 #15
0
 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);
예제 #16
0
 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);        
예제 #17
0
 def testGridEightConnections1ListRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST);
     self.templateGridEightConnectionsTest(net);
예제 #18
0
 def testGridEightConnections1MatrixRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_EIGHT);
     self.templateGridEightConnectionsTest(net);
예제 #19
0
 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);
예제 #20
0
 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);
예제 #21
0
 def testGridEightConnections1MatrixRepresentation(self):
     net = network(1, type_conn=conn_type.GRID_EIGHT)
     self.templateGridEightConnectionsTest(net)
예제 #22
0
 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);
예제 #23
0
 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);
예제 #24
0
 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);
예제 #25
0
 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);
예제 #26
0
 def testNoneConnections(self):
     net = network(10, type_conn = conn_type.NONE);
     self.templateNoneConnectionsTest(net);
예제 #27
0
 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);
예제 #28
0
 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);
예제 #29
0
 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);
예제 #30
0
 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)
예제 #31
0
 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);
예제 #32
0
 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)
예제 #33
0
 def testAllToAll25Connections(self):
     net = network(25, type_conn=conn_type.ALL_TO_ALL)
     self.templateAllToAllConnectionsTest(net)
예제 #34
0
 def testBidirListConnectionsListRepresentation(self):
     net = network(10,
                   type_conn=conn_type.LIST_BIDIR,
                   conn_represent=conn_represent.LIST)
     self.templateBidirListConnectionsTest(net)
예제 #35
0
 def testNoneConnections(self):
     net = network(10, type_conn=conn_type.NONE)
     self.templateNoneConnectionsTest(net)
예제 #36
0
 def testGridFourConnections1MatrixRepresentation(self):
     net = network(1, type_conn=conn_type.GRID_FOUR)
     self.templateGridFourConnectionsTest(net)
예제 #37
0
 def testGridFourConnectionsListRepresentation(self):
     net = network(25, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST);
     self.templateGridFourConnectionsTest(net);
예제 #38
0
 def testGridEightConnections1ListRepresentation(self):
     net = network(1,
                   type_conn=conn_type.GRID_EIGHT,
                   conn_represent=conn_represent.LIST)
     self.templateGridEightConnectionsTest(net)
예제 #39
0
 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);
예제 #40
0
 def testBidirListConnections(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR);
     self.templateBidirListConnectionsTest(net);
예제 #41
0
 def testGridFourConnections1MatrixRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_FOUR);
     self.templateGridFourConnectionsTest(net);
예제 #42
0
 def testAllToAll25ConnectionsListRepresentation(self):
     net = network(25,
                   type_conn=conn_type.ALL_TO_ALL,
                   conn_represent=conn_represent.LIST)
     self.templateAllToAllConnectionsTest(net)
예제 #43
0
 def testAllToAll10Connections(self):
     net = network(10, type_conn = conn_type.ALL_TO_ALL);
     self.templateAllToAllConnectionsTest(net);
예제 #44
0
 def testNoneConnectionsListRepresentation(self):
     net = network(10,
                   type_conn=conn_type.NONE,
                   conn_represent=conn_represent.LIST)
     self.templateNoneConnectionsTest(net)
예제 #45
0
 def testAllToAll25Connections(self):
     net = network(25, type_conn = conn_type.ALL_TO_ALL);
     self.templateAllToAllConnectionsTest(net);