class_docstr: Contains unit tests for the TransportNNDistanceComputer class. 
docstr: Tests the connectivity cost matrix for specific pairs of neural networks.  
docstr_tok: ["Tests","the","connectivity","cost","matrix","for","specific","pairs","of","neural","networks","."]
code: def test_connectivity_cost_matrix(self):
      """Tests the connectivity cost matrix for specific pairs of neural networks."""
      self.report(
          "Testing generation of connectivity cost matrices for specific cnns."
      )
      num_cnns = len(self.cnns)
      for i in range(num_cnns):
          for j in range(i, num_cnns):
              cnn_i = self.cnns[i]
              cnn_j = self.cnns[j]
              struct_cost_matrix = self.tp_comp.get_struct_cost_matrix(
                  cnn_i, cnn_j
              )
              assert struct_cost_matrix.shape[0] == cnn_i.num_layers
              assert struct_cost_matrix.shape[1] == cnn_j.num_layers
              if i == j:
                  assert self._is_cost_matrix_for_same_networks(
                      struct_cost_matrix
                  )
              if i == 0 and j == 1:
                  # These two matrices were designed so that there has to be a zero for each
                  # column on each row and vice versa.
                  assert self._has_corresponding_layers(
                      struct_cost_matrix
                  )
              if (
                  (i == 2 and j == 3)
                  or (i == 0 and j == 1)
                  or (i == 1 and j == 6)
              ):
                  self.report(
                      "Structural cost matrix for cnn-%d and cnn-%d:\n%s"
                      % (i, j, str(np.round(struct_cost_matrix, 3))),
                      "test_result",
                  )
  
imports: import numpy
  from .None import otmann
  from .unittest_neural_network import generate_cnn_architectures, generate_mlp_architectures
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 7 for calling the TransportNNDistanceComputerTestCase obj's underlying member method code with example usage: obj.test_connectivity_cost_matrix() without return types