org.sbml.jsbml.ext.arrays.util
public class ArraysMath extends java.lang.Object
Constructor and Description |
---|
ArraysMath() |
Modifier and Type | Method and Description |
---|---|
private static boolean |
checkSizeRecursive(Model model,
java.util.Map<java.lang.Integer,java.lang.Integer> sizeByLevel,
ASTNode node,
int level)
This is used to check if the array is regular.
|
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)
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,
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)
This is used to check 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)
This method 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)
This method is used to get the lower bound index from a collection of Dimension objects.
|
static int |
getSize(Model model,
Dimension dimension)
Gets the size of a Dimension object.
|
private static void |
getSizeRecursive(java.util.Map<java.lang.Integer,java.lang.Integer> sizeByLevel,
Model model,
ASTNode node,
int level)
This is used to determine how many levels deep the array is and what is the corresponding
size of each level.
|
static java.util.Map<java.lang.String,java.lang.Double> |
getUpperBound(java.util.Map<java.lang.String,java.lang.Double> dimSizes)
This method is used to get 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)
This is used to obtain a map containing a pair of array depth level and its size.
|
static boolean |
isStaticallyComputable(Model model,
ASTNode math,
java.lang.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,
MathContainer mathContainer)
This method is used to determine whether a
MathContainer object is statically computable. |
static boolean |
isStaticallyComputable(Model model,
MathContainer mathContainer,
java.lang.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(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
- parent
- reference
- math
- arrayDim
- 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
- reference
- 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, 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
- 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
- mathContainer
- 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 java.util.Map<java.lang.Integer,java.lang.Integer> getVectorDimensionSizes(Model model, ASTNode math)
math
- private static void getSizeRecursive(java.util.Map<java.lang.Integer,java.lang.Integer> sizeByLevel, Model model, ASTNode node, int level)
sizeByLevel
- node
- level
- public static boolean isVectorBalanced(Model model, MathContainer mathContainer)