Skip to content

Commit

Permalink
test: Type 2-2 interval matrix M, N tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej DRAGANOV committed May 21, 2024
1 parent 2d3c4f0 commit fdfff37
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ def test_matrix_N_type_3_1(self):
matrix = self.rep.construct_matrix_N_tot(interval)
assert (matrix == []).all()

def test_matrix_M_type_2_2(self):
interval = Interval([(0, 1), (1, 0)], [(2, 1), (1, 2)])
matrix = self.rep.construct_matrix_M_tot(interval)
assert (matrix == [[0., -0., -0.],
[1., -0., -0.]]).all()

def test_matrix_N_type_2_2(self):
interval = Interval([(0, 1), (1, 0)], [(2, 1), (1, 2)])
matrix = self.rep.construct_matrix_N_tot(interval)
assert (matrix == [[1., 0.],
[0., 1.],
[-1., -0.],
[-0., -0.]]).all()

def test_interval_rank_type_3_1(self):
interval = Interval([(2, 0), (1, 1), (0, 2)], [(2, 2)])
assert self.rep.int_rank(interval) == 0
Expand Down

0 comments on commit fdfff37

Please sign in to comment.