public enum Complexity extends Enum<Complexity>
Enum Constant and Description |
---|
CONSTANT
Constant value. Example: Determining if an integer (represented in binary) is even or odd.
|
CUBIC
Cubic.
|
DOUBLE_EXPONENTIAL
|
EXPONENTIAL
|
FACTORIAL
Factorial.
|
FRACTIONAL_POWER
Fractional power.
|
INVERSE_ACKERMANN
Inverse Ackermann. Example: Amortized time per operation using a disjoint set.
|
ITERATED_LOGARITHMIC
|
LINEAR
|
LINEARITHMIC
|
LOG_LOGARITHMIC
Log-logarithmic. Example: Amortized time per operation using a bounded priority queue.
|
LOGARITHMIC
Logarithmic. Example: Binary search.
|
N_LOG_STAR_N
n log star n.
|
POLYLOGARITHMIC
|
POLYNOMIAL
|
QUADRATIC
Quadratic.
|
QUASI_POLYNOMIAL
|
SUB_EXPONENTIAL
|
Modifier and Type | Method and Description |
---|---|
String |
getFormula()
Get the formula.
|
String |
toString() |
static Complexity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Complexity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Complexity CONSTANT
O(1)
public static final Complexity INVERSE_ACKERMANN
O(α(n))
public static final Complexity ITERATED_LOGARITHMIC
public static final Complexity LOG_LOGARITHMIC
O(log log n)
public static final Complexity LOGARITHMIC
public static final Complexity POLYLOGARITHMIC
poly(log n)
public static final Complexity FRACTIONAL_POWER
O(nc) where 0 < c < 1
public static final Complexity LINEAR
O(n)
public static final Complexity N_LOG_STAR_N
O(n log* n)
public static final Complexity LINEARITHMIC
O(n log n)
public static final Complexity QUADRATIC
O(n2)
public static final Complexity CUBIC
O(n3)
public static final Complexity POLYNOMIAL
2O(log n) = poly(n)
public static final Complexity QUASI_POLYNOMIAL
2poly(log n)
public static final Complexity SUB_EXPONENTIAL
O(2nε) for all ε > 0
public static final Complexity EXPONENTIAL
2O(n)
public static final Complexity FACTORIAL
O(n!)
public static final Complexity DOUBLE_EXPONENTIAL
22poly(n)
public static Complexity[] values()
for (Complexity c : Complexity.values()) System.out.println(c);
public static Complexity valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getFormula()
public String toString()
toString
in class Enum<Complexity>
Copyright © 2011–2021 Igor Maznitsa. All rights reserved.