def aux_build_transition_scalar_indexing_structure_for_a_node(self, graph, node_id, parents_indxs, parents_labels, parents_values):
    node_states = graph.get_states_number(node_id)
    transition_scalar_indexing = graph.build_transition_scalar_indexing_structure_for_a_node(node_states, parents_values)
    self.assertEqual(len(transition_scalar_indexing), (len(parents_indxs) + 2))
    merged_list = parents_labels[:]
    merged_list.insert(0, node_id)
    merged_list.insert(0, node_id)
    vals_list = []
    for node_id in merged_list:
        vals_list.append(graph.get_states_number(node_id))
    m_vec = np.array([vals_list])
    m_vec = m_vec.cumprod()
    self.assertTrue(np.array_equal(transition_scalar_indexing, m_vec))
def aux_build_transition_scalar_indexing_structure_for_a_node(self, graph, node_id, parents_indxs, parents_labels, parents_values):
    node_states = graph.get_states_number(node_id)
    transition_scalar_indexing = graph.build_transition_scalar_indexing_structure_for_a_node(node_states, parents_values)
    self.assertEqual(len(transition_scalar_indexing), (len(parents_indxs) + 2))
    merged_list = parents_labels[:]
    merged_list.insert(0, node_id)
    merged_list.insert(0, node_id)
    vals_list = []
    for node_id in merged_list:
        vals_list.append(graph.get_states_number(node_id))
    m_vec = np.array([vals_list])
    m_vec = m_vec.cumprod()
    self.assertTrue(np.array_equal(transition_scalar_indexing, m_vec))