Package org.chocosolver.memory.structure
Class BasicIndexedBipartiteSet
- 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 intadd()booleanbundle(int i)Returns the bundle in which the i^h object is placed.booleancontains(int i)intget(int index)booleanisEmpty()intsize()voidswap(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.truemeans IN, the object can be swappedfalsemeans 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)
-
-