Enum Class SelectivityClass

java.lang.Object
java.lang.Enum<SelectivityClass>
dev.roanh.gmark.core.SelectivityClass
All Implemented Interfaces:
Serializable, Comparable<SelectivityClass>, Constable

public enum SelectivityClass extends Enum<SelectivityClass>
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:
  1. 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).
  2. 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 Constants
    Enum Constant
    Description
    (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

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The display name of this selectivity class.
    private final Selectivity
    The selectivity associated with this selectivity class.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    SelectivityClass(String name, Selectivity selectivity)
    Constructs a new selectivity class with the given display name and selectivity.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    Gets the negation of this selectivity class.
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ONE_ONE

      public static final SelectivityClass ONE_ONE
      (1,=,1) a class between constant nodes, also the only class associated with a query of constant selectivity.
    • N_ONE

      public static final SelectivityClass N_ONE
      (N,>,1) a class between a growing and a constant node, associated with a query of linear selectivity.
    • ONE_N

      public static final SelectivityClass ONE_N
      (1,<,N) a class between a growing and a constant node, associated with a query of linear selectivity.
    • EQUALS

      public static final SelectivityClass EQUALS
      (N,=,N) a class between growing nodes, associated with a query of linear selectivity.
    • GREATER

      public static final SelectivityClass GREATER
      (N,>,N) a class between growing nodes, where the edge in distribution is zipfian. Associated with a query of linear selectivity.
    • LESS

      public static final SelectivityClass LESS
      (N,<,N) a class between growing nodes, where the edge out distribution is zipfian. Associated with a query of linear selectivity.
    • LESS_GREATER

      public static final SelectivityClass 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

      public static final SelectivityClass 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

      private final String name
      The display name of this selectivity class.
    • selectivity

      private final Selectivity selectivity
      The selectivity associated with this selectivity class.
  • Constructor Details

    • SelectivityClass

      private SelectivityClass(String name, Selectivity selectivity)
      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

      public static SelectivityClass[] 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

      public static SelectivityClass valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getSelectivity

      public Selectivity getSelectivity()
      Gets the estimated selectivity value of a query that belongs to this selectivity class.
      Returns:
      The selectivity of this selectivity class.
    • negate

      public SelectivityClass 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

      public abstract SelectivityClass conjunction(SelectivityClass other)
      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

      public String toString()
      Overrides:
      toString in class Enum<SelectivityClass>