igraph_isocompat_t

Type Alias igraph_isocompat_t 

Source
pub type igraph_isocompat_t = Option<unsafe extern "C" fn(graph1: *const igraph_t, graph2: *const igraph_t, g1_num: igraph_int_t, g2_num: igraph_int_t, arg: *mut c_void) -> igraph_bool_t>;
Expand description

\typedef igraph_isocompat_t Callback type, called to check whether two vertices or edges are compatible

VF2 (subgraph) isomorphism functions can be restricted by defining relations on the vertices and/or edges of the graphs, and then checking whether the vertices (edges) match according to these relations.

This feature is implemented by two callbacks, one for vertices, one for edges. Every time igraph tries to match a vertex (edge) of the first (sub)graph to a vertex of the second graph, the vertex (edge) compatibility callback is called. The callback returns a logical value, giving whether the two vertices match.

Both callback functions are of type \c igraph_isocompat_t. \param graph1 The first graph. \param graph2 The second graph. \param g1_num The id of a vertex or edge in the first graph. \param g2_num The id of a vertex or edge in the second graph. \param arg Extra argument to pass to the callback functions. \return Logical scalar, whether vertex (or edge) \p g1_num in \p graph1 is compatible with vertex (or edge) \p g2_num in \p graph2.

Aliased Type§

pub enum igraph_isocompat_t {
    None,
    Some(unsafe extern "C" fn(*const igraph_t, *const igraph_t, i64, i64, *mut c_void) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*const igraph_t, *const igraph_t, i64, i64, *mut c_void) -> bool)

Some value of type T.