public class ArraysMath
extends java.lang.Object
| Constructor | Description |
|---|---|
ArraysMath() |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
checkVectorAssignment(Model model,
MathContainer mathContainer) |
|
static boolean |
checkVectorMath(Model model,
MathContainer mathContainer) |
|
static boolean |
evaluateBounds(java.util.Map<java.lang.String,java.lang.Double> dimensionSizes,
ASTNode math,
double size) |
Checks if the math does not evaluate to a negative number or to a value greater or
equal to a given size value.
|
static boolean |
evaluateIndexBounds(Model model,
Index index) |
Checks if the index math does not go out of bounds.
|
static boolean |
evaluateIndexBounds(Model model,
SBase reference,
int arrayDim,
ASTNode math,
java.util.Map<java.lang.String,java.lang.Double> dimSizes) |
|
static boolean |
evaluateIndexBounds(Model model,
SBase parent,
java.lang.String refAttribute,
ASTNode math,
int arrayDim) |
|
static boolean |
evaluateSelectorBounds(Model model,
MathContainer mathContainer) |
Checks if the arguments of a selector function does not go out of bounds.
|
static java.util.Map<java.lang.String,java.lang.Double> |
getDimensionSizes(Model model,
ArraysSBasePlugin arraysSBasePlugin) |
Maps a dimension id to the size of the dimension object.
|
static java.util.Map<java.lang.String,java.lang.Double> |
getLowerBound(java.util.Map<java.lang.String,java.lang.Double> dimSizes) |
Returns the lower bound index from a collection of Dimension objects.
|
static int |
getSize(Model model,
Dimension dimension) |
Gets the size of a Dimension object.
|
static java.util.Map<java.lang.String,java.lang.Double> |
getUpperBound(java.util.Map<java.lang.String,java.lang.Double> dimSizes) |
Returns the upper bound index from a collection of Dimension objects.
|
static java.util.Map<java.lang.Integer,java.lang.Integer> |
getVectorDimensionSizes(Model model,
ASTNode math) |
Returns a map containing a pair of array depth level and its size.
|
static boolean |
isStaticallyComputable(Model model,
ASTNode math,
java.lang.String... constantIds) |
Determines whether a
MathContainer object is
statically computable given a list of ids that can appear in the math. |
static boolean |
isStaticallyComputable(Model model,
Index index) |
Determines whether a
MathContainer object is statically computable. |
static boolean |
isStaticallyComputable(Model model,
MathContainer mathContainer) |
Determines whether a
MathContainer object is statically computable. |
static boolean |
isStaticallyComputable(Model model,
MathContainer mathContainer,
java.lang.String... constantIds) |
Determines whether a
MathContainer object is statically computable given
a list of ids that can appear in the math. |
static boolean |
isVectorBalanced(Model model,
MathContainer mathContainer) |
|
static boolean |
isVectorOperation(ASTNode math) |
public static boolean evaluateBounds(java.util.Map<java.lang.String,java.lang.Double> dimensionSizes,
ASTNode math,
double size)
dimensionSizes - math - size - public static boolean evaluateIndexBounds(Model model, Index index)
model - index - public static boolean evaluateIndexBounds(Model model, SBase reference, int arrayDim, ASTNode math, java.util.Map<java.lang.String,java.lang.Double> dimSizes)
Index object to a parent
SBase object for referencing another SBase object does not
cause out-of-bounds issues.model - reference - arrayDim - math - dimSizes - public static boolean evaluateIndexBounds(Model model, SBase parent, java.lang.String refAttribute, ASTNode math, int arrayDim)
Index object to a parent
SBase object for referencing another SBase object does not
cause out-of-bounds issues.model - parent - refAttribute - math - arrayDim - public static boolean evaluateSelectorBounds(Model model, MathContainer mathContainer)
model - mathContainer - public static int getSize(Model model, Dimension dimension)
model - dimension - public static java.util.Map<java.lang.String,java.lang.Double> getDimensionSizes(Model model, ArraysSBasePlugin arraysSBasePlugin)
model - arraysSBasePlugin - public static java.util.Map<java.lang.String,java.lang.Double> getLowerBound(java.util.Map<java.lang.String,java.lang.Double> dimSizes)
dimSizes - public static java.util.Map<java.lang.String,java.lang.Double> getUpperBound(java.util.Map<java.lang.String,java.lang.Double> dimSizes)
dimSizes - public static boolean isStaticallyComputable(Model model, Index index)
MathContainer object is statically computable.model - index - public static boolean isStaticallyComputable(Model model, MathContainer mathContainer)
MathContainer object is statically computable.model - mathContainer - public static boolean isStaticallyComputable(Model model, MathContainer mathContainer, java.lang.String... constantIds)
MathContainer object is statically computable given
a list of ids that can appear in the math.model - mathContainer - constantIds - public static boolean isStaticallyComputable(Model model, ASTNode math, java.lang.String... constantIds)
MathContainer object is
statically computable given a list of ids that can appear in the math.model - math - constantIds - public static boolean isVectorOperation(ASTNode math)
math - public static boolean checkVectorMath(Model model, MathContainer mathContainer)
model - mathContainer - public static boolean checkVectorAssignment(Model model, MathContainer mathContainer)
model - mathContainer - public static java.util.Map<java.lang.Integer,java.lang.Integer> getVectorDimensionSizes(Model model, ASTNode math)
model - math - public static boolean isVectorBalanced(Model model, MathContainer mathContainer)
model - mathContainer -