Enum Graphs.TransitiveClosureSelfLoopStrategy
java.lang.Object
java.lang.Enum<Graphs.TransitiveClosureSelfLoopStrategy>
com.google.common.graph.Graphs.TransitiveClosureSelfLoopStrategy
- All Implemented Interfaces:
Serializable, Comparable<Graphs.TransitiveClosureSelfLoopStrategy>, Constable
- Enclosing class:
Graphs
public static enum Graphs.TransitiveClosureSelfLoopStrategy
extends Enum<Graphs.TransitiveClosureSelfLoopStrategy>
A strategy for adding self-loops to the transitive closure graph. All strategies preserve
self-loops that are present in the original graph.
The strategies differ based on how they define "cycle incident to a node".
- Since:
- NEXT
- Author:
- James Sexton, Joshua O'Madadhain
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdd a self-loop to each node in the original graph; this is based on a definition of "cycle incident to a node" that includes zero-length cycles.Add a self-loop to each node that is incident to a cycle of length one or greater in the original graph. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ADD_SELF_LOOPS_ALWAYS
Add a self-loop to each node in the original graph; this is based on a definition of "cycle incident to a node" that includes zero-length cycles. This matches the behavior of the now-deprecatedGraphs.transitiveClosure(Graph)
method. -
ADD_SELF_LOOPS_FOR_CYCLES
Add a self-loop to each node that is incident to a cycle of length one or greater in the original graph.
-
-
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
-