ETIA.CRV.queries package

Submodules

ETIA.CRV.queries.one_bidirected_path module

one_bidirected_path_from_to(matrix, start, end, path_=[])[source]

Recursive function to search for at least one bidirected path between ‘start’ node and ‘end’ node Author : kbiza@csd.uoc.gr

Args:
matrix(numpy array)matrix of size N*N where N is the number of nodes in tetrad_graph

matrix(i, j) = 2 and matrix(j, i) = 3: i–>j matrix(i, j) = 1 and matrix(j, i) = 1: io-oj matrix(i, j) = 2 and matrix(j, i) = 2: i<->j matrix(i, j) = 3 and matrix(j, i) = 3: i—j matrix(i, j) = 2 and matrix(j, i) = 1: io->j

start (int): the first node in the path end (int): the last node in the path path_ (list): only needed for the recursive call (the path under search)

Returns:

path(list) : a list of nodes we visit from start node to end node in a bidirected path

ETIA.CRV.queries.one_directed_path module

one_directed_path(matrix, start, end, path_=[])[source]

Recursive function to search for at least one directed path from ‘start’ node to ‘end’ node Author : kbiza@csd.uoc.gr

Args: matrix(numpy array): matrix of size N*N where N is the number of nodes in tetrad_graph

matrix(i, j) = 2 and matrix(j, i) = 3: i–>j matrix(i, j) = 1 and matrix(j, i) = 1: io-oj matrix(i, j) = 2 and matrix(j, i) = 2: i<->j matrix(i, j) = 3 and matrix(j, i) = 3: i—j matrix(i, j) = 2 and matrix(j, i) = 1: io->j

start(int): the first node in the path end(int): the last node in the path path_ (list): the path under search through the recursive functions

Returns:

path(list) : a list of nodes we visit from start node to end node in a directed path

ETIA.CRV.queries.one_path_anytype module

one_path_anytype(matrix, start, end, path_=[])[source]

Recursive function to search for at least one path of any type from ‘start’ node to ‘end’ node Author : kbiza@csd.uoc.gr

Args: matrix(numpy array): matrix of size N*N where N is the number of nodes in tetrad_graph

matrix(i, j) = 2 and matrix(j, i) = 3: i–>j matrix(i, j) = 1 and matrix(j, i) = 1: io-oj matrix(i, j) = 2 and matrix(j, i) = 2: i<->j matrix(i, j) = 3 and matrix(j, i) = 3: i—j matrix(i, j) = 2 and matrix(j, i) = 1: io->j

start(int): the first node in the path end(int): the last node in the path path_ (list): the path under search through the recursive functions

Returns:

path(list) : a list of nodes we visit from start node to end node in a path

ETIA.CRV.queries.one_potentially_directed_path module

one_potentially_directed_path(matrix, start, end, path_=[])[source]

Recursive function to search for at least one potentially directed path from ‘start’ node to ‘end’ node Author : kbiza@csd.uoc.gr :param matrix: matrix of size N*N where N is the number of nodes in tetrad_graph

matrix(i, j) = 2 and matrix(j, i) = 3: i–>j matrix(i, j) = 1 and matrix(j, i) = 1: io-oj matrix(i, j) = 2 and matrix(j, i) = 2: i<->j matrix(i, j) = 3 and matrix(j, i) = 3: i—j matrix(i, j) = 2 and matrix(j, i) = 1: io->j

Parameters:
  • start (int) – the first node in the path

  • end (int) – the last node in the path

  • path (list) – the path under search through the recursive functions

Returns:

a list of nodes that appear in one potentially directed path from start node to end node
  • the path has not necessarily the minimum length

Zhang Phd, 2007, page 108 :

for every 0<=i<=n-1 the edge between Vi and Vi+1 is not into Vi nor is out of Vi+1 intuitively : a path that could be oriented into a directed path by changing the

circles on the path into appropriate tails or arrowheads

Return type:

path(list)