Package com.jgalgo.alg
Enum EdgeDirection
- java.lang.Object
-
- java.lang.Enum<EdgeDirection>
-
- com.jgalgo.alg.EdgeDirection
-
- All Implemented Interfaces:
Serializable
,Comparable<EdgeDirection>
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, seeAll
), determining different types of cores.- Author:
- Barak Ugav
-
-
Enum Constant Summary
Enum Constants Enum Constant Description All
The 'All' direction include all the edges with the vertex as the source or the target.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.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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EdgeDirection
valueOf(String name)
Returns the enum constant of this type with the specified name.static EdgeDirection[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static EdgeDirection[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EdgeDirection c : EdgeDirection.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
-