These constants are used to specify the search direction for neighborhood queries.

Constant Description Example

pyvgx.D_ANY

No direction filter for arcs

Who is "x" connected to?

Neighborhood( "x", arc=("connected", D_ANY) )

pyvgx.D_IN

Require arc to be inbound (inarc)

Who likes "x"?

Neighborhood( "x", arc=("likes", D_IN) )

pyvgx.D_OUT

Require arc to be outbound (outarc)

What did "x" purchase?

Neighborhood( "x", arc=("purchase", D_OUT) )

pyvgx.D_BOTH

Require both inbound and outbound arcs

Who did "x" call who also called "x"?

Neighborhood( "x", arc("called", D_BOTH) )

1. pyvgx.D_ANY

pyvgx.D_ANY = 0

Arc filter direction wildcard.

2. pyvgx.D_IN

pyvgx.D_IN = 1

In arc filter, require arc direction to be inbound.

3. pyvgx.D_OUT

pyvgx.D_OUT = 2

In arc filter, require arc direction to be outbound.

4. pyvgx.D_BOTH

pyvgx.D_BOTH = 3

In arc filter, require the arc direction to be bi-directional, i.e. an arc matching all other filter criteria must exist in both directions between two vertices for the arc filter to match.


PYVGX