|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unipi.di.textdb.TextDB
it.unipi.di.textdb.BucketedPPM
public class BucketedPPM
Field Summary |
---|
Fields inherited from class it.unipi.di.textdb.TextDB |
---|
DEFAULT_FIELD_SEPARATOR |
Constructor Summary | |
---|---|
BucketedPPM(String filename)
|
Method Summary | |
---|---|
TextDB |
build(PrintStream log)
Builds the TextDB over the textual file identified by the filename string used in the constructor (see TextDB.TextDB(String) ). |
static TextDB |
build(String filename,
int contextSize,
int minFreq,
int memLimit,
int blockSize,
int bucketSize,
PrintStream log)
|
String |
get(int record)
Returns the record for a given position in the range [0, N-1], where N is the number of records present in the TextDB. |
String[] |
getRange(int i,
int j)
Returns the records having positions from i to j in the TextDB. |
String[] |
getSequential(int[] records)
Given a sorted array of record positions, this method returns all of them. |
void |
getSequential(int[] records,
int field,
PrintStream out)
Given a sorted array of record positions and the position of a field, this method retrieves the specified field from those records. |
static void |
main(String[] args)
|
int |
size()
Returns the number of records contained in this TextDB. |
Methods inherited from class it.unipi.di.textdb.TextDB |
---|
build, close, fromTDBFile, get, getFieldValues, getName, getRange, getRecordFields, getSequential, open, setFieldSeparator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BucketedPPM(String filename)
filename
- Method Detail |
---|
public TextDB build(PrintStream log) throws IOException
TextDB
TextDB.TextDB(String)
).
This method runs a build process with default values for all input parameters.
PrintStream
, or suppressed
if the passed reference is null.
build
in class TextDB
log
- a PrintStream for log messages. A null value will suppress any output message
IOException
public static TextDB build(String filename, int contextSize, int minFreq, int memLimit, int blockSize, int bucketSize, PrintStream log) throws IOException
IOException
public String get(int record) throws IOException
TextDB
get
in class TextDB
record
- a position in the range [0, N-1]
IOException
public String[] getRange(int i, int j) throws IOException
TextDB
getRange
in class TextDB
i
- the starting position of the records to retrieve (inclusive)j
- the ending position of the records to retrieve (inclusive)
IOException
public String[] getSequential(int[] records) throws IOException
TextDB
getSequential
in class TextDB
records
- a sorted array of record positions
IOException
public void getSequential(int[] records, int field, PrintStream out) throws IOException
TextDB
TextDB.getField(String, int)
provided by
this abstract class that selects a field of a record through a sequential access
to the record itself. The use of a more efficient implementation of this function
is encouraged.
getSequential
in class TextDB
records
- a sorted array of record positionsfield
- the position of the field to extract, or -1 to dump all fieldsout
- the output PrintStream
IOException
public int size()
TextDB
size
in class TextDB
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |