コード例 #1
0
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 def testBidirListConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR, conn_represent = conn_represent.LIST);
     self.templateBidirListConnectionsTest(net);     
コード例 #12
0
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 def testNoneConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.NONE, conn_represent = conn_represent.LIST);
     self.templateNoneConnectionsTest(net);
コード例 #13
0
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 def testAllToAllConnectionsListRepresentation(self):
     net = network(10, type_conn = conn_type.ALL_TO_ALL, conn_represent = conn_represent.LIST);
     self.templateAllToAllConnectionsTest(net);        
コード例 #14
0
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 def testGridEightConnections1ListRepresentation(self):
     net = network(1, type_conn = conn_type.GRID_EIGHT, conn_repr = conn_represent.LIST);
     self.templateGridEightConnectionsTest(net);
コード例 #18
0
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 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
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 def testNoneConnections(self):
     net = network(10, type_conn = conn_type.NONE);
     self.templateNoneConnectionsTest(net);
コード例 #27
0
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: nnet_tests.py プロジェクト: alishakiba/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 def testBidirListConnections(self):
     net = network(10, type_conn = conn_type.LIST_BIDIR);
     self.templateBidirListConnectionsTest(net);
コード例 #41
0
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 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
ファイル: ut_nnet.py プロジェクト: annoviko/pyclustering
 def testAllToAll25Connections(self):
     net = network(25, type_conn = conn_type.ALL_TO_ALL);
     self.templateAllToAllConnectionsTest(net);