Package dev.roanh.gmark.core
Enum Class SelectivityClass
- All Implemented Interfaces:
Serializable
,Comparable<SelectivityClass>
,Constable
Enum of all the selectivity classes. At its core this describes
the effect of an edge between two nodes of a given type. There
are two primary factors that influence the selectivity class:
- The presence of the source and target node in the graph. That is whether the nodes are present in a fixed quantity (constant) or in a quantity that grows with the size of the graph (growing).
- The incoming and outgoing distribution of the edge
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription(N,⨉,N)
a class between growing nodes, this includes for example the transitive closure.(N,=,N)
a class between growing nodes, associated with a query of linear selectivity.(N,>,N)
a class between growing nodes, where the edge in distribution is zipfian.(N,<,N)
a class between growing nodes, where the edge out distribution is zipfian.(N,◇,N)
a class between growing nodes where the edge in and out distributions are both zipfian.(N,>,1)
a class between a growing and a constant node, associated with a query of linear selectivity.(1,<,N)
a class between a growing and a constant node, associated with a query of linear selectivity.(1,=,1)
a class between constant nodes, also the only class associated with a query of constant selectivity. -
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The display name of this selectivity class.private final Selectivity
The selectivity associated with this selectivity class. -
Constructor Summary
ModifierConstructorDescriptionprivate
SelectivityClass
(String name, Selectivity selectivity) Constructs a new selectivity class with the given display name and selectivity. -
Method Summary
Modifier and TypeMethodDescriptionabstract SelectivityClass
conjunction
(SelectivityClass other) Computes the selectivity class of the conjunction of this selectivity class and the given other selectivity class.Gets the estimated selectivity value of a query that belongs to this selectivity class.negate()
Gets the negation of this selectivity class.toString()
static SelectivityClass
Returns the enum constant of this class with the specified name.static SelectivityClass[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONE_ONE
(1,=,1)
a class between constant nodes, also the only class associated with a query of constant selectivity. -
N_ONE
(N,>,1)
a class between a growing and a constant node, associated with a query of linear selectivity. -
ONE_N
(1,<,N)
a class between a growing and a constant node, associated with a query of linear selectivity. -
EQUALS
(N,=,N)
a class between growing nodes, associated with a query of linear selectivity. -
GREATER
(N,>,N)
a class between growing nodes, where the edge in distribution is zipfian. Associated with a query of linear selectivity. -
LESS
(N,<,N)
a class between growing nodes, where the edge out distribution is zipfian. Associated with a query of linear selectivity. -
LESS_GREATER
(N,◇,N)
a class between growing nodes where the edge in and out distributions are both zipfian. Associated with a query of linear selectivity. -
CROSS
(N,⨉,N)
a class between growing nodes, this includes for example the transitive closure. This class is always derived from the combination of the other selectivity classes. This is also the only class associated with a query of quadratic selectivity.
-
-
Field Details
-
name
The display name of this selectivity class. -
selectivity
The selectivity associated with this selectivity class.
-
-
Constructor Details
-
SelectivityClass
Constructs a new selectivity class with the given display name and selectivity.- Parameters:
name
- The display name of the selectivity class.selectivity
- The selectivity of the selectivity class.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getSelectivity
Gets the estimated selectivity value of a query that belongs to this selectivity class.- Returns:
- The selectivity of this selectivity class.
-
negate
Gets the negation of this selectivity class. Meaning the effect of following an edge with this selectivity class in the reverse direction. For example the selectivity class(N,<,N)
becomes(N,>,N)
.- Returns:
- The negation of this selectivity class.
-
conjunction
Computes the selectivity class of the conjunction of this selectivity class and the given other selectivity class. This should be seen as first following an edge with this selectivity class and then following and edge with the given other selectivity. The conjunction of both selectivity classes is then the final selectivity class of the path.- Parameters:
other
- The other selectivity class to compute the conjunction with.- Returns:
- The selectivity class of the conjunction of this selectivity class with the given selectivity class.
-
toString
- Overrides:
toString
in classEnum<SelectivityClass>
-