Skip to content

PathFromGraph #

Bases: object

earliest_date_time property #

Returns the earliest date time of the nodes.

Returns:

Type Description
NestedUtcDateTimeIterable

earliest_time property #

The node earliest times.

Returns:

Type Description
NestedOptionI64Iterable

edges property #

Get the edges that are incident to this node.

Returns:

 NestedEdges: The incident edges.

end property #

Gets the latest time that this PathFromGraph is valid.

Returns:

Type Description
Optional[int]

The latest time that this PathFromGraph is valid or None if the PathFromGraph is valid for all times.

end_date_time property #

Gets the latest datetime that this PathFromGraph is valid

Returns:

Type Description
Optional[datetime]

The latest datetime that this PathFromGraph is valid or None if the PathFromGraph is valid for all times.

id property #

The node ids

Returns:

Type Description
NestedGIDIterable

in_edges property #

Get the edges that point into this node.

Returns:

 NestedEdges: The inbound edges.

in_neighbours property #

Get the neighbours of this node that point into this node.

Returns:

 PathFromGraph: The in-neighbours.

latest_date_time property #

Returns the latest date time of the nodes.

Returns:

Type Description
NestedUtcDateTimeIterable

latest_time property #

The node latest times.

Returns:

Type Description
NestedOptionI64Iterable

metadata property #

Returns the node metadata.

Returns:

Type Description
MetadataListList

name property #

The node names.

Returns:

Type Description
NestedStringIterable

neighbours property #

Get the neighbours of this node.

Returns:

 PathFromGraph: The neighbours (both inbound and outbound).

node_type property #

The node types.

Returns:

Type Description
NestedOptionArcStringIterable

out_edges property #

Get the edges that point out of this node.

Returns:

 NestedEdges: The outbound edges.

out_neighbours property #

Get the neighbours of this node that point out of this node.

Returns:

 PathFromGraph: The out-neighbours.

properties property #

Returns the node properties.

Returns:

Type Description
NestedPropsIterable

start property #

Gets the start time for rolling and expanding windows for this PathFromGraph

Returns:

Type Description
Optional[int]

The earliest time that this PathFromGraph is valid or None if the PathFromGraph is valid for all times.

start_date_time property #

Gets the earliest datetime that this PathFromGraph is valid

Returns:

Type Description
Optional[datetime]

The earliest datetime that this PathFromGraph is valid or None if the PathFromGraph is valid for all times.

window_size property #

Get the window size (difference between start and end) for this PathFromGraph

Returns:

Type Description
Optional[int]

__bool__() #

True if self else False

__iter__() #

Implement iter(self).

__len__() #

Return len(self).

__repr__() #

Return repr(self).

after(start) #

Create a view of the PathFromGraph including all events after start (exclusive).

Parameters:

Name Type Description Default
start TimeInput

The start time of the window.

required

Returns:

Type Description
PathFromGraph

at(time) #

Create a view of the PathFromGraph including all events at time.

Parameters:

Name Type Description Default
time TimeInput

The time of the window.

required

Returns:

Type Description
PathFromGraph

before(end) #

Create a view of the PathFromGraph including all events before end (exclusive).

Parameters:

Name Type Description Default
end TimeInput

The end time of the window.

required

Returns:

Type Description
PathFromGraph

collect() #

Collect all nodes into a list

Returns:

Type Description
list[list[Node]]

the list of nodes

default_layer() #

Return a view of PathFromGraph containing only the default edge layer Returns: PathFromGraph: The layered view

degree() #

Returns the node degrees.

Returns:

Type Description
NestedUsizeIterable

edge_history_count() #

Returns the number of edge updates for each node.

Returns:

Type Description
NestedUsizeIterable

exclude_layer(name) #

Return a view of PathFromGraph containing all layers except the excluded name Errors if any of the layers do not exist.

Parameters:

Name Type Description Default
name str

layer name that is excluded for the new view

required

Returns:

Type Description
PathFromGraph

The layered view

exclude_layers(names) #

Return a view of PathFromGraph containing all layers except the excluded names Errors if any of the layers do not exist.

Parameters:

Name Type Description Default
names list[str]

list of layer names that are excluded for the new view

required

Returns:

Type Description
PathFromGraph

The layered view

exclude_valid_layer(name) #

Return a view of PathFromGraph containing all layers except the excluded name Arguments: name (str): layer name that is excluded for the new view

Returns:

Type Description
PathFromGraph

The layered view

exclude_valid_layers(names) #

Return a view of PathFromGraph containing all layers except the excluded names Arguments: names (list[str]): list of layer names that are excluded for the new view

