Package com.jgalgo.alg.common
Enum EdgeDirection
- All Implemented Interfaces:
Serializable
,Comparable<EdgeDirection>
,java.lang.constant.Constable
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 ConstantDescriptionThe '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 TypeMethodDescriptionstatic EdgeDirection
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.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
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
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
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
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
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
-