com.singularsys.jepexamples.diagnostics

## Class SpeedTest

- java.lang.Object
- - com.singularsys.jepexamples.diagnostics.SpeedTest

-     public class SpeedTest
      extends java.lang.Object

  Compares the speed of evaluation between different evaluation schemes. The standard class compares BigDecimal, Jep (with default Fast evaluator), the old StandardEvaluator, and RealEvaluator.

  If you have some nice complicated examples, I'd love to hear about them to see if we can tune things up. - rich

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SpeedTest.BDConfig` Configuration using the BDConfig
    `static class` | `SpeedTest.EvaluationConfig` Basic class to set the evaluation context
    `static class` | `SpeedTest.JepConfig` Standard Jep configuration (with FastEvaluator)
    `static class` | `SpeedTest.OldConfig` Configuration using the StandardEvaluator
    `static class` | `SpeedTest.Outputter` Different output methods
    `static class` | `SpeedTest.RatioOutputter` Print detailed ratios for each run.
    `static class` | `SpeedTest.RealConfig` Configuration using the RealEvaluator
    `static class` | `SpeedTest.TabOutputter` Print output tab separated.
    `static class` | `SpeedTest.ThreadSafeConfig` Configuration using the RealEvaluator

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<SpeedTest.EvaluationConfig>` | `configs`
    `int` | `nDeriv`
    `int` | `num_itts`
    `int` | `num_vals`
    `protected SpeedTest.Outputter` | `outputter`
    `protected long[]` | `totalTimes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpeedTest(SpeedTest.Outputter outputter)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConfig(SpeedTest.EvaluationConfig config)` Adds a new EvaluationConfig to be be run for comparison.
    `void` | `doAll(java.lang.String[] eqns, java.lang.String[] varNames)` Run speed comparison for a set of equations.
    `void` | `doAll(java.lang.String eqn, java.lang.String[] varNames)` Run speed comparison for a single equation.
    `void` | `fini()`
    `void` | `init()`
    `static void` | `main(java.lang.String[] args)` Main method, executes all speed tests.
    `static void` | `runTests(SpeedTest st)` A standard set of tests.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### num_itts

          public int num_itts

    - #### num_vals

          public int num_vals

    - #### nDeriv

          public int nDeriv

    - #### configs

          protected final java.util.List<SpeedTest.EvaluationConfig> configs

    - #### outputter

          protected SpeedTest.Outputter outputter

    - #### totalTimes

          protected long[] totalTimes

  - ### Constructor Detail

    - #### SpeedTest

          public SpeedTest(SpeedTest.Outputter outputter)

      Parameters:
        `outputter` -

  - ### Method Detail

    - #### init

          public void init()

    - #### fini

          public void fini()

    - #### doAll

          public void doAll(java.lang.String eqn,
                            java.lang.String[] varNames)

      Run speed comparison for a single equation.
      Parameters:
        `eqn` - The equation to test
        `varNames` - an array of variable names which will be set to random values.

    - #### doAll

          public void doAll(java.lang.String[] eqns,
                            java.lang.String[] varNames)

      Run speed comparison for a set of equations.
      Parameters:
        `eqns` -
        `varNames` -

    - #### addConfig

          public void addConfig(SpeedTest.EvaluationConfig config)

      Adds a new EvaluationConfig to be be run for comparison.
      Parameters:
        `config` -

    - #### main

          public static void main(java.lang.String[] args)

      Main method, executes all speed tests.
      Parameters:
        `args` -

    - #### runTests

          public static void runTests(SpeedTest st)

      A standard set of tests.
      Parameters:
        `st` -

Copyright © 2018 Singular Systems http://www.singularsys.com/jep