- java.lang.Object
-
- org.chocosolver.memory.structure.BasicIndexedBipartiteSet
-
public final class BasicIndexedBipartiteSet extends Object
-
-
Constructor Summary
Constructors Constructor Description BasicIndexedBipartiteSet(IEnvironment environment, int nbValues)
Create a stored bipartite set with a size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
add()
boolean
bundle(int i)
Returns the bundle in which the i^h object is placed.boolean
contains(int i)
int
get(int index)
boolean
isEmpty()
int
size()
void
swap(int object)
-
-
-
Constructor Detail
-
BasicIndexedBipartiteSet
public BasicIndexedBipartiteSet(IEnvironment environment, int nbValues)
Create a stored bipartite set with a size. Thus the value stored will go from 0 to nbValues.- Parameters:
environment
- a bactrackable environmentnbValues
- capacity
-
-
Method Detail
-
size
public final int size()
-
isEmpty
public final boolean isEmpty()
-
add
public final int add()
-
swap
public void swap(int object)
-
get
public int get(int index)
-
bundle
public boolean bundle(int i)
Returns the bundle in which the i^h object is placed.true
means IN, the object can be swappedfalse
means OUT, the object is already swapped- Parameters:
i
- index of the object- Returns:
- a boolean value: true means can be swapped, false otherwise
-
contains
public boolean contains(int i)
-
-