at.dms.jperf
Class JPerf
java.lang.Object
|
+--at.dms.jperf.JPerf
- public class JPerf
- extends java.lang.Object
This class represents the perfect hashing function generator
Constructor Summary |
JPerf(java.lang.String[] keywords,
java.lang.String[] header,
java.lang.String[] footer)
Constructs a JPerf object with default load factor of 5 |
JPerf(java.lang.String[] keywords,
java.lang.String[] header,
java.lang.String[] footer,
double loadFactor)
Constructs a JPerf object |
Method Summary |
void |
build()
Builds tables and graph. |
void |
genCode(java.lang.String fileName)
Dumps result to class source. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPerf
public JPerf(java.lang.String[] keywords,
java.lang.String[] header,
java.lang.String[] footer,
double loadFactor)
- Constructs a JPerf object
- Parameters:
keywords
- the keywords to hashheader
- the verbatim part to output at the beginning of the filefooter
- the verbatim part to output at the end of the fileload
- factor the load factor
JPerf
public JPerf(java.lang.String[] keywords,
java.lang.String[] header,
java.lang.String[] footer)
- Constructs a JPerf object with default load factor of 5
- Parameters:
keywords
- the keywords to hashheader
- the verbatim part to output at the beginning of the filefooter
- the verbatim part to output at the end of the fileload
- factor the load factor
build
public void build()
- Builds tables and graph.
Tasks: 1. generate the tables table1 and table2;
2. generate the graph
3. assure that the graph is acyclic
genCode
public void genCode(java.lang.String fileName)
throws java.io.IOException
- Dumps result to class source.
- Parameters:
fileName
- the name of the output file.