public class StrippedPartition
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
StrippedPartition(Data rs,
java.lang.String col,
int numberOfRows)
This constructor expects a Resultset in order to initialize the class
|
StrippedPartition(int[] newelements,
int noofelements,
int noofsets)
Initializes a stripped partition, its elements are known.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deletes the elements of the partition.
|
double |
error()
Calculated the error e(X) of a given elements by equation (1) of the paper
|
int[] |
getElements()
Returns the elements of the parition
|
int |
getNoofelements()
Returns the sum of sizes of the equivalence classes.
|
long |
getPosition()
This method is only useful when the partition is stored in a file.
|
boolean |
isInMemory()
Returns if a partition is hold in memory.
|
void |
print()
Prints the stripped partition.
|
void |
setElements(int[] elements)
Sets the elements of the stripped partition.
|
void |
setPosition(long position)
Sets the position in the swapped file, the partition can be found.
|
public StrippedPartition(Data rs, java.lang.String col, int numberOfRows)
java.sql.SQLException
- - if the an error arises during processing the resultsetpublic StrippedPartition(int[] newelements, int noofelements, int noofsets)
newelements
- - the elements of the partitionnoofelements
- - sum of sizes of the equivalence classesnoofsets
- -number of equivalence classespublic double error()
public void print()
public void clear()
public int[] getElements()
public void setElements(int[] elements)
elements
- - The elements the partition containspublic long getPosition()
public void setPosition(long position)
position
- - the position in the filepublic boolean isInMemory()
public int getNoofelements()