public class Fraction extends Term
| Modifier and Type | Field and Description | 
|---|---|
private Term | 
denominator
The denominator of the fraction. 
 | 
private Term | 
nominator
The nominator of the fraction. 
 | 
| Constructor and Description | 
|---|
Fraction(Term nominator,
        Term denominator)
Creates a new fraction of the two given terms. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
collapseAssociativeOperations()
This method collapses all associative operations appearing
 in this term, e.g. 
 | 
Term | 
derive(Variable v)
Differentiates the term with respect to the given variable. 
 | 
void | 
expandAssociativeOperations()
This method expands all associative operations appearing
 in this term, e.g. 
 | 
java.util.Set<AbsoluteValue> | 
getAbsoluteValues()
Returns all absolute values of this term. 
 | 
java.util.Set<Maximum> | 
getMaximums()
Returns all maximums of this term. 
 | 
java.util.Set<Minimum> | 
getMinimums()
Returns all minimums of this term. 
 | 
java.util.Set<Product> | 
getProducts()
Returns all products of this term. 
 | 
java.util.Set<Variable> | 
getVariables()
Returns all variables in this term. 
 | 
boolean | 
isContinuous(Variable v)
Checks whether this term is continuous in v. 
 | 
boolean | 
isInteger()
Checks whether this term represents an integer value. 
 | 
Term | 
replaceTerm(Term toSubstitute,
           Term substitution)
Replaces each occurrence of "toSubstitute" by "substitution" and
 return the new term. 
 | 
Term | 
simplify()
Simplifies this term in an equivalent way: 
- Replaces products that contain a zero by the constant zero - Removes a term one from products - Removes a term zero from sums - Aggregates constants in sums, products, and minimums - Evaluates functional terms on constants - Simplifies fractions where possible.  | 
Sum | 
toLinearForm()
Converts this term into a linear normal form, i.e. 
 | 
java.lang.String | 
toString()  | 
Constant | 
value()
Computes the actual value of this term if it contains no variables. 
 | 
add, doubleValue, evaluateMatrix, evaluateVector, evaluateVector, isContinuous, isLinear, min, minus, mult, replaceAllTerms, replaceAllTermsprivate Term nominator
private Term denominator
public void collapseAssociativeOperations()
TermcollapseAssociativeOperations in class Termpublic Term derive(Variable v) throws NonDifferentiableException
Termderive in class Termv - a variable.NonDifferentiableException - if the term cannot be
        differentiated.public void expandAssociativeOperations()
TermexpandAssociativeOperations in class Termpublic java.util.Set<AbsoluteValue> getAbsoluteValues()
TermgetAbsoluteValues in class Termpublic java.util.Set<Minimum> getMinimums()
TermgetMinimums in class Termpublic java.util.Set<Maximum> getMaximums()
TermgetMaximums in class Termpublic java.util.Set<Product> getProducts()
TermgetProducts in class Termpublic java.util.Set<Variable> getVariables()
TermgetVariables in class Termpublic boolean isInteger()
Termpublic boolean isContinuous(Variable v)
TermisContinuous in class Termpublic Term replaceTerm(Term toSubstitute, Term substitution)
TermreplaceTerm in class TermtoSubstitute - the term to be substitutedsubstitution - the new termpublic Term simplify()
Termpublic Sum toLinearForm() throws java.lang.IllegalArgumentException
TermtoLinearForm in class Termjava.lang.IllegalArgumentException - if this term cannot be 
 converted into a linear normal form.