public class ArraysMath extends Object
| Constructor and Description |
|---|
ArraysMath() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkVectorAssignment(Model model,
MathContainer mathContainer) |
static boolean |
checkVectorMath(Model model,
MathContainer mathContainer) |
static boolean |
evaluateBounds(Map<String,Double> dimensionSizes,
ASTNode math,
double size)
This method is used to check 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)
This method is used to check if the index math does not go out of bounds.
|
static boolean |
evaluateIndexBounds(Model model,
SBase reference,
int arrayDim,
ASTNode math,
Map<String,Double> dimSizes)
|
static boolean |
evaluateIndexBounds(Model model,
SBase parent,
String refAttribute,
ASTNode math,
int arrayDim)
|
static boolean |
evaluateSelectorBounds(Model model,
MathContainer mathContainer)
This is used to check if the arguments of a selector function does not go out of bounds.
|
static Map<String,Double> |
getDimensionSizes(Model model,
ArraysSBasePlugin arraysSBasePlugin)
This method maps a dimension id to the size of the dimension object.
|
static Map<String,Double> |
getLowerBound(Map<String,Double> dimSizes)
This method is used to get the lower bound index from a collection of Dimension objects.
|
static ArraysSBasePlugin |
getParentPlugin(Index index,
SBase parent) |
static ArraysSBasePlugin |
getParentPlugin(MathContainer math,
SBase parent) |
static int |
getSize(Model model,
Dimension dimension)
Gets the size of a Dimension object.
|
static Map<String,Double> |
getUpperBound(Map<String,Double> dimSizes)
This method is used to get the upper bound index from a collection of Dimension objects.
|
static Map<Integer,Integer> |
getVectorDimensionSizes(Model model,
ASTNode math)
This is used to obtain a map containing a pair of array depth level and its size.
|
static boolean |
isStaticallyComputable(Model model,
ASTNode math,
String... constantIds)
This method is used to determine 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)
This method is used to determine whether a
MathContainer object is
statically computable. |
static boolean |
isStaticallyComputable(Model model,
MathContainer mathContainer)
This method is used to determine whether a
MathContainer object is statically computable. |
static boolean |
isStaticallyComputable(Model model,
MathContainer mathContainer,
String... constantIds)
This method is used to determine 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(Map<String,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, Map<String,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, 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 Map<String,Double> getDimensionSizes(Model model, ArraysSBasePlugin arraysSBasePlugin)
model - arraysSBasePlugin - public static Map<String,Double> getLowerBound(Map<String,Double> dimSizes)
dimSizes - public static Map<String,Double> getUpperBound(Map<String,Double> dimSizes)
dimSizes - public static ArraysSBasePlugin getParentPlugin(Index index, SBase parent)
public static ArraysSBasePlugin getParentPlugin(MathContainer math, SBase parent)
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, String... constantIds)
MathContainer object is statically computable given
a list of ids that can appear in the math.model - mathContainer - public static boolean isStaticallyComputable(Model model, ASTNode math, 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)
public static boolean checkVectorMath(Model model, MathContainer mathContainer)
model - mathContainer - public static boolean checkVectorAssignment(Model model, MathContainer mathContainer)
model - mathContainer - public static Map<Integer,Integer> getVectorDimensionSizes(Model model, ASTNode math)
math - public static boolean isVectorBalanced(Model model, MathContainer mathContainer)
Copyright © 2009–2016. All rights reserved.