Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.BoundCost Class Reference

Public Member Functions

 BoundCost (long cPtr, boolean cMemoryOwn)
 
synchronized void delete ()
 
void setBound (long value)
 
long getBound ()
 
void setCost (long value)
 
long getCost ()
 
 BoundCost ()
 
 BoundCost (long bound, long cost)
 

Static Public Member Functions

static long getCPtr (BoundCost obj)
 
static long swigRelease (BoundCost obj)
 

Protected Member Functions

void finalize ()
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

A 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.

Definition at line 25 of file BoundCost.java.

Constructor & Destructor Documentation

◆ BoundCost() [1/3]

com.google.ortools.constraintsolver.BoundCost.BoundCost ( long cPtr,
boolean cMemoryOwn )

Definition at line 29 of file BoundCost.java.

◆ BoundCost() [2/3]

com.google.ortools.constraintsolver.BoundCost.BoundCost ( )

Definition at line 81 of file BoundCost.java.

◆ BoundCost() [3/3]

com.google.ortools.constraintsolver.BoundCost.BoundCost ( long bound,
long cost )

Definition at line 85 of file BoundCost.java.

Member Function Documentation

◆ delete()

synchronized void com.google.ortools.constraintsolver.BoundCost.delete ( )

Definition at line 55 of file BoundCost.java.

◆ finalize()

void com.google.ortools.constraintsolver.BoundCost.finalize ( )
protected

Definition at line 51 of file BoundCost.java.

◆ getBound()

long com.google.ortools.constraintsolver.BoundCost.getBound ( )

Definition at line 69 of file BoundCost.java.

◆ getCost()

long com.google.ortools.constraintsolver.BoundCost.getCost ( )

Definition at line 77 of file BoundCost.java.

◆ getCPtr()

static long com.google.ortools.constraintsolver.BoundCost.getCPtr ( BoundCost obj)
static

Definition at line 34 of file BoundCost.java.

◆ setBound()

void com.google.ortools.constraintsolver.BoundCost.setBound ( long value)

Definition at line 65 of file BoundCost.java.

◆ setCost()

void com.google.ortools.constraintsolver.BoundCost.setCost ( long value)

Definition at line 73 of file BoundCost.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.BoundCost.swigRelease ( BoundCost obj)
static

Definition at line 38 of file BoundCost.java.

Member Data Documentation

◆ swigCMemOwn

transient boolean com.google.ortools.constraintsolver.BoundCost.swigCMemOwn
protected

Definition at line 27 of file BoundCost.java.


The documentation for this class was generated from the following file: