Index

A B C D E F G I L M N P R S T U V 
All Classes and Interfaces|All Packages|Serialized Form

A

ABS - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
ACOS - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
ADD - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
addFunction(String, int, ToDoubleFunction<double[]>) - Method in class redempt.crunch.functional.ExpressionEnv
Adds a Function that can be called from expressions with this environment
addFunction(Function) - Method in class redempt.crunch.functional.ExpressionEnv
Adds a Function that can be called from expressions with this environment
addFunctions(Function...) - Method in class redempt.crunch.functional.ExpressionEnv
Adds any number of Functions that can be called from expressions with this environment
addLazyVariable(String, DoubleSupplier) - Method in class redempt.crunch.functional.ExpressionEnv
Adds a lazily-evaluated variable that will not need to be passed with the variable values
addOperator(BinaryOperator) - Method in class redempt.crunch.ShuntingYard
 
addValue(Value) - Method in class redempt.crunch.ShuntingYard
 
advance() - Method in class redempt.crunch.ExpressionParser
 
advanceCursor() - Method in class redempt.crunch.ExpressionParser
 
ARGUMENT_LIST - Enum constant in enum class redempt.crunch.token.TokenType
 
ArgumentList - Class in redempt.crunch.functional
Represents a list of arguments being passed to a Function
ArgumentList(Value[]) - Constructor for class redempt.crunch.functional.ArgumentList
 
ASIN - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
ATAN - Enum constant in enum class redempt.crunch.token.UnaryOperator
 

B

BINARY_OPERATION - Enum constant in enum class redempt.crunch.token.TokenType
 
BINARY_OPERATOR - Enum constant in enum class redempt.crunch.token.TokenType
 
BinaryOperation - Class in redempt.crunch.token
 
BinaryOperation(BinaryOperator, Value, Value) - Constructor for class redempt.crunch.token.BinaryOperation
 
BinaryOperator - Enum Class in redempt.crunch.token
Represents an Operator which can be used in mathematical expressions
BOOLEAN_AND - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
BOOLEAN_AND_ALT - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
BOOLEAN_OR - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
BOOLEAN_OR_ALT - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

C

call(double[]) - Method in class redempt.crunch.functional.Function
Calls this function with a set of values - Warning, no validation is done on array size
CBRT - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
CEIL - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
CharTree<T> - Class in redempt.crunch.data
A simple implementation of a prefix tree for better parsing Only supports ASCII characters
CharTree() - Constructor for class redempt.crunch.data.CharTree
 
clone() - Method in class redempt.crunch.CompiledExpression
 
CompiledExpression - Class in redempt.crunch
An expression which has been compiled with Crunch.compileExpression(String) and can be evaluated with CompiledExpression.evaluate(double...)
CompiledExpression() - Constructor for class redempt.crunch.CompiledExpression
 
CompiledExpression(Value, int) - Constructor for class redempt.crunch.CompiledExpression
 
compileExpression(String) - Static method in class redempt.crunch.Crunch
Compiles a mathematical expression into a CompiledExpression.
compileExpression(String, ExpressionEnv) - Static method in class redempt.crunch.Crunch
Compiles a mathematical expression into a CompiledExpression.
Constant - Enum Class in redempt.crunch.token
Represents a mathematical or boolean constant which can be used in an expression
containsFirstChar(char) - Method in class redempt.crunch.data.CharTree
Check if the character exists at the root level in this tree
COS - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
COSH - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
Crunch - Class in redempt.crunch
Public API methods for compiling expressions

D

DIVIDE - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

E

E - Enum constant in enum class redempt.crunch.token.Constant
 
EQUAL_TO - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
EQUAL_TO_ALT - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
evaluate() - Method in class redempt.crunch.CompiledExpression
Evaluates this CompiledExpression and returns its value without modifying variable values
evaluate(double) - Method in class redempt.crunch.CompiledExpression
Evaluates this CompiledExpression and returns its value
evaluate(double...) - Method in class redempt.crunch.CompiledExpression
Evaluates this CompiledExpression and returns its value
evaluate(double, double) - Method in class redempt.crunch.CompiledExpression
Evaluates this CompiledExpression and returns its value
evaluateExpression(String, double...) - Static method in class redempt.crunch.Crunch
Compiles and evaluates an expression once.
EvaluationEnvironment - Class in redempt.crunch.functional
Legacy, redirects to ExpressionEnv
EvaluationEnvironment() - Constructor for class redempt.crunch.functional.EvaluationEnvironment
 
