public class IntArray
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description | 
|---|---|
protected int[] | 
array  | 
protected int | 
size  | 
| Constructor and Description | 
|---|
IntArray()  | 
IntArray(int size)  | 
IntArray(int[] array)  | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.Object | 
clone()  | 
static boolean | 
equalIntArrays(int[] u,
              int[] v)  | 
boolean | 
equals(java.lang.Object obj)
Checks if this intArray is equal on the indices of each block and
 has the values specified by  
values. | 
int | 
get(int i)  | 
int[] | 
getArray()  | 
int | 
hashCode()  | 
static java.lang.String | 
intArrayToString(int[] array)  | 
boolean | 
isConstant()  | 
boolean | 
isIdempotent()
Test if this represents an idempotent function; that is,
 one satisfying the equation f(f(x)) ≈ f(x). 
 | 
static java.util.Comparator<IntArray> | 
lexicographicComparitor()  | 
boolean | 
satisfiesBlocksConstraint(int[][] blocks)
Test if the intArray is constant on each block of the
 partition defined by blocks. 
 | 
boolean | 
satisfiesCongruenceConstraint(int index,
                             Partition alpha,
                             int elemIndex)
Test if this IntArray's value at index is congruent mod alpha to 
 the element with index elemIndex. 
 | 
boolean | 
satisfiesSetConstraint(int index,
                      java.util.Set<java.lang.Integer> possibleValues)
Test if this IntArray value at index is in a set
 of possibleValues. 
 | 
boolean | 
satisfiesValuesConstraint(int[][] values)
Test if this satisfies array[i] = v for each [i,v] in values. 
 | 
void | 
set(int index,
   int value)  | 
void | 
setIntArray(int[] v)  | 
static int[] | 
stringToArray(java.lang.String str)
If str is a sequence of ints separated by either commas
 or spaces, this puts them into an array. 
 | 
int[] | 
toArray()  | 
java.lang.String | 
toString()  | 
int | 
universeSize()  | 
public IntArray()
public IntArray(int[] array)
public IntArray(int size)
public boolean satisfiesBlocksConstraint(int[][] blocks)
blocks - the blocks of a partition on the index setpublic boolean satisfiesValuesConstraint(int[][] values)
values - an array of pairs [i,v] specifying array[i] = vpublic boolean satisfiesSetConstraint(int index,
                                      java.util.Set<java.lang.Integer> possibleValues)
index - the index to testpossibleValues - a set of possible valuespublic boolean satisfiesCongruenceConstraint(int index,
                                             Partition alpha,
                                             int elemIndex)
index - alpha - elemIndex - public final boolean equals(java.lang.Object obj)
values.equals in class java.lang.Objectblocks - an array of the level blocksvalues - an array of pairs [i,v] specifying array[i] = vpublic final int hashCode()
hashCode in class java.lang.Objectpublic final int[] toArray()
public final int[] getArray()
public final int universeSize()
public final void setIntArray(int[] v)
public final int get(int i)
public final void set(int index,
                      int value)
public boolean isIdempotent()
true iff f(f(x)) = f(x) for all 0 ≤ x < size.public boolean isConstant()
public static java.util.Comparator<IntArray> lexicographicComparitor()
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic static final java.lang.String intArrayToString(int[] array)
public static final boolean equalIntArrays(int[] u,
                                           int[] v)
public static int[] stringToArray(java.lang.String str)
str - Copyright 2003 Ralph Freese. All Rights Reserved.