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