def aux_build_time_scalar_indexing_structure_for_a_node(self, graph, node_id, parents_indxs, parents_labels, parents_vals):
    node_states = graph.get_states_number(node_id)
    time_scalar_indexing = NetworkGraph.build_time_scalar_indexing_structure_for_a_node(node_states, parents_vals)
    self.assertEqual(len(time_scalar_indexing), (len(parents_indxs) + 1))
    merged_list = parents_labels[:]
    merged_list.insert(0, node_id)
    vals_list = []
    for node in merged_list:
        vals_list.append(graph.get_states_number(node))
    t_vec = np.array(vals_list)
    t_vec = t_vec.cumprod()
    self.assertTrue(np.array_equal(time_scalar_indexing, t_vec))
def aux_build_time_scalar_indexing_structure_for_a_node(self, graph, node_id, parents_indxs, parents_labels, parents_vals):
    node_states = graph.get_states_number(node_id)
    time_scalar_indexing = NetworkGraph.build_time_scalar_indexing_structure_for_a_node(node_states, parents_vals)
    self.assertEqual(len(time_scalar_indexing), (len(parents_indxs) + 1))
    merged_list = parents_labels[:]
    merged_list.insert(0, node_id)
    vals_list = []
    for node in merged_list:
        vals_list.append(graph.get_states_number(node))
    t_vec = np.array(vals_list)
    t_vec = t_vec.cumprod()
    self.assertTrue(np.array_equal(time_scalar_indexing, t_vec))