structure module

class structure.Structure(nodes_labels_list: List, nodes_indexes_arr: numpy.ndarray, nodes_vals_arr: numpy.ndarray, edges_list: List, total_variables_number: int)

Bases: object

Contains all the infos about the network structure(nodes labels, nodes caridinalites, edges, indexes)

Parameters
  • nodes_labels_list (List) – the symbolic names of the variables

  • nodes_indexes_arr (numpy.ndArray) – the indexes of the nodes

  • nodes_vals_arr (numpy.ndArray) – the cardinalites of the nodes

  • edges_list (List) – the edges of the network

  • total_variables_number (int) – the total number of variables in the net

property edges
get_node_id(node_indx: int) → str

Given the node_index returns the node label.

Parameters

node_indx (int) – the node index

Returns

the node label

Return type

string

get_node_indx(node_id: str) → int

Given the node_index returns the node label.

Parameters

node_id (string) – the node label

Returns

the node index

Return type

int

get_positional_node_indx(node_id: str) → int
get_states_number(node: str) → int

Given the node label node returns the cardinality of the node.

Parameters

node (string) – the node label

Returns

the node cardinality

Return type

int

property nodes_indexes
property nodes_labels
property nodes_values
property total_variables_number