Package dev.roanh.gmark.core.graph
Class Edge
java.lang.Object
dev.roanh.gmark.core.graph.Edge
Represents a single edge in the graph schema. A
graph schema edge also store information about
the overall presence of all its edges in a concrete
graph instance. This is done using degrees distributions
on the in and out degree of the nodes the edges
are connected to.
-
Field Summary
Modifier and TypeFieldDescriptionprivate Distribution
The in distribution of nodes this edge starts from.private Distribution
The out distribution of nodes this edge ends at.private Type
The type of the source node for this edge.private Predicate
The predicate, symbol or label on this edge.private Type
The type of the target node for this edge. -
Constructor Summary
ConstructorDescriptionEdge
(Type source, Type target, Predicate symbol, Distribution in, Distribution out) Constructs a new edge with the given source type, target type, predicate, in degree distribution and out degree distribution. -
Method Summary
Modifier and TypeMethodDescriptionGets the in distribution of nodes this edge starts from.Gets the out distribution of nodes this edge ends at.Gets the predicate (symbol) for this edge.Computes the selectivity class of this edge based on whether or not the end points types of this edge are scalable or not and depending on the in and out distribution of this edge.Gets the type of source (subject) nodes for this edge.Gets the type of target (object) nodes for this edgetoString()
-
Field Details
-
source
The type of the source node for this edge. -
target
The type of the target node for this edge. -
symbol
The predicate, symbol or label on this edge. -
inDistribution
The in distribution of nodes this edge starts from. This distribution models the degree of nodes concrete edge instances start from in a graph. -
outDistribution
The out distribution of nodes this edge ends at. This distribution models the degree of nodes concrete edge instances end at in a graph.
-
-
Constructor Details
-
Edge
Constructs a new edge with the given source type, target type, predicate, in degree distribution and out degree distribution.- Parameters:
source
- The source type.target
- The target type.symbol
- The edge predicate.in
- The edge in distribution.out
- The edge out distribution.
-
-
Method Details
-
getInDistribution
Gets the in distribution of nodes this edge starts from. This distribution models the degree of nodes concrete edge instances start from in a graph.- Returns:
- The in distribution of this edge.
-
getOutDistribution
Gets the out distribution of nodes this edge ends at. This distribution models the degree of nodes concrete edge instances end at in a graph.- Returns:
- The out distribution of this edge.
-
getSourceType
Gets the type of source (subject) nodes for this edge.- Returns:
- The source type for this edge.
-
getTargetType
Gets the type of target (object) nodes for this edge- Returns:
- The target type for this edge.
-
getPredicate
Gets the predicate (symbol) for this edge.- Returns:
- The predicate for this edge.
-
getSelectivity
Computes the selectivity class of this edge based on whether or not the end points types of this edge are scalable or not and depending on the in and out distribution of this edge.- Returns:
- The selectivity class of this edge.
- See Also:
-
toString
-