# All Classes and Interfaces

Class
Description
Abs
Absolute value function.
AbsTest
Unit tests for the `Abs` function.
AbstractCanvas
An abstract base class providing scaling and double buffering support for Canvas components.
AbstractInc
Base class for pre and post increment operators.
Add
Addition function.
AlternateFunctionGrammerMatcher
A FunctionGrammarMatcher that works with `AlternateFunctions` and `OverloadedFunctionByStructure` selecting the function at parse time.
AlternateFunctionGrammerMatcherTest
Tests for `AlternateFunctionGrammerMatcher`
AlternateFunctions
Allows function to be overloaded with multiple candidate functions chosen by the number of arguments.
AlternateFunctionsTest
Tests for `AlternateFunctions`
ArcCosine
The acos function.
ArcCosineH
The inverse hyperbolic cos function `acosh(x)`.
ArcSine
The inverse sin function `arcsin(x)`.
ArcSineH
Implements the arcSinH function.
ArcTangent
The arctan function
ArcTangent2
atan2(y, x) Returns the angle whose tangent is y/x.
ArcTanH
Implements the arcTanH function.
Arg
Argument of a complex number
ArrayAccessGrammarMatcher
Matches syntax for array element access a[3].
ArrayFunctionBase
Base class for functions that operate on arrays such as Average, MinMax, and VSum.
Assign
An assignment operator so we can do `x=3+4`.
AssignableList
A list than can be assigned to `[x,y,z] = [1,2,3]`.
AssignableListTest
Tesf for `AssignableList` function.
ASTConstant
A Constant Node.
ASTFunNode
Function Node
ASTOpNode
Represents an operator like `+`.
ASTStart
Start Node
ASTVarNode
Variable Node
Average
Average function class, calculates the average of all its arguments.
BigDecAbs
Absolute value function for BigDecimals, Double and other Number types.
BigDecAdd
Function class for the addition operator.
BigDecAddTest
Tests for `BigDecAdd`.
BigDecComponents
A set of components for working with big decimal numbers.
BigDecDiv
Division function for BigDecimals, Double and other Number types.
BigDecFunctionTable
A function table for BigDecimals.
BigDecimalConsole
A console using `BigDecimal` for calculations.
BigDecimalConsoleTest
Tests for the `BigDecimalConsole`
BigDecimalListTest
Classes relating to "Arrays in Jep Java" Q on forum 2022/08/22 asking about operations on `List<BigDecimal>`
BigDecimalStandardTests
JepTests using BigDecimals
BigDecimalTest
Tests the BigDecComponents through a set of test expressions that are evaluated.
BigDecMod
Modulus function for BigDecimals, Double and other Number types.
BigDecMul
Multiplication function for BigDecimals, Double and other Number types.
BigDecMulTest
Tests for `BigDecAdd`.
BigDecNegate
Unary minus negation function for BigDecimals.
BigDecNumberFactory
A NumberFactory producing BigDecimal objects.
BigDecOperatorTable
A set of operators for using BigDecimal numbers
BigDecPow
Power function for BigDecimals, Double and other Number types.
BigDecRelational
Implements the relational operations <, >, <=, >=, !
BigDecRelationalTest
Tests for `BigDecRelational`
BigDecRound
Rounding functions for BigDecimals.
BigDecRoundSigFig
Rounding functions to round to a specific number of significant figures.
BigDecRoundTest
Tests for `BigDecRound`
BigDecSignum
The signum function for BigDecimals.
BigDecSub
Subtraction function for BigDecimals, Double and other Number types.
BigDecTieBreakComparative
A version of the comparative operator which breaks ties between two BigDecimal numbers representing the same value with different precisions, here for the LT operation 2.0 < 2.00 and for the GT operation 2.00 > 2.0.
BigDecVSum
Sum function, expanding its arguments together.
BinaryFunction
Convenient base class for binary functions.
BinaryFunction.BiFunctionWithException<T>
FunctionalInterface for the `BinaryFunction.instanceOf(Class, BiFunctionWithException)` method.
Binomial
Binomial coefficients: binom(n,i).
BitAnd
Bitwise And, like the java `a & b` operator.
BitComp
Unary bitwise complement, like the java ~a operator.
BitOr
Bitwise Or, like the java a | b operator.
BitwiseOperatorTable
An operator table with a selection of bitwise operators.
BitwiseOperatorTable.BitwiseOperators
Keys to identify the bitwise operators.
BitXor
Bitwise Xor, like the java a ^ b operator.
BoundVariable
A variable bound to an object outside Jep.
BoundVariableFactory
A variable factory for creating bound variables.
BoundVariableTest
Tests using the `BoundVariableFactory`.
BoundVariableTest.MyObj
Object bound to variables in this test.
BracketedSequenceGrammarMatcher
A GrammarMatcher which matches lists of items with the syntax or a simple list `[1,2,3,4]`.
BugsTest
This class is intended to contain all tests related to reported bugs.
BugsTest.CommaNumberTokenMatcher
A matcher for mumbers with commas in them, `1,000,000`
BugsTest.NumberWithUnit
Class to hold a number with a unit.
BugsTest.NumberWithUnitTokenMatcher
TokenMatcher used to match a number with a unit.
CallbackEvaluationI
Functions which require greater control over their evaluation should implement this interface.
Case
A case statement.
Case.NullBehaviour
Action to take if first argument is null.
CaseInsensitiveFunctionTable
A version of a function table which is case-insensitive.
CaseInsensitiveIdentifierTokenManager
An IdentifierTokenMatcher that converts all identifier tokens to lowercase.
CaseInsensitiveVariableTable
A Variable table which ignores case.
CaseInsensitiveVariableTableTest
Tests `CaseInsensitiveVariableTable`, `CaseInsensitiveFunctionTable`, `CaseInsensitiveIdentifierTokenManager`.
CaseNonLazy
A case statement.
CaseNonLazy.NullBehaviour
Action to take if first argument is null.
CaseSwitchTest
Unit tests for `Case`, `Switch`, `SwitchDefault`, and non lazy versions `CaseNonLazy`, `SwitchNonLazy`, `SwitchDefaultNonLazy`.
Ceil
A PostfixMathCommandI which find the smallest integer above the number ceil(pi) give 4 ceil(-i) give -3
ChainedObjectVariableBindingMapper
Creates VariableBinding objects by translating the variable name into a chain of object references.
CharStream
This interface describes a character stream that maintains line and column number positions of the characters.
Clear
Clears the map.
CommentToken
Tokens representing comments.
CommentTokenMatcher
Matches various styles of comments.
CommonClasses
Common classes for overload function tests.
Comparative
Implements the comparative operations <, >, <=, >=, !
ComparativeTest
Tests for `Comparative`
Complex
Represents a complex number with double precision real and imaginary components.
Complex.NonPropagatingImmutableComplex
An immutable version of the Complex class.
ComplexPFMC
Converts a pair of real numbers to a complex number Complex(x,y)=x+i y.
ComplexTest
Test for `Complex`.
ComponentSet
Collects all the components which make up the Jep system.
ComponentSubset
Represent an incomplete set of components.
Concat
Concatenates string arguments.
ConcurrentVariableTable
A variable table backed by a ConcurrentHashMap that is safe for concurrent access.
ConcurrentVariableTableTest
Tests for the `ConcurrentVariableTable`
ConfigurableParser
A configurable parser.
ConfigurableParserTest
Unit tests for the `StandardConfigurableParser`
ConfigurableParserWithRange
A modified version of the `StandardConfigurableParser` which includes a grammar matcher for matching lists `[1,2,3]` and ranges `[1..10]`.
Conjugate
The complex conjugate of a number conj(c)
Console
This class implements a simple command line utility for evaluating mathematical expressions.
Console.NodeRes
Console.SPEC_ACTION
Values returned by `Console.testSpecialCommands(String command)`.
ConsoleTest
Test for the `Console`
ConstantFunction
Functions which always return a constant value.
ContainsKey
Tests if the map contains a given key.
Cosecant
The cosec function
Cosine
The cos function
CosineH
The hyperbolic cosine function
Cotangent
The cotangent function.
Count
Count the number of elements in a list.
CPConsole
A console that uses the `StandardConfigurableParser`.
CPConsoleTest
Tests for the `CPConsole`
CPSeqOpTest
Tests for the configurable parser.
CPTest
Tests for the configurable parser.
Cross
The cross product of two 3D vectors.
CurVerRunner
DecoratingVariableTable
A VariableTable that can optionally decorate another variable table.
DeepCopyVisitor
A Visitor which returns an exact copy of the tree.
DestructiveTests
Test various features until failure.
DictionaryComponents
A set of components for parsing and operating on associative arrays.
DictionaryComponents.DictionaryKeys
Keys for the two operators used to build maps.
DictionaryComponents.Type
Type of configuration.
DictionaryGrammarMatcher
A GrammarMatcher for JSON like map syntax.
DictionaryGrammarMatcher.Type
Type of matcher.
DictionaryTests
Abstract base class for test for the `com.singularsys.jep.misc.dictionary` package.
DictionaryTests.KeyValue
Represents a key value pair
DictionaryTestsWithNull
Abstract base class for test for the `com.singularsys.jep.misc.dictionary` package with options allowing null values.
DictionaryWithListNoNullTest
Test for the `com.singularsys.jep.misc.dictionary` package with `LIST_REQUIRE_VALUES`
DictionaryWithListNullTest
Test for the `com.singularsys.jep.misc.dictionary` package with `LIST_MISSING_VALUES`
DictionaryWithMapNullTest
Test for the `com.singularsys.jep.misc.dictionary` package with `MAP_MISSING_VALUES`
Divide
Division of two arguments.
DoNothingVisitor
A Visitor which visits each node of an expression tree and does nothing.
Dot
The dot product of two vectors.
DoubleNumberFactory
Default class for creating number objects.
EgMessages
Class to handle externalized messages for the jep examples package.
Ele
Function which allows array access using the a[3] notation on left and right-hand side.
ElementOf
Tests if the first argument is in a set of values given in subsequent arguments.
EleTest
Tests for `Ele`
EmptyOperatorTable
A base class for operator tables, this class has no pre-defined operators.
EmptyOperatorTable.OperatorKey
All operators enums must implement this interface.
EmptyOperatorTableTest
Test for the `EmptyOperatorTable`.
Entries
Return the entries of a map a nested list of key-value pairs.
EntriesIterable
Return an `Iterable<Vector<Object>>` for the entries of a map.
EvalPerfTest
Evaluates an expression `nIterations` times.
EvaluationException
Exceptions thrown during evaluation.
Evaluator
Defines a method which can be used to evaluate a part of a node-tree.
Evaluator
This application is a simple graphical example for how Jep can be used to evaluate expressions.
ExamineResultTypes
Class to examine the results types of the various operators and function.
ExamineSizes
Used to examine the memory used to initialise a Jep instance.
Exp
The exp function.
ExpandingEle
An `var[index]` function whose `ExpandingEle.set(Evaluator, Node, Object)` method modifies and expands the `Vector<Object>` value of the variable.
ExpandingEleTest
Test for `ExpandingEle`.
ExpressionConsolidator
Consolidates nested addition and multiplication to produce nary operators.
ExpressionEvalTest
This class is designed for testing the validity of Jep evaluations.
ExtendedOperatorSet
An example of an OperatorSet which adds suffix operators: n!
ExtendedOperatorSet.ExtendedOperators
Keys for the new operators.
ExtendedParserTest
Tests for modification to the configurable parser.
Factorial
Simple implementation of factorial, good up to 20!
FastEvaluator
A fast evaluator for Jep expressions.
FastEvaluator3_4
The versions of the FastEvaluator in Jep 3.4.
FastEvaluator3_5
The versions of the FastEvaluator in Jep 3.5.
FieldVariableBinding
A `VariableBinding` which binds variables to a particular field of an object.
FixedPrecisionFunctionI
Functions, operators and components that support fixed precision operations.
Floor
A PostfixMathCommandI which find the largest integer above the number floor(pi) give 3 floor(-i) give -4
Fractal
Application which calculates fractals using a multithreaded system.
FractalCanvas
This class performs the drawing of the fractal, using a number of threads/runnables to compute the image in chunks.
FromBase
PostfixMathCommand which converts a string to a number in a given base.
FunctionCanvas
This class plots a graph using the Jep API.
FunctionFromLambdaTest
Tests for functions created by `BinaryFunction.instanceOf(com.singularsys.jep.functions.BinaryFunction.BiFunctionWithException)` etc.
FunctionGrammarMatcher
A GrammarMatcher which matches functions in the form 'atan2(y,x)'.
FunctionPlotter
This application is a demonstration of the possible use of the Jep mathematical expression parser.
FunctionSequenceGrammarMatcher
A GrammarMatcher which matches functions in the form `atan2(seq)` where `seq` is a sequence of terms.
FunctionSet
Holds a set of functions.
FunctionSetTest
Tests affect of overloading functions
FunctionsSupportNumberTypeArguments
Tests the standard functions to ensure they all work with custom types extending Number.
FunctionTable
A table holding details of the functions known to Jep.
FunctionToken
A token representing a function name.
GenericDeepCopyVisitor<D>
A Visitor which returns an exact copy of the tree, creating new nodes for each type.
GenericDoNothingVisitor<D>
A Visitor which visits each node, typically return the original node.
GenericVisitor<R,D,E>
A generic version of the `ParserVisitor` allowing the return type, data parsed and exception type to be specified.
Get
Gets the value associated with a key.
GetOr
Gets the value associated with a key, or a default value.
GrammarException
Signals grammatical errors.
GrammarMatcher
Interface defining matchers for custom grammatical elements.
GrammarParser
Interface used by `GrammarMatcher`
GrammarParserFactory
Abstract Factory defining how to create a GrammarParser
HexNumberTokenMatcher
Matches hexadecimal numbers, in the format 0xff.
HookRemover
Remove a specific hook from any node which has it on a tree
HookRemoverTest
Test for `HookRemover`.
IdentifierToken
Token representing variables or function.
IdentifierTokenMatcher
Matches identifiers: variables or function names.
IdentifierTokenMatcherTest
Test the various types of identifier matchers
Identity
A Unary operator which does nothing, used for unary plus +x.
If
The if(condExpr, posExpr, negExpr) function.
IllegalParameterException
Represents an illegal parameter
Imaginary
Finds the imaginary part of a complex number.
ImmutableComplex
An Immutable version of the Complex numbers.
ImportationVisitor
Imports an expression from one Jep instance into another.
IsInfinite
Tests if a double value is infinite.
IsNaN
Tests if a double value is NaN.
IsNull
Tests if a null value is encountered.
IsType
Tests if a value is an instance of a specified type.
JavaOperatorTable
An operator table which supports most of the operators which appear in Java.
JavaOperatorTable.JavaOperators
Keys to identify the Java operators.
JccArrayAccessGrammarMatcher
Matches syntax for array element access `v[3]`, the node tree produced by this matcher matches those produced by the standard Jep `JccParser`.
JccParser
JccParserConstants
Token literal values and constants.
JccParserTokenManager
Token Manager.
JccParserTreeConstants
Jep
The Jep class is the main interface with which the user should interact.
JepComponent
Base interface for all Jep components (parsers, evaluators etc).
JepException
Super class of all Jep specific exceptions.
JepJavaCharStream
Customised version of the JavaCharStream.
JepMessages
Class to handle externalisation of error messages.
JepRuntimeException
A RuntimeException which wraps a JepException for use in cases where throwing a JepException is not possible.
JepTest
Tests various functions on the Jep class.
JepTest.AddFractionsNary
NaryFunction to add fractions
JepTest.AddFractionsStack
Function to add fractions using a stack
JepTest.Diff
Function for diference of two variables.
JepTest.MyBinary
A binary function
JepTest.MyNary
An Nary function
JepTest.MyNaryBinary
An NaryBinary function
JepTest.MyNullary
A nullary functions
JepTest.MyUnary
A unary function
JepTest.PiFun
Real nullay function
JepTest.Product
Product of values
JepTest.Square
Square of value
JepTestWithCustomNumberType
JepTests using a ccustom number type.
JepTestWithCustomNumberType.MyNumber
A custom number type, simple wrapps a double.
JepUnitTest
Unit tests for the main `Jep` class.
JJTJccParserState
Keys
Return the keys of a map a nested list of key-value pairs.
KeysIterable
Return an `Iterable<Object>` for the keys of a map.
LatexTest
Tests printing is psudo latex syntax.
LatexTest.FunctionWithOptionalBrackets
Prints a function with optional brackets.
LazyLogical
A version of the logical operators which use lazy evaluation.
Left
Extract the left most n characters from a string: left("abcdefg",2) -> "ab" If n is greater than the length of the string return the full string. If n is less than zero an EvaluationException is thrown. If the first argument is not a string an EvaluationException is thrown. If the second argument is not a number representing an integer an EvaluationException is thrown.
Length
Returns the length of a string: len("hello") -> 5
LightWeightComponentSet
A lightweight set of components reusing components from an existing Jep instance.
LightWeightComponentSetTest
Tests for the `LightWeightComponentSet` See https://ar.trac.cloudforge.com/jep/ticket/175
LightWeightImportationVisitor
A variant off the `ImportationVisitor` that uses either the same pfmc for a node or its `getLightWeightInstance()` if the function implements `JepComponent`.
LineNumberingNodeFactory
A NodeFactory which adds line numbering information to nodes.
LineNumberingNodeFactory.Numbering
Keys for storing line and column numbers in nodes
LineNumberingShuntingYard
Version of the shunting yard algorithm which sets lines numbers in the parse tree.
LineNumberingShuntingYard.LineNumberGrammarParserFactory
Factory for creating `LineNumberingShuntingYard` instances.
LineNumberingTest
Test for the `LineNumberingNodeFactory`
LineNumberingTest
Test for the `LineNumberingNodeFactory`.
List
The list function.
ListGrammarMatcher
A GrammarMatcher which matches lists of items.
ListOrBracketGrammarMatcher
A GrammarMatcher which matches overloaded lists of items or brackets.
ListOrRangeGrammarMatcher
A GrammarMatcher which matches lists of items with the syntax `[a..b]`, or a simple list `[1,2,3,4]`.
Logarithm
Log base 10.
LogarithmTest
Tess for `Logarithm`
LogBase2
Log base 2.
Logical
Logical operators `AND` and `OR`.
LogTwoArg
Logarithm function where the base is specified in the second argument.
Lookahead2Iterator<E>
An iterator which stores the next two tokens.
LookaheadNIterator<E>
A subclass of a Lookahead2Iterator which allows any number of character of lookahead.
LowerCase
Convert a string to lowercase
LShift
Bitwise Left shift, like the java a << b operator.
LValueI
An interface for functions which can be used on the left-hand side of an assignment.
MacroFunction
A function specified by a string.
MacroFunctionTest
Tests for `MacroFunction`
MakeMap
Create a map of a given type, either creates an empty map or uses a list or map of data.
MakeMap.Type
Configuration type.
MapPfmc
PostfixMathCommand for creating a `Map`.
MapPfmc.Entry
Value returned for an individual map entry.
MapPfmc.MapEntryPfmc
PostfixMathCommand for individual entries
MediumWeightComponentSet
A medium weight set of components reusing components from an existing Jep instance.
MessagesTest
This class should print out all messages produced by Jep.
Mid
Extract substring of first argument: `mid("abcdefg",2,3) -> "cde"` Syntax: `mid(str,start,len)` Second argument is starting index, with the first character being at index 0.
MinMax
Minimum and Maximum functions.
MinMax.MinMaxType
Type of MinMax function, used to make construct clearer.
ModifiedParserTest
Tests for various custom grammars.
ModifiedParserTest.BadFun
ModifiedParserTest.SeqFun
Simple test class of a function which returns an array.
ModifiedParserTest.SuffixArrayAccessShuntingYard
A subclass of the ShuntingYard which can parse various forms of list element access.
ModifiedParserTest.SuffixArrayAccessShuntingYardGrammarParserFactory
Factory to create SuffixArrayAccessShuntingYard
ModifiedParserTest.SuffixElePrintRule
A rule to correctly print suffix array access expressions
Modulus
Calculates the modulus x % y of the arguments.
MonitoringEvaluator
A subclass of FastEvaluator that monitors the number of times each function, operator, variable, and constant is called during evaluation.
MonitoringEvaluator.GetWithException<T>
Functional interface for functions to be measured.
MonitoringEvaluator.Type
The type of monitoring to perform.
MultiLineMatcher
Matches tokens which span multiple lines of the input.
MultiLineToken
A token representing a token which spans multiple lines.
MultipleEquationParser
A parser which can be used to parse multiple expressions in sequence.
MultipleEquationParsingJep
A Jep which uses a `ParallelConfigurableParser` providing implementations of the `Jep.initMultiParse(java.io.Reader)` and `MultipleEquationParsingJep.continueParsing()` methods.
Multiply
The multiplication function.
MutableDouble
A simple Mutable Double class.
NaryBinaryFunction
Convenient base class for n-ary functions backed by a binary operation.
NaryBinaryTest
Tests for `Add` using the multiple arguments.
NaryFunction
Convenient base class for nary functions.
NaturalLogarithm
Natural logarithm.
NaturalLogarithmTest
Tests for `NaturalLogarithm`.
Node
Interface defining a node in the parse-tree.
Node.HookKey
Nodes can optional have hooks which add meta-data to the node.
NodeFactory
This class is used to create nodes of specified types.
NodeFactoryTest
Unit tests for the `NodeFactory`.
NodeHookTest
Tests for adding hooks to nodes.
Not
Implementation of the not function.
NullaryFunction
Convenient base class for zero-argument nullary functions, like `random()`.
NullaryFunction.SupplierWithException<T>
FunctionalInterface for the `BinaryFunction.instanceOf(Class, BiFunctionWithException)` method.
NullParser
A Parser which cannot actually parse expressions.
NullSafeEquals
The Null Safe equals function.
NullWrappedAbstractInc
Null wrapped version of the AbstractInc functions.
NullWrappedBinary
Null wrapped version of a binary function.
NullWrappedFunctionFactory
A factory to create the appropriate type of wrapped function.
NullWrappedFunctionI
Indicate that the function handles nulls.
NullWrappedFunctionTable
A function table which wraps all the functions in an existing table.
NullWrappedIf
NullWrapped version of the if function.
NullWrappedLazyLogical
Null wrapped versions of the LazyLogical functions.
NullWrappedNary
Wrap an NaryFunction with a new function so that if any argument is null, then null is returned.
NullWrappedNaryBinary
Wrap a NaryBinaryFunction so that if any argument is null then null is returned.
NullWrappedOperatorTable
An operator table where the operators generally return null if either argument is null.
NullWrappedOperatorTable.NullWrapperOperators
Key for the one operator NullSafeEquals added by the table.
NullWrappedPassThroughFunction
Functions/operators which are not wrapped in the NullWrappedFunctionTable.
NullWrappedPfmc
Wrap a general PostfixMathCommand so that if any argument is null the function will return null.
NullWrappedUnary
Null wrapped version of a unary function.
NullWrapTest
Tests using the `nullwapper` package.
NullWrapTest.MyBinary
A binary function
NullWrapTest.MyNary
An nary function
NullWrapTest.MyNaryBinary
An nary binary function
NullWrapTest.MyPfmc
A simple multi arg function.
NullWrapTest.MyUnary
A unary function
NumberFactory
This interface can be implemented to create numbers of any object type.
NumberToken
Represent numbers.
NumberTokenMatcher
Matches numbers.
OneShotComponent
Components are are initialised only once.
OpEquals
Function implementing compound assignment operators such as `+=`, `*=` etc.
Operator
An Operator with additional information about its commutativity etc.
OperatorAsFunctionGrammarMatcher
A GrammarMatcher which matches functions in the form ' +(x,y)' where + is an operator.
OperatorsWithListsTest
Test standard operators using `List`.
OperatorTable
Base class for the older style Operator table.
OperatorTable2
The basic set of operators provided as standard by Jep.
OperatorTable2.BasicOperators
The basic arithmetic comparative and logical operators
OperatorTable2.PsudoOperators
Operators which do not correspond to
OperatorTable2.SpecialOperators
Special purpose operators
OperatorTableI
Interface for all OperatorTables.
OperatorToken
A token representing an operator.
OperatorTokenMatcher
TokenMatcher for matching operators from the operator set.
OverloadedBinaryFunction
Allows function to be overloaded with two candidate functions and a predicate that tests the values of the arguments to see which function should be applied.
OverloadedBinaryFunctionTest
Tests for `OverloadedBinaryFunction`
OverloadedFunctionByStructure
Allows function to be overloaded with two candidate functions and a predicate that tests the structure of the parse tree to see which function should be applied.
OverloadedFunctionByStructureTest
Tests for `OverloadedFunctionByStructure`
OverloadedNaryFunction
Allows function to be overloaded with two candidate functions and a predicate that tests the values of the arguments to see which function should be applied.
OverloadedNaryFunctionTest
Tests for `OverloadedNaryFunction`
OverloadedOperator
An operator representing two alternative operators that can be used in alternative contexts based on the structure of the node.
OverloadedUnaryFunction
Allows function to be overloaded with two candidate functions and a predicate that tests the values of the arguments to see which function should be applied.
OverloadedUnaryFunctionTest
Tests for `OverloadedUnaryFunction`.
OverloadingSystemTests
System tests for overloading functions and operators.
OverloadResolver
Resolves `OverloadedOperator`, `OverloadedFunctionByStructure` and `AlternateFunctions` setting the operator or PostfixMathCommand of the node based on a test of the node.
OverloadResolverTest
Tests for the `OverloadResolver`.
ParallelConfigurableParser
A version of the ConfigurableParser that can parse expressions in multiple threads.
ParallelParsingTest
A set of tests checking different methods of parallel parsing from the `com.singularsys.jep.misc.parallelparsing` package.
ParametrisedCanvas
This class plots parametrised curves specified by two Jep expressions.
ParametrisedPlotter
A plotter which plots parameterised curves given by two equations.
ParseException
Exception thrown at parse time.
ParseException
This exception is thrown when parse errors are encountered.
ParsePerfTest
Parses an expression `nIterations` times.
Parser
Defines the methods a parser must implement.
ParserVisitor
Classes which wish to use the visitor pattern should use this interface.
ParseSpeed
Tests the speed of parsing.
PerfResult
Stores a single performance test result and contains logic to write this to a DB.
PerfRunner
Runs a set of performance tests and stores the results in a database.
PerfTest
Base class for a single performance test.
Polar
Converts an [r,theta] pair to a complex number r * e^(i theta).
PolarPlotter
This applet is a demonstration of the possible applications of the Jep mathematical expression parser.
PostDec
Java style x-- operator.
PostfixEvalConsoleTest
Tests for the `PostfixEvaluationConsole`
PostfixEvalTest
Test for the `PostfixEvaluator`
PostfixEvaluationConsole
A console using the `PostfixEvaluator` to evaluate expressions.
PostfixEvaluator
Evaluation component that avoids excessive use of the stack for large expressions.
PostfixMathCommand
Abstract base classes for most function classes.
PostfixMathCommandI
All function classes must implement this interface to ensure that the run() method is implemented.
PostfixTreeWalker
Base class for routines which use a non-recursive tree walker strategy.
PostInc
Java style x++ operator.
Power
Computes the power of a number.
PreDec
Java style --x operator.
PrefixDumperConsole
A console application which dumps the tree representing an equation and statistics about the tree.
PrefixDumperConsoleTest
Tests for the `PrefixDumperConsole`.
PrefixTreeDumper
Dumps the contents of a tree to a specified stream, or to standard output.
PrefixTreeWalker
Base class for routines which use a non-recursive tree walker strategy.
PreInc
Java style ++x operator.
PrintConsole
A console which prints the equation before evaluating it.
PrintConsoleTest
Tests for the `PrintConsole`
PrintVisitor
Prints an expression with configuration options.
PrintVisitor.NullPrintVisitor
A do-nothing version of a PrintVisitor for reducing memory usage.
PrintVisitor.PrintRulesI
This interface specifies the method needed to implement a special print rule.
PrintVisitor.StdElePrintRule
Prints a list access in form a[3] or for multidimensional access use the list syntax.
PrintVisitor.StdListPrintRule
Prints a list of elements using '[' and ']' as delimiters and ',' as a separators.
PrintVisitorTest
Tests for the `PrintVisitor`.
PublishingVariable
A Variable that can publish messages when its value is changed.
PublishingVariableFactory
A factory for creating `PublishingVariable`s.
PublishingVariableTable
A VariableTable which publishes changes to its content.
PublishingVariableTest
Tests for the `PublishingVariable`.
PublishingVariableTest.SignallingTableUpdator
Updates a variable table when another table changes
Put
Puts a key-value pair into a map.
Put.Type
Configuration type
Random
Encapsulates the Math.random() function.
Range
A function which returns an increasing sequence of all the items between the end points inclusive.
RangeOperator
Operators like `[ x ..`
RangeOperatorTest
Test the range operator `RangeOperator` and function `Range` and the associated parser `ConfigurableParserWithRange`.
Real
Finds the real part of a complex number.
RealBinaryFunction
Specifies binary function that efficient `double evaluate(double l, double r)` method.
RealComponents
A set of components for real (non-complex) evaluation.
RealEvalTest
Test for the `RealEvaluator`
RealEvaluator
Performs fast evaluation of expressions by using primitive types double and boolean instead of objects.
RealFunctionTable
Function table where evaluation is carried out using reals and never complex numbers.
RealNaryFunction
Specifies n-ary functions that have an efficient `double evaluate(double[] parameters)` method.
RealNullaryFunction
Specifies no arguments function returning doubles.
RealUnaryFunction
Unary functions that have an efficient `double evaluate(double val)` function for use with the `RealEvaluator`
RealVariableTable
A VariableTable which defines `pi, e, true, false` but not the complex number `i`.
RegExpTokenMatcher
An abstract TokenMatcher which uses RegExp patterns to match patterns.
Remainder
Calculates the remainder and quotient the arguments.
Remainder.Type
The type of rounding to perform.
Remove
Removes entries with matching key from the map.
RepeatButton
A JButton that fires repeatedly when the mouse is held down.
Right
Extract the right most n characters from a string: right("abcdefg",2) -> "fg".
RInt
A PostfixMathCommandI which rounds a number to the closest integer.
RIntTest
Test rounding using `RInt`
Round
A PostfixMathCommandI which rounds a number.
RoundBD
Rounding functions using BigDecimals rounding method.
RoundBracketGrammarMatcher
A GrammarMatcher which matches bracketed expressions.
RoundSF
Rounds to a specific number of significant figures.
RoundTest
Test rounding using various functions.
RShift
Bitwise right shift with sign extension, like the java a >> b operator.
Secant
The secant function, `sec(x)=1/cos(x)`.
SerializableExpression
A serializable representation of an expression.
SerializableExpression.Constant
An element representing a constant value.
SerializableExpression.Element
interface used in internal representation of expression
SerializableExpression.Function
An element representing a function.
SerializableExpression.Operator
An element representing an operator.
SerializableExpression.Variable
An element representing a variable.
SerializationTest
Tests for serialization of expressions and Jep instances.
ShuntingYard
An operator precedence parser based on the shunting yard algorithm.
ShuntingYard.PrefixRes
Return result of following methods.
ShuntingYard.ShuntingYardGrammarParserFactory
Factory creating new ShuntingYard instances.
Signum
The signum function returns -1 if x<0, 1 if x>0, 0 if x==0.
SimpleExample
A simple example that demonstrates the use of Jep for evaluation of a single expression.
SimpleNode
The base class for all AST node classes.
Sine
The sin(x) function
SineH
Hyperbolic sin.
SingleArgFunctionMatcher
A matcher for functions like "sin 30" without brackets and a single simple argument.
Size
The number of entries of the map.
SpeedTest
Compares the speed of evaluation between different evaluation schemes.
SpeedTest.BDConfig
Configuration using the BDConfig
SpeedTest.EvaluationConfig
Basic class to set the evaluation context
SpeedTest.JepConfig
Standard Jep configuration (with FastEvaluator)
SpeedTest.JepConfig3_4
Standard Jep configuration (with Jep 3.4's FastEvaluator)
SpeedTest.JepConfig3_5
Standard Jep configuration (with Jep 3.5's FastEvaluator)
SpeedTest.JepConfig3_5NC
Standard Jep configuration (with Jep 3.5's FastEvaluator and no checks)
SpeedTest.JepConfigNoChecks
Standard Jep configuration (with FastEvaluator)
SpeedTest.OldConfig
Configuration using the StandardEvaluator
SpeedTest.Outputter
Different output methods
SpeedTest.PostfixConfig
Configuration using the RealEvaluator
SpeedTest.RatioOutputter
Print detailed ratios for each run.
SpeedTest.RealConfig
Configuration using the RealEvaluator
SpeedTest.TabOutputter
Print output tab separated.
SpeedTest.ThreadSafeConfig
Configuration using the RealEvaluator
SpeedTest.UncheckedConfig
Configuration using the `UncheckedEvaluator`
SpeedTestComplex
Compares the speed of evaluation between different evaluation schemes.
SpeedTestComplex.EvaluationConfig
Basic class to set the evaluation context
SpeedTestComplex.JepConfig
Standard Jep configuration (with FastEvaluator)
SpeedTestComplex.JepConfig3_4
Standard Jep configuration (with Jep 3.4's FastEvaluator)
SpeedTestComplex.JepConfig3_5
Standard Jep configuration (with Jep 3.5's FastEvaluator)
SpeedTestComplex.JepConfig3_5NC
Standard Jep configuration (with Jep 3.5's FastEvaluator) with all checks turned off.
SpeedTestComplex.JepConfigNoChecks
Standard Jep configuration (with FastEvaluator)
SpeedTestComplex.OldConfig
Configuration using the StandardEvaluator
SpeedTestComplex.Outputter
Different output methods
SpeedTestComplex.PostfixConfig
Configuration using the RealEvaluator
SpeedTestComplex.RatioOutputter
Print detailed ratios for each run.
SpeedTestComplex.RealConfig
Configuration using the RealEvaluator
SpeedTestComplex.TabOutputter
Print output tab separated.
SpeedTestComplex.ThreadSafeConfig
Configuration using the RealEvaluator
SpeedTestComplex.UncheckedConfig
Configuration using the UncheckedEvaluator
SquareRoot
Square root function.
StackCheckingFastEvaluator
An Evaluator which checks the stack size after every function call.
StandardComponents
The standard set of components.
StandardComponentsTest
Tests for `StandardComponents`
StandardConfigurableParser
The standard configurable parser with a standard set of options.
StandardEvaluator
The older standard evaluator.
StandardEvaluatorTest
Performs the regular JepTests using the StandardEvaluator
StandardFunctionTable
The standard function table.
StandardOperatorTable
The old standard operator table used by Jep.
StandardOperatorTable2
Provides the standard implementations of operators used by Jep.
StandardParser
The standard parser for Jep.
StandardVariableTable
A VariableTable which defines some constant values.
Str
Converts an object into its string representation.
StrictDoubleNumberFactory
A stricter version of `DoubleNumberFactory` that always creates Doubles.
StrictDoubleNumberFactoryTest
Tests for `StrictDoubleNumberFactory`
StrictNaturalLogarithm
A strict version of Natural logarithm.
StringFunctionSet
Adds string functions left, right, lower, upper, substring, len, mid, trim.
StringToken
Single or double-quoted strings.
StringTokenMatcher
Base class for matching quoted strings.
StringTokenMatcher2
Base class for matching quoted strings.
SubstitutionVisitor
Allows substitution of variable with values or expressions.
SubstitutionVisitorTest
Tests for the `SubstitutionVisitor`.
Substring
Extract substring of first argument: substring("abcdefg",2,4) -> "cd".
Subtract
The different between two arguments `a-b`.
Sum
Adds it arguments `sum(1,2,3,4,5)` will be 15.
Switch
A switch statement.
Switch.NullBehaviour
Action to take if first argument is null.
SwitchDefault
A switch statement, with a default value.
SwitchDefault.NullBehaviour
Action to take if first argument is null.
SwitchDefaultNonLazy
A switch statement, with a default value.
SwitchDefaultNonLazy.NullBehaviour
Action to take if first argument is null.
SwitchNonLazy
A switch statement.
SwitchNonLazy.NullBehaviour
Action to take if first argument is null.
SymbolToken
A simple type of token which represents a fixed string of characters.
SymbolTokenMatcher
Matches a fixed set of symbols, each represented by a SymbolToken.
Tangent
The tan function.
TanH
Hyperbolic tan.
TerminatorToken
A token representing the end of the equation.
TerminatorTokenMatcher
A token matcher which matches the end of an expression
TernaryConditional
Implements the `condition ?`
TernaryOperator
A class representing a ternary operator, for example x?
TestingVisitor
A visitor than can test all nodes in a tree against a set of predicates.
TestingVisitorTest
Tests for the `TestingVisitor`.
ThreadSafeAssign
An assignment operator so we can do x=3+4.
ThreadSafeEle
Thread safe version of the element operation.
ThreadSafeEvaluator
An evaluator which can safely evaluate an expression in multiple threads.
ThreadSafeRandom
Random number generator using the java.util.concurrent.ThreadLocalRandom `nextDouble(double)` method.
ThreadSafeSpeedTest
A diagnostic application using the `ThreadSafeEvaluator` and a variable number of threads.
ThreadSafeSpeedTest.EvaluationThread
A thread which evaluates an expression multiple times.
ThreadSpeedTest
Tests evaluation using multiple threads.
ThreadSpeedTest.EvaluationThread
A thread which evaluates an expression multiple times.
ThreadTest
Tests for evaluation in multiple theads
ToBase
Convert a number to a string in a given base.
Token
Base class for tokens.
Token
Describes the input token stream.
TokenBuilder
Sub-interface of TokenMatcher which allows tokens to be created without matching input text.
TokenFilter
Classes which filter the list of tokens.
Tokenizer
Breaks the input into a set of tokens.
Tokenizer.StandardTokenizerFactory
Factory creating new instances of the tokenizer.
TokenizerFactory
AbstractFactory for creating new Tokenizer instances.
TokenizerTest
Tests for the tokenizer.
TokenMatcher
Interface defining classes which match tokens
TokenMgrError
Token Manager Error.
TreeAnalyzer
Analyze an expression, counting the number of nodes of each type, and recording which variables, functions and operators occurred in the expression.
Trim
Trims leading and trailing whitespace
UMinus
The unary minus function `-x`.
UnaryFunction
Convenient base class for unary functions.
UnaryFunction.FunctionWithException<T>
FunctionalInterface for the `BinaryFunction.instanceOf(Class, BiFunctionWithException)` method.
UncheckedEvalTest
Tests for the `UncheckedEvaluator`.
UncheckedEvaluator
An evaluator which does fewer checks on values with a 5% faster speed.
UpperCase
Convert a string to uppercase
UpperCaseOperatorTokenMatcher
A case-insensitive operator token matcher.
URShift
Bitwise right shift with zero extension, like the java a <<< b operator.
Utilities
Utilities for constructing tests on functions.
Utils
Some common utility methods
Values
Return the values of a map a nested list of key-value pairs.
ValuesIterable
Return an `Iterable<Object>` for the values of a dictionary.
Variable
Information about a variable.
VariableBinding
Bound variables will call these methods to interact with objects outside Jep.
VariableBindingMapper
Defines a method which translates a variable name into a variable binding.
VariableFactory
A factory class which is used to create variables.
VariableFactoryTest
Unit tests for the `VariableFactory`
VariableHookTest
Tests for hooks on Variables.
VariableTable
A table of variables.
VariableTableAction
Contains details of an action on a variable table or a change in a variable.
VariableTableAction.Actions
The type of action
VariableTableSubscriber
Convenience class for implementing a Subscriber of VariableTableActions.
VariableTableTest
Unit test for the `VariableTable`
VariableTableUpdater
A VariableTableSubscriber that updates variables in the table when messages are received.
VectorConsole
A console which illustrates a different syntax for vectors using mathematical (1,2,3) notation. the tokenizer
VectorConsoleTest
Test for the `VectorConsole`
VSum
Summation function which expands the arguments.
WhiteSpaceCommentFilter
A token filter that removes whitespace and comments.
WhiteSpaceToken
Tokens representing sequence of white space characters.
WhiteSpaceTokenMatcher
Matches whitespace.
ZeroLengthBehaviourI
Interface for functions which can be configured to respond to zero length array arguments with either an exception, NaN or a value.
ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI
Interface for classes which implement `ZeroLengthBehaviourI` by delegating to a helper class.
ZeroLengthBehaviourI.ZeroLengthErrorBehaviour
How to respond to a zero length array as argument
ZeroLengthBehaviourI.ZeroLengthHelper
Helper class which implements the zero length behaviour.