expectChar(char) - Method in class redempt.crunch.ExpressionParser
 
EXPONENT - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
ExpressionCompilationException - Exception in redempt.crunch.exceptions
 
ExpressionCompilationException(ExpressionParser, String) - Constructor for exception redempt.crunch.exceptions.ExpressionCompilationException
 
ExpressionEnv - Class in redempt.crunch.functional
Represents an environment containing functions that can be called in expressions
ExpressionEnv() - Constructor for class redempt.crunch.functional.ExpressionEnv
Creates a new EvaluationEnvironment
ExpressionEvaluationException - Exception in redempt.crunch.exceptions
 
ExpressionEvaluationException(String) - Constructor for exception redempt.crunch.exceptions.ExpressionEvaluationException
 
ExpressionParser - Class in redempt.crunch
 

F

FALSE - Enum constant in enum class redempt.crunch.token.Constant
 
FastNumberParsing - Class in redempt.crunch.data
Utility class with some methods for parsing base 10 numbers (only ints and doubles for now) that are faster than the standard Java implementation
FastNumberParsing() - Constructor for class redempt.crunch.data.FastNumberParsing
 
finish() - Method in class redempt.crunch.ShuntingYard
 
FLOOR - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
Function - Class in redempt.crunch.functional
Represents a function which can be called in expressions whose environments have it
Function(String, int, ToDoubleFunction<double[]>) - Constructor for class redempt.crunch.functional.Function
Create a Function
FUNCTION - Enum constant in enum class redempt.crunch.token.TokenType
 
FUNCTION_CALL - Enum constant in enum class redempt.crunch.token.TokenType
 
FunctionCall - Class in redempt.crunch.functional
Represents a lazy function call with other lazy values as function arguments
FunctionCall(Function, Value[]) - Constructor for class redempt.crunch.functional.FunctionCall
 

G

get(String) - Method in class redempt.crunch.data.CharTree
Gets a value by its key
getArgCount() - Method in class redempt.crunch.functional.Function
 
getArguments() - Method in class redempt.crunch.functional.ArgumentList
 
getBinaryOperators() - Method in class redempt.crunch.functional.ExpressionEnv
 
getChild() - Method in class redempt.crunch.token.UnaryOperation
 
getClone() - Method in class redempt.crunch.functional.FunctionCall
 
getClone() - Method in class redempt.crunch.token.BinaryOperation
 
getClone() - Method in enum class redempt.crunch.token.Constant
 
getClone() - Method in class redempt.crunch.token.LazyVariable
 
getClone() - Method in class redempt.crunch.token.LiteralValue
 
getClone() - Method in class redempt.crunch.token.UnaryOperation
 
getClone() - Method in interface redempt.crunch.token.Value
 
getClone() - Method in class redempt.crunch.Variable
 
getCursor() - Method in class redempt.crunch.ExpressionParser
 
getFirst() - Method in class redempt.crunch.data.Pair
 
getFrom(String, int) - Method in class redempt.crunch.data.CharTree
Gets a token forward from the given index in a string
getIndex() - Method in class redempt.crunch.Variable
 
getInput() - Method in class redempt.crunch.ExpressionParser
 
getLeadingOperators() - Method in class redempt.crunch.functional.ExpressionEnv
 
getName() - Method in class redempt.crunch.functional.Function
 
getOperation() - Method in enum class redempt.crunch.token.BinaryOperator
 
getOperation() - Method in enum class redempt.crunch.token.UnaryOperator
 
getOperator() - Method in class redempt.crunch.token.BinaryOperation
 
getOperator() - Method in class redempt.crunch.token.UnaryOperation
 
