public class Variable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
BINARY_VARIABLE
Binary variable
|
static char |
FREE_VARIABLE
Real variable
|
static char |
INTEGER_VARIABLE
Integer variable
|
static char |
UP_VARIABLE
[0-1] variable
|
Constructor and Description |
---|
Variable(java.lang.String name,
char type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getLowerBound()
Gets the lower bound of the variable.
|
static Variable |
getNewVariable(char type)
Gets a new variable.
|
char |
getType()
Gets the type of the variable.
|
double |
getUpperBound()
Gets the upper bound of the variable.
|
void |
setBinaryVariable()
Makes the variable binary.
|
void |
setName(java.lang.String name)
Sets the name of the variable.
|
void |
setType(char type)
Sets the type of the variable.
|
java.lang.String |
toString()
Gets the name of the variable.
|
public static final char BINARY_VARIABLE
public static final char FREE_VARIABLE
public static final char INTEGER_VARIABLE
public static final char UP_VARIABLE
public Variable(java.lang.String name, char type)
name
- Name of the variable.type
- Type of the variable.public double getLowerBound()
public char getType()
public double getUpperBound()
public void setBinaryVariable()
public void setName(java.lang.String name)
name
- Name of the variablepublic void setType(char type)
type
- Type of the variablepublic static Variable getNewVariable(char type)
type
- Type of the bound.public java.lang.String toString()
toString
in class java.lang.Object