Enum EdgeDirection

java.lang.Object
java.lang.Enum<EdgeDirection>
com.jgalgo.alg.common.EdgeDirection
All Implemented Interfaces:
Serializable, Comparable<EdgeDirection>, java.lang.constant.Constable

public enum EdgeDirection extends Enum<EdgeDirection>
The direction type of an edge with respect to a vertex.

This enum is usually used as a parameter to algorithm that compute some property of the vertices related to their edges. For example, the CoresAlgo compute the cores of the graph with respect to the degree of the vertices: the degree can be in-degree, out-degree or in-degree + out-degree (not a real addition, as self edges are only count once, see All), determining different types of cores.

Author:
Barak Ugav
  • 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
    The 'All' direction include all the edges with the vertex as the source or the target.
    The 'In' direction include all the edges with the vertex as the target, in case of a directed graph, or as the source or the target, in case of an undirected graph.
    The 'Out' direction include all the edges with the vertex as the source, in case of a directed graph, or as the source or the target, in case of an undirected graph.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    static EdgeDirection[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

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

    • Out

      public static final EdgeDirection Out
      The 'Out' direction include all the edges with the vertex as the source, in case of a directed graph, or as the source or the target, in case of an undirected graph.
    • In

      public static final EdgeDirection In
      The 'In' direction include all the edges with the vertex as the target, in case of a directed graph, or as the source or the target, in case of an undirected graph.
    • All

      public static final EdgeDirection All
      The 'All' direction include all the edges with the vertex as the source or the target. Note that self edges are count only once.
  • Method Details

    • values

      public static EdgeDirection[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EdgeDirection valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null