public class UnitWordsMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
A0_RADIUS |
int |
A1_RADIUS |
private UnitWords[][][] |
unitWords |
Constructor and Description |
---|
UnitWordsMap(int x,
int y,
int z)
Generates a new empty UnitWordsMap with the specified dimensions
|
Modifier and Type | Method and Description |
---|---|
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
|
private UnitWords[][][] unitWords
public int A0_RADIUS
public int A1_RADIUS
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-axispublic 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-axispublic 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 awaypublic 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 bepublic 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 processpublic 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 returnpublic 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 processpublic 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