fuzzydl
Class DegreeExpression

java.lang.Object
  extended by fuzzydl.Degree
      extended by fuzzydl.DegreeExpression

public class DegreeExpression
extends Degree

Degree defined using an expression.


Constructor Summary
DegreeExpression(Expression expr)
           
 
Method Summary
 Expression addToExpression(Expression expr)
          Adds the degree to an expression.
 Inequation createInequalityWithDegreeRHS(Expression expr, int inequationType)
          Gets an inequality of the form (expression, type, degree).
 Expression getExpression()
          Gets the expression which defines the degree.
 double getSolutionValue()
          Gets a numerical value of the solution.
 boolean isNumeric()
          Checks if the object is a numeric degree.
 Expression multiplyConstant(java.lang.Double constant)
          Multiplies the degree and a real number.
 Expression subtractFromExpression(Expression expr)
          Subtracts the degree to an expression.
 java.lang.String toString()
           
 
Methods inherited from class fuzzydl.Degree
getDegree, getDegree, getDegree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DegreeExpression

public DegreeExpression(Expression expr)
Method Detail

getExpression

public Expression getExpression()
Gets the expression which defines the degree.

Returns:
Expression which defines the degree.

createInequalityWithDegreeRHS

public Inequation createInequalityWithDegreeRHS(Expression expr,
                                                int inequationType)
Description copied from class: Degree
Gets an inequality of the form (expression, type, degree).

Specified by:
createInequalityWithDegreeRHS in class Degree
Parameters:
expr - An expression.
inequationType - A type of inequality.
Returns:
An inequality of the form (expression, type, degree).

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSolutionValue

public double getSolutionValue()
Description copied from class: Degree
Gets a numerical value of the solution.

Specified by:
getSolutionValue in class Degree
Returns:
A numerical value of the solution.

isNumeric

public boolean isNumeric()
Description copied from class: Degree
Checks if the object is a numeric degree.

Specified by:
isNumeric in class Degree
Returns:
true if the object is a numeric degree; false otherwise.

addToExpression

public Expression addToExpression(Expression expr)
Description copied from class: Degree
Adds the degree to an expression.

Specified by:
addToExpression in class Degree
Parameters:
expr - An expression.
Returns:
A new expression with the sum.

subtractFromExpression

public Expression subtractFromExpression(Expression expr)
Description copied from class: Degree
Subtracts the degree to an expression.

Specified by:
subtractFromExpression in class Degree
Parameters:
expr - An expression.
Returns:
A new expression with the subtraction expr - this.

multiplyConstant

public Expression multiplyConstant(java.lang.Double constant)
Description copied from class: Degree
Multiplies the degree and a real number.

Specified by:
multiplyConstant in class Degree
Parameters:
constant - A real number.
Returns:
A new expression with the product.