Class BoundCost
- java.lang.Object
-
- com.google.ortools.constraintsolver.BoundCost
-
public class BoundCost extends java.lang.ObjectA structure meant to store soft bounds and associated violation constants.
It is 'Simple' because it has one BoundCost per element,
in contrast to 'Multiple'. Design notes:
- it is meant to store model information to be shared through pointers,
so it disallows copy and assign to avoid accidental duplication.
- it keeps soft bounds as an array of structs to help cache,
because code that uses such bounds typically use both bound and cost.
- soft bounds are named pairs, prevents some mistakes.
- using operator[] to access elements is not interesting,
because the structure will be accessed through pointers, moreover having
to type bound_cost reminds the user of the order if they do a copy
assignment of the element.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanswigCMemOwn
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()protected voidfinalize()longgetBound()longgetCost()static longgetCPtr(BoundCost obj)voidsetBound(long value)voidsetCost(long value)static longswigRelease(BoundCost obj)
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(BoundCost obj)
-
swigRelease
public static long swigRelease(BoundCost obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
delete
public void delete()
-
setBound
public void setBound(long value)
-
getBound
public long getBound()
-
setCost
public void setCost(long value)
-
getCost
public long getCost()
-
-