|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.output.labeling.UnitWordsMap
public class UnitWordsMap
Contains all UnitWords for the map and can be used to calculate goodnesses of words and select the best words from an unit.
Field Summary | |
---|---|
int |
A0_RADIUS
|
int |
A1_RADIUS
|
private UnitWords[][][] |
unitWords
|
Constructor Summary | |
---|---|
UnitWordsMap(int x,
int y,
int z)
Generates a new empty UnitWordsMap with the specified dimensions |
Method Summary | |
---|---|
double |
calcGoodness(int x,
int y,
int z,
java.lang.String word)
Calculates goodness G1 for map units |
java.util.Hashtable<java.lang.String,java.lang.Double> |
chooseBestWord(int x,
int y,
int z,
java.util.Hashtable<java.lang.String,java.lang.Double> top)
Choose word from hashmap based on G2 Goodness |
java.util.Hashtable<java.lang.String,java.lang.Double> |
getBestWords(int x,
int y,
int z,
int num)
get number of count Words in hashtable with G1 goodness value |
UnitWords |
getUnitWords(int x,
int y,
int z)
Returns the UnitWords at the specified position |
java.util.List<UnitWords> |
getUnitWordsInsideRadius(int x,
int y,
int z,
int radius)
Returns for a UnitWords at a specified postion all UnitWords which are inside its radius |
java.util.List<UnitWords> |
getUnitWordsOutsideRadius(int x,
int y,
int z,
int radius)
Returns for a UnitWords at a specified postion all UnitWords which are outside its radius |
double |
mapAreaGoodness(int x,
int y,
int z,
java.lang.String word)
Calculates goodness G1 for map areas |
UnitWords |
newUnitWords(int x,
int y,
int z)
Creates and returns a new, empty UnitWords at the specified position |
void |
setUnitWords(UnitWords unitWords,
int x,
int y,
int z)
Sets a UnitWords to the specified position |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private UnitWords[][][] unitWords
public int A0_RADIUS
public int A1_RADIUS
Constructor Detail |
---|
public UnitWordsMap(int x, int y, int z)
x
- the size of the x-axisy
- the size of the y-axisz
- the size of the z-axisMethod Detail |
---|
public void setUnitWords(UnitWords unitWords, int x, int y, int z)
unitWords
- the UnitWords to setx
- the position on the x-axisy
- the position on the y-axisz
- the position on the z-axispublic UnitWords getUnitWords(int x, int y, int z)
x
- the position on the x-axisy
- the position on the y-axisz
- the position on the z-axis
public UnitWords newUnitWords(int x, int y, int z)
x
- the position on the x-axisy
- the position on the y-axisz
- the position on the z-axis *
public java.util.List<UnitWords> getUnitWordsOutsideRadius(int x, int y, int z, int radius)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axisradius
- the distance the units have to be away
public java.util.List<UnitWords> getUnitWordsInsideRadius(int x, int y, int z, int radius)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axisradius
- the distance in which the units have to be
public double calcGoodness(int x, int y, int z, java.lang.String word)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axisword
- the word to process
public java.util.Hashtable<java.lang.String,java.lang.Double> getBestWords(int x, int y, int z, int num)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axisnum
- the number how many best words to return
public double mapAreaGoodness(int x, int y, int z, java.lang.String word)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axisword
- the word to process
public java.util.Hashtable<java.lang.String,java.lang.Double> chooseBestWord(int x, int y, int z, java.util.Hashtable<java.lang.String,java.lang.Double> top)
x
- the position of the unit on the x-axisy
- the position of the unit on the y-axisz
- the position of the unit on the z-axistop
- top
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |