public final class BasicIndexedBipartiteSet extends Object
Modifier and Type | Field and Description |
---|---|
protected IStateInt |
first
The first element of the list
|
protected int[] |
list
The list of values
|
protected int[] |
position
The position of each element within the list.
|
protected int |
size
The size of the valid list
|
Constructor and Description |
---|
BasicIndexedBipartiteSet(IEnvironment environment,
int nbValues)
Create a stored bipartite set with a size.
|
protected int[] list
protected int[] position
protected IStateInt first
protected int size
public BasicIndexedBipartiteSet(IEnvironment environment, int nbValues)
environment
- a bactrackable environmentnbValues
- capacitypublic final int size()
public final boolean isEmpty()
public final int add()
public void swap(int object)
public int get(int index)
public boolean bundle(int i)
true
means IN, the object can be swapped
false
means OUT, the object is already swappedi
- index of the objectpublic boolean contains(int i)
Copyright © 2015. All rights reserved.