Enum Class CenarioEntrada

java.lang.Object
java.lang.Enum<CenarioEntrada>
br.unip.aps.sorting.CenarioEntrada
All Implemented Interfaces:
Serializable, Comparable<CenarioEntrada>, Constable

public enum CenarioEntrada extends Enum<CenarioEntrada>
Cenario (disposicao inicial) da entrada entregue aos algoritmos, para estudar melhor, medio e pior caso.
  • Enum Constant Details

    • ORIGINAL

      public static final CenarioEntrada ORIGINAL
      Ordem original dos arquivos do INPE (cronologica por passagem do satelite).
    • ALEATORIO

      public static final CenarioEntrada ALEATORIO
      Embaralhada com semente fixa.
    • ORDENADO

      public static final CenarioEntrada ORDENADO
      Ja ordenada pelo criterio.
    • INVERSO

      public static final CenarioEntrada INVERSO
      Ordenada de tras para frente.
    • QUASE_ORDENADO

      public static final CenarioEntrada QUASE_ORDENADO
      Ordenada com 5% de pares trocados aleatoriamente (dados "quase ordenados").
  • Method Details

    • values

      public static CenarioEntrada[] 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

      public static CenarioEntrada valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • preparar

      public <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).
    • embaralhar

      public static <T> void embaralhar(List<T> lista, Random rnd)
      Embaralhamento de Fisher-Yates (Knuth, algoritmo P).
    • toString

      public String toString()
      Overrides:
      toString in class Enum<CenarioEntrada>