getParser() - Method in exception redempt.crunch.exceptions.ExpressionCompilationException
 
getPriority() - Method in enum class redempt.crunch.token.BinaryOperator
 
getPriority() - Method in enum class redempt.crunch.token.UnaryOperator
 
getSecond() - Method in class redempt.crunch.data.Pair
 
getSymbol() - Method in enum class redempt.crunch.token.BinaryOperator
 
getSymbol() - Method in enum class redempt.crunch.token.UnaryOperator
 
getType() - Method in class redempt.crunch.functional.ArgumentList
 
getType() - Method in class redempt.crunch.functional.Function
 
getType() - Method in class redempt.crunch.functional.FunctionCall
 
getType() - Method in class redempt.crunch.token.BinaryOperation
 
getType() - Method in enum class redempt.crunch.token.BinaryOperator
 
getType() - Method in enum class redempt.crunch.token.Constant
 
getType() - Method in class redempt.crunch.token.LazyVariable
 
getType() - Method in class redempt.crunch.token.LiteralValue
 
getType() - Method in interface redempt.crunch.token.Token
 
getType() - Method in class redempt.crunch.token.UnaryOperation
 
getType() - Method in enum class redempt.crunch.token.UnaryOperator
 
getType() - Method in class redempt.crunch.Variable
 
getValue() - Method in class redempt.crunch.CompiledExpression
Gets the internal Value representation of the expression.
getValue(double[]) - Method in class redempt.crunch.functional.FunctionCall
 
getValue(double[]) - Method in class redempt.crunch.token.BinaryOperation
 
getValue(double[]) - Method in enum class redempt.crunch.token.Constant
 
getValue(double[]) - Method in class redempt.crunch.token.LazyVariable
 
getValue(double[]) - Method in class redempt.crunch.token.LiteralValue
 
getValue(double[]) - Method in class redempt.crunch.token.UnaryOperation
 
getValue(double[]) - Method in interface redempt.crunch.token.Value
 
getValue(double[]) - Method in class redempt.crunch.Variable
 
getValues() - Method in class redempt.crunch.functional.ExpressionEnv
 
getValues() - Method in class redempt.crunch.token.BinaryOperation
 
getVariableCount() - Method in class redempt.crunch.CompiledExpression
Gets the highest index of variables used in this expression.
getVariableCount() - Method in class redempt.crunch.functional.ExpressionEnv
 
getWith(ExpressionParser) - Method in class redempt.crunch.data.CharTree
 
GREATER_THAN - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
GREATER_THAN_OR_EQUAL_TO - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

I

initialize(Value, int) - Method in class redempt.crunch.CompiledExpression
 
isAtEnd() - Method in class redempt.crunch.ExpressionParser
 
isPure() - Method in enum class redempt.crunch.token.UnaryOperator
 

L

LAZY_VARIABLE - Enum constant in enum class redempt.crunch.token.TokenType
 
LazyVariable - Class in redempt.crunch.token
 
LazyVariable(String, DoubleSupplier) - Constructor for class redempt.crunch.token.LazyVariable
 
LESS_THAN - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
LESS_THAN_OR_EQUAL_TO - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
LITERAL_VALUE - Enum constant in enum class redempt.crunch.token.TokenType
 
LiteralValue - Class in redempt.crunch.token
 
LiteralValue(double) - Constructor for class redempt.crunch.token.LiteralValue
 
LOG - Enum constant in enum class redempt.crunch.token.UnaryOperator
 

M

MODULUS - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
MULTIPLY - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

N

NEGATE - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
NOT - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
NOT_EQUAL_TO - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

P

Pair<K,V> - Class in redempt.crunch.data
 
Pair(K, V) - Constructor for class redempt.crunch.data.Pair
 
parse() - Method in class redempt.crunch.ExpressionParser
 
