public class Tuples extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
arity |
protected boolean |
feasible |
protected int[] |
ranges |
protected List<int[]> |
tuples |
Modifier and Type | Method and Description |
---|---|
void |
add(int... tuple)
Add a new tuple to the set of tuples
|
void |
add(int[]... tuples)
Add a tuple set
|
int[] |
get(int idx)
Return the idx^th tuple
|
boolean |
isFeasible()
Return true if these are allowed tuples, false otherwise
|
int |
max(int idx)
Return the maximum value for the idx^th column among all tuples
|
int |
min(int idx)
Return the minimum value for the idx^th column among all tuples
|
int |
nbTuples()
Return the number of tuples stored
|
void |
sort() |
int[][] |
toMatrix() |
String |
toString() |
protected final boolean feasible
protected final List<int[]> tuples
protected int arity
protected int[] ranges
public void add(int... tuple)
tuple
- a tuple.SolverException
- if the size of the tuple added does not correspond to a the previous ones (if any).public void add(int[]... tuples)
tuples
- tuple setpublic boolean isFeasible()
public int min(int idx)
idx
- idx of the columnpublic int max(int idx)
idx
- index of the columnpublic int nbTuples()
public int[] get(int idx)
public int[][] toMatrix()
public void sort()
Copyright © 2015. All rights reserved.