Uses of Class
squidpony.squidmath.OrderedMap
Package | Description |
---|---|
squidpony |
Utilities that don't fit elsewhere in SquidLib; mostly text manipulation, compression, and helper code.
|
squidpony.squidai |
Tools for finding paths, optimizing targets for area-of-effect (AOE) abilities, and evaluating influence on a grid.
|
squidpony.squidai.graph |
Graphs and graph algorithms used primarily (but not exclusively) for pathfinding.
|
squidpony.squidgrid |
Tools for working with data on a grid, including LOS and FOV; overlaps with geometry code in squidpony.squidmath .
|
squidpony.squidgrid.mapping |
Tools specifically for generating maps and placing content in them, usually working with 2D char arrays.
|
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
-
Uses of OrderedMap in squidpony
Fields in squidpony declared as OrderedMap Modifier and Type Field Description static OrderedMap<String,ArrayList<String>>
Thesaurus. adjective
static OrderedMap<String,ArrayList<String>>
Thesaurus. categories
static OrderedMap<CharSequence,FakeLanguageGen>
Thesaurus. languages
OrderedMap<CharSequence,GapShuffler<String>>
Thesaurus. mappings
static OrderedMap<String,ArrayList<String>>
Thesaurus. noun
static OrderedMap<String,ArrayList<String>>
Thesaurus. nouns
static OrderedMap<CharSequence,Integer>
Thesaurus. numberAdjectives
static OrderedMap<CharSequence,Integer>
Thesaurus. numbers
OrderedMap<String,List<String>>
MonsterGen.Chimera. parts
Methods in squidpony that return OrderedMap Modifier and Type Method Description OrderedMap<String,String>
ObText. basicOrderedMap()
Gets all unique Strings from the top level of this ObText as keys in anOrderedMap
, with the first String associated with each key as its value (or null if nothing is associated with a key String).static <K, V> OrderedMap<K,V>
Maker. makeOM()
Makes an empty OrderedMap (OM); needs key and value types to be specified in order to work.static <K, V> OrderedMap<K,V>
Maker. makeOM(float factor, K k0, V v0, Object... rest)
Makes an OrderedMap (OM) with the given load factor (which should be between 0.1 and 0.9), key and value types inferred from the types of k0 and v0, and considers all remaining parameters key-value pairs, casting the Objects at positions 0, 2, 4...static <K, V> OrderedMap<K,V>
Maker. makeOM(K k0, V v0, Object... rest)
Makes an OrderedMap (OM) with key and value types inferred from the types of k0 and v0, and considers all parameters key-value pairs, casting the Objects at positions 0, 2, 4...OrderedMap<String,ArrayList<String>>
ObText. shallowOrderedMap()
Gets all unique Strings from the top level of this ObText as keys in anOrderedMap
, with any Strings associated with those keys as their values (in a possibly-empty ArrayList of String for each value).Methods in squidpony that return types with arguments of type OrderedMap Modifier and Type Method Description static <K, V> StringConvert<OrderedMap<K,V>>
Converters. convertOrderedMap(CharSequence typeK, CharSequence typeV)
static <K, V> StringConvert<OrderedMap<K,V>>
Converters. convertOrderedMap(Class<K> typeK, Class<V> typeV)
static <K, V> StringConvert<OrderedMap<K,V>>
Converters. convertOrderedMap(StringConvert<K> convertK, StringConvert<V> convertV)
Methods in squidpony with parameters of type OrderedMap Modifier and Type Method Description static FakeLanguageGen.Modifier
FakeLanguageGen.Modifier. replacementTable(OrderedMap<String,String> map)
Creates a Modifier that will replace the nth String key in map with the nth value. -
Uses of OrderedMap in squidpony.squidai
Methods in squidpony.squidai that return OrderedMap Modifier and Type Method Description OrderedMap<Coord,Double>
Technique. apply(Coord user, Coord aimAt)
This does one last validation of the location aimAt (checking that it is within the valid range for this Technique) before getting the area affected by the AOE targeting that cell.static OrderedMap<Coord,Double>
AreaUtils. arrayToHashMap(boolean[][] map)
This takes a 2D boolean array and returns a HashMap of Coord keys to Double values, but will only use the value 1.0, and only for positions in map that have as their boolean element true.static OrderedMap<Coord,Double>
AreaUtils. arrayToHashMap(double[][] map)
This takes a 2D double array called map and returns a HashMap of Coord keys to Double values, and will have a key for every position in map that is greater than 0.0, with values equal to those in map.static OrderedMap<Coord,Double>
AreaUtils. arrayToHashMap(double[][] map, double cutoff)
This takes a 2D double array and returns a HashMap of Coord keys to Double values, but will only use the value 1.0, and only does this if the passed double[][] has a value at that position that is greater than cutoff.static OrderedMap<Coord,Double>
AreaUtils. dijkstraToHashMap(double[][] map)
This takes a DijkstraMap that has already completed a scan() and returns a HashMap of Coord keys to Double values, and will have a key for every position that was reached in the DijkstraMap, with 1.0 as the only value.OrderedMap<Coord,Double>
AOE. findArea()
This is how an AOE interacts with anything that uses it.OrderedMap<Coord,Double>
BeamAOE. findArea()
OrderedMap<Coord,Double>
BlastAOE. findArea()
OrderedMap<Coord,Double>
BurstAOE. findArea()
OrderedMap<Coord,Double>
CloudAOE. findArea()
OrderedMap<Coord,Double>
ConeAOE. findArea()
OrderedMap<Coord,Double>
LineAOE. findArea()
OrderedMap<Coord,Double>
PointAOE. findArea()
OrderedMap<Coord,Double>
DijkstraMap. floodFill(int radius, Coord... starts)
A simple limited flood-fill that returns a OrderedMap of Coord keys to the Double values in the DijkstraMap, only calculating out to a number of steps determined by limit.OrderedMap<Coord,ArrayList<Coord>>
AOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
Returns a OrderedMap of Coord keys and ArrayList of Coord values, where each Coord key is an ideal location to hit as many of the Points in targets as possible without hitting any Points in requiredExclusions, and each value is the collection of targets that will be hit if the associated key is used.OrderedMap<Coord,ArrayList<Coord>>
AOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
A variant of idealLocations that takes two groups of desirable targets, and will rate locations by how many priorityTargets are in the AOE, then by how many lesserTargets are in the AOE, and will only consider locations that do not affect a Coord in requiredExclusions.OrderedMap<Coord,ArrayList<Coord>>
BeamAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
BeamAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
BlastAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
BlastAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
BurstAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
BurstAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
CloudAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
CloudAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
ConeAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
ConeAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
LineAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
LineAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
PointAOE. idealLocations(Collection<Coord> targets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
PointAOE. idealLocations(Collection<Coord> priorityTargets, Collection<Coord> lesserTargets, Collection<Coord> requiredExclusions)
OrderedMap<Coord,ArrayList<Coord>>
Technique. idealLocations(Coord user, Collection<Coord> targets, Collection<Coord> requiredExclusions)
Get a mapping of Coord keys representing locations to apply this Technique to, to ArrayList of Coord values representing which targets (by their location) are affected by choosing that Coord.OrderedMap<Coord,ArrayList<Coord>>
Technique. idealLocations(Coord user, Set<Coord> priorityTargets, Set<Coord> lesserTargets, Set<Coord> requiredExclusions)
Get a mapping of Coord keys representing locations to apply this Technique to, to ArrayList of Coord values representing which targets (by their location) are effected by choosing that Coord. -
Uses of OrderedMap in squidpony.squidai.graph
Fields in squidpony.squidai.graph declared as OrderedMap Modifier and Type Field Description protected OrderedMap<Connection<V>,Connection<V>>
Graph. edgeMap
protected OrderedMap<V,Node<V>>
Graph. vertexMap
-
Uses of OrderedMap in squidpony.squidgrid
Fields in squidpony.squidgrid declared as OrderedMap Modifier and Type Field Description OrderedMap<Coord,Double>
SoundMap. alerted
The latest results of findAlerted(), with Coord keys representing the positions of creatures that were alerted and Double values representing how loud the sound was when it reached them.protected OrderedMap<I,SpatialMap.SpatialTriple<I,E>>
SpatialMap. itemMapping
protected OrderedMap<Coord,SpatialMap.SpatialTriple<I,E>>
SpatialMap. positionMapping
OrderedMap<Coord,Double>
SoundMap. sounds
Sources of sound on the map; keys are positions, values are how loud the noise is (10.0 should spread 10 cells away, with diminishing values assigned to further positions).Methods in squidpony.squidgrid that return OrderedMap Modifier and Type Method Description OrderedMap<Coord,Double>
SoundMap. findAlerted(Set<Coord> creatures, Map<Coord,Double> extraSounds)
Scans the dungeon using SoundMap.scan, adding any positions in extraSounds to the group of known sounds before scanning.Methods in squidpony.squidgrid with parameters of type OrderedMap Modifier and Type Method Description ArrayList<ArrayList<Coord>>
MultiSpill. start(OrderedMap<Coord,Double> entries, int volume, Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern. -
Uses of OrderedMap in squidpony.squidgrid.mapping
Fields in squidpony.squidgrid.mapping declared as OrderedMap Modifier and Type Field Description OrderedMap<Character,FantasyPoliticalMapper.Faction>
FantasyPoliticalMapper. atlas
Maps chars, as found in the returned array from generate(), to Strings that store the full name of nations.OrderedMap<Character,String>
PoliticalMapper. atlas
Maps chars, as found in the returned array from generate(), to Strings that store the full name of nations.OrderedMap<Character,String>
SpillWorldMap. atlas
OrderedMap<Character,String>
PoliticalMapper. briefAtlas
Maps chars, as found in the returned array from generate(), to Strings that store the short name of nations.OrderedMap<GreasedRegion,List<GreasedRegion>>
RoomFinder. caves
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only RoomFinder's simpler API.OrderedMap<GreasedRegion,List<GreasedRegion>>
RoomFinder. corridors
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only RoomFinder's simpler API.OrderedMap<Coord,MapModule>
ModularMapGenerator. displacement
OrderedMap<Integer,ArrayList<MapModule>>
ModularMapGenerator. modules
OrderedMap<GreasedRegion,List<GreasedRegion>>
RoomFinder. rooms
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only RoomFinder's simpler API.OrderedMap<Character,List<FakeLanguageGen>>
PoliticalMapper. spokenLanguages
Maps chars, as found in the returned array from generate(), to Strings that store the languages spoken in those nations, which could be user-assigned, unassigned, or randomly-generated.Methods in squidpony.squidgrid.mapping that return OrderedMap Modifier and Type Method Description protected static OrderedMap<Coord,List<Coord>>
SymmetryDungeonGenerator. crossConnect(int width, int height, Map<Coord,List<Coord>> connections)
protected static OrderedMap<Coord,List<Coord>>
SymmetryDungeonGenerator. listToMap(List<Coord> sequence)
static OrderedMap<Coord,List<Coord>>
SymmetryDungeonGenerator. removeSomeOverlap(int width, int height, Collection<Coord> sequence)
static OrderedMap<Coord,List<Coord>>
SymmetryDungeonGenerator. removeSomeOverlap(int width, int height, Map<Coord,List<Coord>> connections)
protected static OrderedMap<Coord,List<Coord>>
SymmetryDungeonGenerator. setToMap(OrderedSet<Coord> sequence)
Methods in squidpony.squidgrid.mapping with parameters of type OrderedMap Modifier and Type Method Description char[][]
PoliticalMapper. generate(WorldMapGenerator wmg, OrderedMap<Character,FakeLanguageGen> atlasLanguages, double controlledFraction)
Produces a political map for the land stored in the given WorldMapGenerator, with the given number of factions trying to take land in the world (essentially, nations).char[][]
PoliticalMapper. generate(GreasedRegion land, OrderedMap<Character,FakeLanguageGen> atlasLanguages, double controlledFraction)
Produces a political map for the land stored in the "on" cells of the given GreasedRegion, with the given number of factions trying to take land in the world (essentially, nations).Constructors in squidpony.squidgrid.mapping with parameters of type OrderedMap Constructor Description SymmetryDungeonGenerator(int width, int height, IRNG rng, OrderedMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.SymmetryDungeonGenerator(int width, int height, IRNG rng, OrderedMap<Coord,List<Coord>> connections, float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG. -
Uses of OrderedMap in squidpony.squidmath
Subclasses of OrderedMap in squidpony.squidmath Modifier and Type Class Description class
EnumOrderedMap<K extends Enum<?>,V>
A simple alternative to EnumMap that has a zero-argument constructor (which makes serialization easier) but is a little less efficient.class
RegionMap<V>
A small extension of OrderedMap that specifically handlesshort[]
regions as produced byCoordPacker
.Methods in squidpony.squidmath that return OrderedMap Modifier and Type Method Description OrderedMap<K,V>
OrderedMap. clone()
Returns a deep copy of this map.static <K, V> OrderedMap<K,V>
OrderedMap. makeMap()
Makes an empty OrderedMap (OM); needs key and value types to be specified in order to work.static <K, V> OrderedMap<K,V>
OrderedMap. makeMap(K k0, V v0, Object... rest)
Makes an OrderedMap (OM) with the given load factor (which should be between 0.1 and 0.9), key and value types inferred from the types of k0 and v0, and considers all remaining parameters key-value pairs, casting the Objects at positions 0, 2, 4...OrderedMap<K,V>
OrderedMap. putPairs(K k0, V v0, Object... rest)
Given alternating key and value arguments in pairs, puts each key-value pair into this OrderedMap as if by callingput(Object, Object)
repeatedly for each pair.OrderedMap<K,V>
OrderedMap. reorder(int... ordering)
Given an array or varargs of replacement indices for this OrderedMap's iteration order, reorders this so the first item in the returned version is the same asgetAt(ordering[0])
(with some care taken for negative or too-large indices), the second item in the returned version is the same asgetAt(ordering[1])
, etc.OrderedMap<K,V>
OrderedMap. shuffle(IRNG rng)
Randomly alters the iteration order for this OrderedMap using the given IRNG to shuffle.Methods in squidpony.squidmath with parameters of type OrderedMap Modifier and Type Method Description ProbabilityTable<T>
ProbabilityTable. addAll(OrderedMap<T,Integer> itemsAndWeights)
Given an OrderedMap of T element keys and Integer weight values, adds all T keys with their corresponding weights into this ProbabilityTable.ProbabilityTable<T>
ProbabilityTable. addAllNested(OrderedMap<ProbabilityTable<T>,Integer> itemsAndWeights)
Given an OrderedMap of ProbabilityTable keys and Integer weight values, adds all keys as nested tables with their corresponding weights into this ProbabilityTable.boolean
ProbabilityTable. removeAll(OrderedMap<T,Integer> itemsAndWeights)
Given an OrderedMap of T item keys and Integer weight values, reduces the weights in this ProbabilityTable for all T keys by their corresponding weights, removing them if the weight becomes 0 or less.