fuzzydl
Class Degree

java.lang.Object
  extended by fuzzydl.Degree
Direct Known Subclasses:
DegreeExpression, DegreeNumeric, DegreeVariable

public abstract class Degree
extends java.lang.Object

Degree.


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

Constructor Detail

Degree

public Degree()
Method Detail

getDegree

public static Degree getDegree(java.lang.Double numeric)
Constructor for a numeric degree.

Parameters:
numeric - A double number in [0,1].
Returns:
A numeric degree.

getDegree

public static Degree getDegree(Variable variable)
Constructor for a variable degree.

Parameters:
variable - A variable.
Returns:
A variable degree.

getDegree

public static Degree getDegree(Expression expr)
Constructor for an expression degree.

Parameters:
expr - An expression.
Returns:
A expression degree.

isNumeric

public abstract boolean isNumeric()
Checks if the object is a numeric degree.

Returns:
true if the object is a numeric degree; false otherwise.

getSolutionValue

public abstract double getSolutionValue()
Gets a numerical value of the solution.

Returns:
A numerical value of the solution.

createInequalityWithDegreeRHS

public abstract Inequation createInequalityWithDegreeRHS(Expression expr,
                                                         int inequationType)
Gets an inequality of the form (expression, type, degree).

Parameters:
expr - An expression.
inequationType - A type of inequality.
Returns:
An inequality of the form (expression, type, degree).

addToExpression

public abstract Expression addToExpression(Expression expr)
Adds the degree to an expression.

Parameters:
expr - An expression.
Returns:
A new expression with the sum.

subtractFromExpression

public abstract Expression subtractFromExpression(Expression expr)
Subtracts the degree to an expression.

Parameters:
expr - An expression.
Returns:
A new expression with the subtraction expr - this.

multiplyConstant

public abstract Expression multiplyConstant(java.lang.Double constant)
Multiplies the degree and a real number.

Parameters:
constant - A real number.
Returns:
A new expression with the product.