Esempio n. 1
0
 def templateAssertRaises(self, size, type_conn, height, width):
     try:
         network(size, type_conn, height, width);
         assert(False); # assert must occure
         
     except:
         pass;
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 8
0
 def testGridFourConnectionsListRepresentation(self):
     net = network(25,
                   type_conn=conn_type.GRID_FOUR,
                   conn_represent=conn_represent.LIST)
     self.templateGridFourConnectionsTest(net)
Esempio n. 9
0
 def testBidirListConnections(self):
     net = network(10, type_conn=conn_type.LIST_BIDIR)
     self.templateBidirListConnectionsTest(net)
Esempio n. 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)
Esempio n. 11
0
 def testBidirListConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR, conn_represent = conn_represent.LIST);
     self.templateBidirListConnectionsTest(net);     
Esempio n. 12
0
 def testNoneConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.NONE, conn_represent = conn_represent.LIST);
     self.templateNoneConnectionsTest(net);
Esempio n. 13
0
 def testAllToAllConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.ALL_TO_ALL, conn_represent = conn_represent.LIST);
     self.templateAllToAllConnectionsTest(net);        
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);        
Esempio n. 17
0
 def testGridEightConnections1ListRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST);
     self.templateGridEightConnectionsTest(net);
Esempio n. 18
0
 def testGridEightConnections1MatrixRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_EIGHT);
     self.templateGridEightConnectionsTest(net);
Esempio n. 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);
Esempio n. 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);
Esempio n. 21
0
 def testGridEightConnections1MatrixRepresentation(self):
     net = network(1, type_conn=conn_type.GRID_EIGHT)
     self.templateGridEightConnectionsTest(net)
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);
Esempio n. 26
0
 def testNoneConnections(self):
     net = network(10, type_conn = conn_type.NONE);
     self.templateNoneConnectionsTest(net);
Esempio n. 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);
Esempio n. 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);
Esempio n. 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);
Esempio n. 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)
Esempio n. 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);
Esempio n. 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)
Esempio n. 33
0
 def testAllToAll25Connections(self):
     net = network(25, type_conn=conn_type.ALL_TO_ALL)
     self.templateAllToAllConnectionsTest(net)
Esempio n. 34
0
 def testBidirListConnectionsListRepresentation(self):
     net = network(10,
                   type_conn=conn_type.LIST_BIDIR,
                   conn_represent=conn_represent.LIST)
     self.templateBidirListConnectionsTest(net)
Esempio n. 35
0
 def testNoneConnections(self):
     net = network(10, type_conn=conn_type.NONE)
     self.templateNoneConnectionsTest(net)
Esempio n. 36
0
 def testGridFourConnections1MatrixRepresentation(self):
     net = network(1, type_conn=conn_type.GRID_FOUR)
     self.templateGridFourConnectionsTest(net)
Esempio n. 37
0
 def testGridFourConnectionsListRepresentation(self):
     net = network(25, type_conn = conn_type.GRID_FOUR, conn_repr = conn_represent.LIST);
     self.templateGridFourConnectionsTest(net);
Esempio n. 38
0
 def testGridEightConnections1ListRepresentation(self):
     net = network(1,
                   type_conn=conn_type.GRID_EIGHT,
                   conn_represent=conn_represent.LIST)
     self.templateGridEightConnectionsTest(net)
Esempio n. 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);
Esempio n. 40
0
 def testBidirListConnections(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR);
     self.templateBidirListConnectionsTest(net);
Esempio n. 41
0
 def testGridFourConnections1MatrixRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_FOUR);
     self.templateGridFourConnectionsTest(net);
Esempio n. 42
0
 def testAllToAll25ConnectionsListRepresentation(self):
     net = network(25,
                   type_conn=conn_type.ALL_TO_ALL,
                   conn_represent=conn_represent.LIST)
     self.templateAllToAllConnectionsTest(net)
Esempio n. 43
0
 def testAllToAll10Connections(self):
     net = network(10, type_conn = conn_type.ALL_TO_ALL);
     self.templateAllToAllConnectionsTest(net);
Esempio n. 44
0
 def testNoneConnectionsListRepresentation(self):
     net = network(10,
                   type_conn=conn_type.NONE,
                   conn_represent=conn_represent.LIST)
     self.templateNoneConnectionsTest(net)
Esempio n. 45
0
 def testAllToAll25Connections(self):
     net = network(25, type_conn = conn_type.ALL_TO_ALL);
     self.templateAllToAllConnectionsTest(net);