|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pealfactory.bronze.Tracker
org.pealfactory.compose.halfleadspliced.Tables
class Tables
Calculates and holds tables of permutations and nodes - vital to the performance of Elf. There are five stages of table building which must all be performed before a search can begin:
Tracker
task-management system, except for the last one, which is too quick to bother with.
| Field Summary | |
|---|---|
private java.util.Hashtable |
fAllNodes
|
private Method[] |
fCompositeMethods
|
private RowNode[] |
fLeadheadNodes
|
private java.util.Vector |
fLeadheadPerms
|
private boolean |
fLeadMusicDirty
|
private Method[] |
fMethods
|
private boolean |
fMethodsDirty
|
private Music[] |
fMusic
|
private boolean |
fMusicDirty
|
private int |
fNBells
|
private int |
fNextLeadHeadNumber
|
private int |
fNextNodeNumber
|
private int |
fNextTTLeadNumber
|
private java.util.Vector |
fPNPerms
All permuatations stored in these Vectors are Strings, but with bell numbers stored as bytes 1..nbells. |
private boolean |
fTablePass1Done
Set to true when tables are built (one-time only - not populated |
private RowNode[] |
fTenorsTogetherLeads
|
| Fields inherited from class org.pealfactory.bronze.Tracker |
|---|
kDEFAULT_JOB_NAME, kRESPONSE_TIME |
| Fields inherited from interface org.pealfactory.bronze.Trackable |
|---|
kERROR_NONE |
| Constructor Summary | |
|---|---|
Tables()
|
|
| Method Summary | |
|---|---|
protected int |
addLeadheadPerm(byte[] perm)
|
protected int |
addPNPerm(byte[] perm)
|
void |
buildNodeTable()
Table build pass 1 - not dependent on methods or music, so we can do it once only. |
private void |
generateNodes(Row row,
int n)
|
Method[] |
getCompositeMethods()
|
protected java.lang.String[] |
getLeadheadPerms()
|
Method[] |
getMethods()
|
int |
getNBells()
Final for speed |
int |
getNCompositeMethods()
|
int |
getNLeadheadNodes()
Final for speed |
int |
getNMethods()
|
int |
getNNodes()
Final for speed |
RowNode |
getNode(Row row)
Final for speed |
protected int |
getNPnPerms()
|
protected java.lang.String[] |
getPNPerms()
|
boolean |
isBuilt()
Returns true when pass 1 of table building done. |
protected int |
newNodeNumber()
|
private boolean |
populateNodeTable()
This MUST be called ANY TIME the method list is changed. |
void |
prepareLeadMusic()
Table build pass 3 - precalculates the lead music counts. |
void |
prepareMethods()
Table build pass 2 |
void |
prepareMusic()
Music calculation (per row, not the lead-music tables). |
void |
prepareRegenPtrs(boolean tenorsTogether)
Table build pass 4 - sets up the regen backtrack offsets in tenors-together nodes. |
void |
setMethods(Method[] methods)
|
void |
setMusic(Music[] music)
|
private byte[][] |
toPermutationArray(java.lang.String[] perms)
|
| Methods inherited from class org.pealfactory.bronze.Tracker |
|---|
abort, abortWorker, endDelegateJob, getErrorMsg, getJobName, getProgress, getProgress, isAborted, isError, isFinished, isPaused, pause, reset, resume, run, setErrorMsg, setJobName, setProgress, setTotalDuration, startDelegateJob, startWorker, waitForResume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int fNBells
private Method[] fMethods
private Method[] fCompositeMethods
private Music[] fMusic
private java.util.Hashtable fAllNodes
private int fNextNodeNumber
private RowNode[] fTenorsTogetherLeads
private int fNextTTLeadNumber
private RowNode[] fLeadheadNodes
private int fNextLeadHeadNumber
private boolean fMethodsDirty
private boolean fMusicDirty
private boolean fLeadMusicDirty
private boolean fTablePass1Done
private java.util.Vector fPNPerms
private java.util.Vector fLeadheadPerms
| Constructor Detail |
|---|
public Tables()
| Method Detail |
|---|
public final int getNBells()
public final int getNNodes()
public final int getNLeadheadNodes()
public final RowNode getNode(Row row)
public boolean isBuilt()
public final int getNMethods()
public Method[] getMethods()
public final int getNCompositeMethods()
public Method[] getCompositeMethods()
public void setMethods(Method[] methods)
public void setMusic(Music[] music)
protected int newNodeNumber()
protected java.lang.String[] getPNPerms()
protected int getNPnPerms()
protected java.lang.String[] getLeadheadPerms()
protected int addPNPerm(byte[] perm)
protected int addLeadheadPerm(byte[] perm)
public void buildNodeTable()
private void generateNodes(Row row,
int n)
public void prepareMusic()
public void prepareMethods()
private boolean populateNodeTable()
private final byte[][] toPermutationArray(java.lang.String[] perms)
public void prepareLeadMusic()
public void prepareRegenPtrs(boolean tenorsTogether)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||