示例#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);