org.matheclipse.core.eval.util
Class LevelSpecification
- java.lang.Object
-
- org.matheclipse.core.eval.util.LevelSpec
-
- org.matheclipse.core.eval.util.LevelSpecification
-
public class LevelSpecification extends LevelSpec
Level specification for expression trees
-
-
Constructor Summary
Constructors Constructor and Description LevelSpecification()Create a LevelSpecification with level from 0 to Integer.MAX_VALUELevelSpecification(IExpr expr, boolean includeHeads)Create a LevelSpecification from an IInteger or IAST list-object.
Ifexpris a non-negative IInteger iValue set Level {1,iValue};
Ifexpris a negative IInteger iValue set Level {iValue, 0};
Ifexpris a List {i0Value, i1Value} set Level {i0Value, i1Value};LevelSpecification(int level)Create a LevelSpecification with only the given levelLevelSpecification(int levelFrom, int levelTo)Create a LevelSpecification with the given level range
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareDepth(int i)intcompareLevel()intcompareLevel(int i)intgetFrom()Get the low level-limitintgetTo()Get the high level-limit.booleanincludesDepth(int i)booleanincludesLevel(int i)voidsetFrom(int i)voidsetTo(int i)-
Methods inherited from class org.matheclipse.core.eval.util.LevelSpec
decCurrentDepth, decCurrentLevel, getCurrentDepth, getCurrentLevel, getFromDepth, getFromLevel, getToDepth, getToLevel, incCurrentLevel, isIncludeHeads, isInRange, isInScope, resetCurrentLevel, setCurrentDepth, setCurrentLevel, setFromLevelAsCurrent, setToLevelAsCurrent
-
-
-
-
Constructor Detail
-
LevelSpecification
public LevelSpecification()
Create a LevelSpecification with level from 0 to Integer.MAX_VALUE
-
LevelSpecification
public LevelSpecification(IExpr expr, boolean includeHeads)
Create a LevelSpecification from an IInteger or IAST list-object.
Ifexpris a non-negative IInteger iValue set Level {1,iValue};
Ifexpris a negative IInteger iValue set Level {iValue, 0};
Ifexpris a List {i0Value, i1Value} set Level {i0Value, i1Value};- Parameters:
expr-includeHeads- TODO- Throws:
MathException- if the expr is not a level specification
-
LevelSpecification
public LevelSpecification(int level)
Create a LevelSpecification with only the given level
-
LevelSpecification
public LevelSpecification(int levelFrom, int levelTo)Create a LevelSpecification with the given level range
-
-
Method Detail
-
getFrom
public int getFrom()
Get the low level-limit- Returns:
- the
fromvalue of the level instance
-
getTo
public int getTo()
Get the high level-limit.- Returns:
- the
tovalue of the level instance
-
includesDepth
public final boolean includesDepth(int i)
-
includesLevel
public final boolean includesLevel(int i)
-
compareDepth
public final int compareDepth(int i)
-
compareLevel
public final int compareLevel()
-
compareLevel
public final int compareLevel(int i)
-
setFrom
public void setFrom(int i)
- Parameters:
i-
-
setTo
public void setTo(int i)
- Parameters:
i-
-
-
DMelt 3.0 © DataMelt by jWork.ORG