Package br.unip.aps.sorting
Enum Class CenarioEntrada
- All Implemented Interfaces:
Serializable,Comparable<CenarioEntrada>,Constable
Cenario (disposicao inicial) da entrada entregue aos algoritmos, para estudar melhor, medio e pior caso.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEmbaralhada com semente fixa.Ordenada de tras para frente.Ja ordenada pelo criterio.Ordem original dos arquivos do INPE (cronologica por passagem do satelite).Ordenada com 5% de pares trocados aleatoriamente (dados "quase ordenados"). -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidembaralhar(List<T> lista, Random rnd) Embaralhamento de Fisher-Yates (Knuth, algoritmo P).<T> List<T> preparar(List<T> base, Comparator<? super T> comparador, long semente) Prepara uma nova lista com a disposicao do cenario (a lista base nao e alterada).toString()static CenarioEntradaReturns the enum constant of this class with the specified name.static CenarioEntrada[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORIGINAL
Ordem original dos arquivos do INPE (cronologica por passagem do satelite). -
ALEATORIO
Embaralhada com semente fixa. -
ORDENADO
Ja ordenada pelo criterio. -
INVERSO
Ordenada de tras para frente. -
QUASE_ORDENADO
Ordenada com 5% de pares trocados aleatoriamente (dados "quase ordenados").
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
preparar
Prepara uma nova lista com a disposicao do cenario (a lista base nao e alterada). -
embaralhar
Embaralhamento de Fisher-Yates (Knuth, algoritmo P). -
toString
- Overrides:
toStringin classEnum<CenarioEntrada>
-