public class ComparableVariable extends Object implements Comparable
| Constructor and Description |
|---|
ComparableVariable(Var var)
Creates a new LP integer Variable based on a constrained var
|
ComparableVariable(VarReal var)
Creates a new LP real Variable based on a constrained var
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object obj)
Used for sorting arrays of LpVariables by their names
|
String |
getName() |
Var |
getVar() |
VarReal |
getVarReal() |
boolean |
isInteger() |
boolean |
isReal() |
public ComparableVariable(Var var)
var - a integer variablepublic ComparableVariable(VarReal var)
var - a real constrained variablepublic int compareTo(Object obj)
compareTo in interface Comparableobj - an object to compare withpublic String getName()
public boolean isInteger()
public boolean isReal()
public Var getVar()
public VarReal getVarReal()
Copyright © 2024. All rights reserved.