Skip to content

Node/Edge layer filter #2260

@shivamka1

Description

@shivamka1

add_edge(1, 1, 2, {"p1": "pometry"}, "water_tribe")
add_edge(2, 1, 3, {"p1": "pometry"}, "fire_nation")

graph.edge(1,2).layer("fire_nation").history would be empty but src and dst are not tied to the layer result
graph.edge(1,2).layer("fire_nation").src().degree() == 1
graph.edge(1,2).layer("fire_nation").dst().name() == 2

filter.Edge.layer("fire_nation").src().name() == "pometry" -> equivalent to not having layer at all because src.name doesn't depend on layer.

filter.Edge.layer("fire_nation").history() == [2] -> matches edge (1,3)
filter.Edge.layer("fire_nation").history().len() == 1 -> matches edge (1,3), other agg supported
filter.Edge.src().layer("fire_nation").property("p1") (A)
filter.Edge.layer("fire_nation").src().property("p1") (B)
A and B are equivalent and since layer is applied to the src which is a node and node property is not influenced by layer, this layer filter basically has no effect but that is not the case with the edge property:
filter.Edge.layer("fire_nation").property("p1") == "pometry" -> matches edge (1,3)

filter.Node.layer("fire_nation").property("p1") -> property is not influenced by layer as of now but history, degree etc do.
filter.Node.layer("fire_nation").degree() == 2 -> filters the node edges by layer
filter.Node.layer("fire_nation").history().len() == 2 -> filters the node edges by layer

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions