Package jline.solvers

Class MethodType

java.lang.Object
jline.solvers.MethodType

public class MethodType extends Object
Classification of a solution method, as printed in the solver banner: <accuracy>, <randomness> with accuracy in {exact, approximate, bound} and randomness in {deterministic, randomized}.

Conventions, applied uniformly across the four codebases (MATLAB line_method_type.m, python solvers/base.py, C++ method_type.h):

  • exact: the algorithm targets the metric with no modeling approximation. Numerical truncation and floating-point error do not make a method approximate, so an integral representation or a transform inversion is exact while an asymptotic expansion is not.
  • approximate: the algorithm introduces a heuristic, an asymptotic expansion, a decomposition, or a statistical estimate.
  • bound: the algorithm returns a formal one-sided bound on the metric, not a point estimate: the value is guaranteed to lie on the stated side of the exact one, and the two sides of a family bracket it. The side is read off the method label and printed with it ("gb.upper" -> "upper bound").
  • randomized: the algorithm consumes pseudo-random numbers, so two runs agree only if the seed does.

Perfect sampling (cftp) is classified by the law it samples from, which is the stationary one, hence exact; the ordinary simulators are approximate because a finite horizon leaves warm-up bias on top of the sampling error.

Keep this registry in step with the citation registry (line_citations.m) and with the three twins named above.

  • Field Details

  • Constructor Details

    • MethodType

      public MethodType()
  • Method Details

    • of

      public static String of(String solvername, String method)
      Banner classification of a solution method. Lookup order: solver.method, method, the tail after each dot of the method (longest suffix first), the head before its first dot, #solver, then "approximate, deterministic". The unknown-method default is the conservative one: claiming exactness a method does not have is the costlier error.
      Parameters:
      solvername - banner solver name, with or without the "Solver" prefix
      method - resolved method label, possibly carrying the "default/" prefix
      Returns:
      the classification string, e.g. "exact, deterministic"