Returns:

Type Description
PathFromGraph

The layered view

expanding(step) #

Creates a WindowSet with the given step size using an expanding window.

An expanding window is a window that grows by step size at each iteration.

Parameters:

Name Type Description Default
step int | str

The step size of the window.

required

Returns:

Type Description
WindowSet

A WindowSet object.

filter_edges(filter) #

Return a filtered view that only includes edges that satisfy the filter

Parameters:

Name Type Description Default
filter FilterExpr

The filter to apply to the edges.

required

Returns:

Type Description
PathFromGraph

The filtered view

filter_exploded_edges(filter) #

Return a filtered view that only includes exploded edges that satisfy the filter

Parameters:

Name Type Description Default
filter FilterExpr

The filter to apply to the exploded edge properties.

required

Returns:

Type Description
PathFromGraph

The filtered view

filter_nodes(filter) #

Return a filtered view that only includes nodes that satisfy the filter

Parameters:

Name Type Description Default
filter FilterExpr

The filter to apply to the nodes.

required

Returns:

Type Description
PathFromGraph

The filtered view

has_layer(name) #

Check if PathFromGraph has the layer "name"

Parameters:

Name Type Description Default
name str

the name of the layer to check

required

Returns:

Type Description
bool

history() #

Returns all timestamps of nodes, when an node is added or change to an node is made.

Returns:

Type Description
NestedI64VecIterable

history_date_time() #

Returns all timestamps of nodes, when an node is added or change to an node is made.

Returns:

Type Description
NestedVecUtcDateTimeIterable

in_degree() #

Returns the node in-degrees.

Returns:

Type Description
NestedUsizeIterable

latest() #

Create a view of the PathFromGraph including all events at the latest time.

Returns:

Type Description
PathFromGraph

layer(name) #

Return a view of PathFromGraph containing the layer "name" Errors if the layer does not exist

Parameters:

Name Type Description Default
name str

then name of the layer.

required

Returns:

Type Description
PathFromGraph

The layered view

layers(names) #

Return a view of PathFromGraph containing all layers names Errors if any of the layers do not exist.

Parameters:

Name Type Description Default
names list[str]

list of layer names for the new view

required

Returns:

Type Description
PathFromGraph

The layered view

out_degree() #

Returns the node out-degrees.

Returns:

Type Description
NestedUsizeIterable

rolling(window, step=None) #

Creates a WindowSet with the given window size and optional step using a rolling window.

A rolling window is a window that moves forward by step size at each iteration.

Parameters:

Name Type Description Default
window int | str

The size of the window.

required
step int | str | None

The step size of the window. step defaults to window.

None

Returns:

Type Description
WindowSet

A WindowSet object.

shrink_end(end) #

Set the end of the window to the smaller of end and self.end()

Parameters:

Name Type Description Default
end TimeInput

the new end time of the window

required

Returns: PathFromGraph:

shrink_start(start) #

Set the start of the window to the larger of start and self.start()

Parameters:

Name Type Description Default
start TimeInput

the new start time of the window

required

Returns:

Type Description
PathFromGraph

shrink_window(start, end) #

Shrink both the start and end of the window (same as calling shrink_start followed by shrink_end but more efficient)

Parameters:

Name Type Description Default
start TimeInput

the new start time for the window

required
end TimeInput

the new end time for the window

required

Returns:

Type Description
PathFromGraph

snapshot_at(time) #

Create a view of the PathFromGraph including all events that have not been explicitly deleted at time.

This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph

Parameters:

Name Type Description Default
time TimeInput

The time of the window.

required

Returns:

Type Description
PathFromGraph

snapshot_latest() #

Create a view of the PathFromGraph including all events that have not been explicitly deleted at the latest time.

This is equivalent to a no-op for Graph and latest() for PersistentGraph

Returns:

Type Description
PathFromGraph

type_filter(node_types) #

filter nodes by type

Parameters:

Name Type Description Default
node_types list[str]

the node types to keep

required

Returns:

Type Description
PathFromGraph

the filtered view

valid_layers(names) #

Return a view of PathFromGraph containing all layers names Any layers that do not exist are ignored

Parameters:

Name Type Description Default
names list[str]

list of layer names for the new view

required

Returns:

Type Description
PathFromGraph

The layered view

window(start, end) #

Create a view of the PathFromGraph including all events between start (inclusive) and end (exclusive)

Parameters:

Name Type Description Default
start TimeInput | None

The start time of the window (unbounded if None).

required
end TimeInput | None

The end time of the window (unbounded if None).

required

Returns:

Type Description
PathFromGraph