parseDouble(String) - Static method in class redempt.crunch.data.FastNumberParsing
Parse a double from base 10 string input, only real number values are supported (no NaN or Infinity)
parseDouble(String, int, int) - Static method in class redempt.crunch.data.FastNumberParsing
Parse a double from base 10 string input, only real number values are supported (no NaN or Infinity)
parseInt(String) - Static method in class redempt.crunch.data.FastNumberParsing
Parse an integer from base 10 string input
parseInt(String, int, int) - Static method in class redempt.crunch.data.FastNumberParsing
Parse an integer from base 10 string input
peek() - Method in class redempt.crunch.ExpressionParser
 
PI - Enum constant in enum class redempt.crunch.token.Constant
 

R

RAND - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
redempt.crunch - package redempt.crunch
 
redempt.crunch.data - package redempt.crunch.data
 
redempt.crunch.exceptions - package redempt.crunch.exceptions
 
redempt.crunch.functional - package redempt.crunch.functional
 
redempt.crunch.token - package redempt.crunch.token
 
ROUND - Enum constant in enum class redempt.crunch.token.UnaryOperator
 

S

SCIENTIFIC_NOTATION - Enum constant in enum class redempt.crunch.token.BinaryOperator
 
set(String, T) - Method in class redempt.crunch.data.CharTree
Sets a String in this CharTree
setCursor(int) - Method in class redempt.crunch.ExpressionParser
 
setVariableNames(String...) - Method in class redempt.crunch.functional.ExpressionEnv
 
setVariableValues(double[]) - Method in class redempt.crunch.CompiledExpression
 
ShuntingYard - Class in redempt.crunch
 
ShuntingYard() - Constructor for class redempt.crunch.ShuntingYard
 
SIN - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
SINH - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
SQRT - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
SUBTRACT - Enum constant in enum class redempt.crunch.token.BinaryOperator
 

T

TAN - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
TANH - Enum constant in enum class redempt.crunch.token.UnaryOperator
 
Token - Interface in redempt.crunch.token
Represents a parsed token
TokenType - Enum Class in redempt.crunch.token
An enum which represents the various types of Tokens
toString() - Method in class redempt.crunch.CompiledExpression
Converts this CompiledExpression back to a String which can be used to recreate it later
toString() - Method in class redempt.crunch.functional.FunctionCall
 
toString() - Method in class redempt.crunch.token.BinaryOperation
 
toString() - Method in enum class redempt.crunch.token.BinaryOperator
 
toString() - Method in enum class redempt.crunch.token.Constant
 
toString() - Method in class redempt.crunch.token.LazyVariable
 
toString() - Method in class redempt.crunch.token.LiteralValue
 
toString() - Method in class redempt.crunch.token.UnaryOperation
 
toString() - Method in enum class redempt.crunch.token.UnaryOperator
 
toString() - Method in class redempt.crunch.Variable
 
TRUE - Enum constant in enum class redempt.crunch.token.Constant
 

U

UNARY_OPERATION - Enum constant in enum class redempt.crunch.token.TokenType
 
UNARY_OPERATOR - Enum constant in enum class redempt.crunch.token.TokenType
 
UnaryOperation - Class in redempt.crunch.token
 
UnaryOperation(UnaryOperator, Value) - Constructor for class redempt.crunch.token.UnaryOperation
 
UnaryOperator - Enum Class in redempt.crunch.token
 

V

Value - Interface in redempt.crunch.token
Represents a lazy value which can be evaluated
valueOf(String) - Static method in enum class redempt.crunch.token.BinaryOperator
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class redempt.crunch.token.Constant
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class redempt.crunch.token.TokenType
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class redempt.crunch.token.UnaryOperator
Returns the enum constant of this class with the specified name.
values() - Static method in enum class redempt.crunch.token.BinaryOperator
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class redempt.crunch.token.Constant
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class redempt.crunch.token.TokenType
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class redempt.crunch.token.UnaryOperator
Returns an array containing the constants of this enum class, in the order they are declared.
Variable - Class in redempt.crunch
 
Variable(int) - Constructor for class redempt.crunch.Variable
 
VARIABLE - Enum constant in enum class redempt.crunch.token.TokenType
 
variableValues - Variable in class redempt.crunch.CompiledExpression
 
A B C D E F G I L M N P R S T U V 
All Classes and Interfaces|All Packages|Serialized Form