Package com.artelys.kalis
Class KLinRel
- java.lang.Object
-
- com.artelys.kalis.KRelation
-
- com.artelys.kalis.KLinRel
-
public class KLinRel extends KRelation
This class represents a linear relation (equality or inequality) between variables.
Variables involved in the KLinRel object can be a mix of KNumVar and KAuxVar.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.artelys.kalis.KRelation
KRelation.Comparator
-
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KRelation
swigCMemOwn
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(KAuxVar var)
Add a term (variable "times" coefficient) to the relation.
void
add(KAuxVar var, double coeff)
Add a term (variable "times" coefficient) to the relation.
void
add(KLinRel relation)
Add all the terms of the given relation (no reduction).
void
add(KNumVar var)
Add a term (variable "times" coefficient) to the relation.
void
add(KNumVar var, double coeff)
Add a term (variable "times" coefficient) to the relation.
void
assign(KLinRel relation)
void
clear()
void
delete()
protected void
finalize()
protected static long
getCPtr(KLinRel obj)
void
invert(KLinRel relation)
boolean
isSatisfied(KHybridSolution sol)
Is the linear relation satisfied for this instantiation ?
void
mult(KLinRel relation, double real)
void
print()
Pretty-print the equation.void
print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
void
printStat()
Print statistics about the equation.-
Methods inherited from class com.artelys.kalis.KRelation
add, assign, getComparator, getConstant, getCPtr, getInternalPtr, mult, setComparator, setConstant, setLB, setUB
-
-
-
-
Constructor Detail
-
KLinRel
protected KLinRel(long cPtr, boolean cMemoryOwn)
-
KLinRel
public KLinRel(KProblem problem)
Constructor with a problem.
-
KLinRel
public KLinRel(KProblem problem, java.lang.String name)
Constructor with a problem and aname.- Parameters:
problem
- problem to which the KLinRel object is relatedname
- the name of the variable (used for printing)
-
KLinRel
public KLinRel(KLinRel arg0)
Copy constructor.
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KLinRel obj)
-
add
public void add(KNumVar var, double coeff)
Add a term (variable "times" coefficient) to the relation.
- Parameters:
var
- the variable involvedcoeff
- its coefficient
-
add
public void add(KNumVar var)
Add a term (variable "times" coefficient) to the relation.
- Parameters:
var
- the variable involved
-
add
public void add(KAuxVar var, double coeff)
Add a term (variable "times" coefficient) to the relation.
- Parameters:
var
- the variable involvedcoeff
- its coefficient
-
add
public void add(KAuxVar var)
Add a term (variable "times" coefficient) to the relation.
- Parameters:
var
- the variable involved
-
add
public void add(KLinRel relation)
Add all the terms of the given relation (no reduction).
- Parameters:
relation
- the relation to add
-
assign
public void assign(KLinRel relation)
-
invert
public void invert(KLinRel relation)
-
mult
public void mult(KLinRel relation, double real)
-
print
public void print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
-
printStat
public void printStat()
Print statistics about the equation.
-
isSatisfied
public boolean isSatisfied(KHybridSolution sol)
Is the linear relation satisfied for this instantiation ?
- Overrides:
isSatisfied
in classKRelation
- Parameters:
sol
- hybrid solution to check
-
-