is_adjacent#

is_adjacent(domain, network_name=None, population_A=None, population_B=None, bypass_checks=None)#

Get a boolean array indicating whether each object in population_A is adjacent to at least one object in population_B in the specified network.

Parameters:
domainobject

The domain containing the objects and network of interest.

network_namestr, optional

The name of the network within the domain from which to get edges, by default None.

population_Aquery-like, optional

The set of objects in the networks of interest to query for adjacency to objects from population_B. If None, all objects in the domain are selected, by default None.

population_Bquery-like, optional

The set of objects in the networks of interest to query for adjacency to objects from population_A. If None, all objects in the domain are selected, by default None.

bypass_checkslist of str, optional

A list of checks to bypass when interpreting the queries. This is passed to the return_object_IDs_from_query_like function. If None, no checks are bypassed, by default None.

Returns:
is_connected_to_Bnumpy.ndarray

A boolean array of the same length as the number of objects in population_A, where each element is True if the corresponding object in population_A is adjacent to at least one object in population_B, and False otherwise.

object_indices_Anumpy.ndarray

The indices of the objects in population_A that were checked for adjacency to population_B.