|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mark.core.util.IntMap
An IntMap associates integers with other integers. Call the two sets of integers l and s. l is contains integers in 0..#(l), where #(l) is the number of elements in l minus one. s contains integers in 0..#(s), where #(s) is the number of elements in s minus one. #(s) must be less than or equal to #(l). All mapping s->l exist. However, some mappings from l->s will not exitis if #(l) > #(s). These values in l map to -1 rather than a value in s.
| Constructor Summary | |
IntMap(int[] sToLMap,
int numL)
Initializes the map. |
|
| Method Summary | |
int |
mapL(int l)
Given an l value, returns the corresponding s value. |
int |
mapS(int s)
Given an s value, returns the corresponding l value. |
int |
numL()
Returns the number of l values. |
int |
numS()
Returns the number of s values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IntMap(int[] sToLMap,
int numL)
| Method Detail |
public int mapS(int s)
throws java.lang.Exception
s - the s value.
java.lang.Exception - if the mapping does not exist.
public int mapL(int l)
throws java.lang.Exception
l - the l value.
java.lang.Exception - if the mapping does not exist.public int numS()
public int numL()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||