Пример #1
0
 def check_current_joins_three_one_edge_case5(self, next_row):
   cds = CDS(self.session, 3, 2)
   self.session.run(tf.global_variables_initializer())
   cds.initialize(["l0_c0", "l0_c1", "l0_c2"])
   cds.joins([(0, 1)], (next_row, 1), "next")
   self.assertEqual([((0, 0), "l0_c0"), ((next_row, 1), "next"), ((0, 2), "l0_c2")], cds.current())
Пример #2
0
 def test_current_joins_initialize_three(self):
   cds = CDS(self.session, 3, 1)
   self.session.run(tf.global_variables_initializer())
   cds.initialize(["l0_c0", "l0_c1", "l0_c2"])
   self.assertEqual([((0, 0), "l0_c0"), ((0, 1), "l0_c1"), ((0, 2), "l0_c2")], cds.current())
Пример #3
0
 def test_current_joins_initialize_one(self):
   cds = CDS(self.session, 1, 1)
   self.session.run(tf.global_variables_initializer())
   cds.initialize(["l0_c0"])
   self.assertEqual([((0, 0), "l0_c0")], cds.current())
Пример #4
0
 def check_current_joins_three_three_edges_case1(self, to_column):
   cds = CDS(self.session, 3, 2)
   self.session.run(tf.global_variables_initializer())
   cds.initialize(["l0_c0", "l0_c1", "l0_c2"])
   cds.joins([(0, 0), (0, 1), (0, 2)], (1, to_column), "next")
   self.assertEqual([((1, to_column), "next")], cds.current())
Пример #5
0
 def test_current_empty(self):
   cds = CDS(self.session, 1, 1)
   self.session.run(tf.global_variables_initializer())
   self.assertEqual([], cds.current())