Uses of Class
squidpony.squidmath.GreasedRegion
| 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.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.squidgrid.mapping.styled | 
 Support code for working with tiled dungeon generation; normally only  
TilesetType is used outside SquidLib. | 
| squidpony.squidmath | 
 A very broad package containing random number generators, geometry tools, data structures, and noise functions. 
 | 
- 
Uses of GreasedRegion in squidpony
Fields in squidpony with type parameters of type GreasedRegion Modifier and Type Field Description static StringConvert<GreasedRegion>Converters. convertGreasedRegion - 
Uses of GreasedRegion in squidpony.squidai
Methods in squidpony.squidai that return GreasedRegion Modifier and Type Method Description GreasedRegion[]GreasedZOI. calculate()Finds the zones of influence for each of the influences (inner arrays of Coord) this was constructed with, and returns all zones as a GreasedRegion array.protected GreasedRegionGreasedZOI. increasing(double[][] dm, Coord[] inf)GreasedRegionTechnique. possibleTargets(Coord user)Gets all possible target-able Coords when using this technique from the given Coorduser, returning them in a GreasedRegion.GreasedRegionTechnique. possibleTargets(Coord user, double[][] resistanceMap)Gets all possible target-able Coords when using this technique from the given Coorduser, returning them in a GreasedRegion.Methods in squidpony.squidai with parameters of type GreasedRegion Modifier and Type Method Description IntVLAGreasedZOI. nearestInfluences(GreasedRegion[] zones, Coord point)Given the zones resulting from this class'GreasedZOI.calculate()method and a Coord to check, finds the indices of all influencing groups in zones that have the Coord in their area, and returns all such indices as an IntVLA.voidDijkstraMap. setGoals(GreasedRegion pts)Marks many cells as goals for pathfinding, ignoring cells in walls or unreachable areas. - 
Uses of GreasedRegion in squidpony.squidgrid
Fields in squidpony.squidgrid declared as GreasedRegion Modifier and Type Field Description protected GreasedRegionMultiSpill. anyFreshMapThe cells that are filled by the any spiller will be true, others will be false.protected GreasedRegionMultiSpill. anySpillMapThe cells that are filled by the any spiller will be true, others will be false.protected GreasedRegionFOV. nearLightData allocated in the previous calls to the public API, if any. - 
Uses of GreasedRegion in squidpony.squidgrid.mapping
Fields in squidpony.squidgrid.mapping declared as GreasedRegion Modifier and Type Field Description GreasedRegionRoomFinder. allCavesGreasedRegionRoomFinder. allCorridorsGreasedRegionRoomFinder. allFloorsGreasedRegionRoomFinder. allRoomsGreasedRegionWorldMapGenerator.LocalMimicMap. coastGreasedRegionWorldMapGenerator.MimicMap. coastGreasedRegionWorldMapGenerator.LocalMimicMap. earthGreasedRegionWorldMapGenerator.MimicMap. earthGreasedRegionWorldMapGenerator.LocalMimicMap. earthOriginalGreasedRegionWorldMapGenerator.MimicMap. earthOriginalGreasedRegionOrganicMapGenerator. floorsGreasedRegionWorldMapGenerator. landDataGreasedRegionConnectingMapGenerator. regionGreasedRegionWorldMapGenerator.LocalMimicMap. shallowGreasedRegionWorldMapGenerator.MimicMap. shallowGreasedRegionMapModule. validDoorsStores Coords just outside the contents of the MapModule, where doors are allowed to connect into this.Fields in squidpony.squidgrid.mapping with type parameters of type GreasedRegion Modifier and Type Field Description OrderedMap<GreasedRegion,List<GreasedRegion>>RoomFinder. cavesNot 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. cavesNot 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. corridorsNot 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. corridorsNot likely to be used directly, but there may be things you can do with these that are cumbersome using only RoomFinder's simpler API.protected ArrayList<GreasedRegion>SectionMap. regionsOrderedMap<GreasedRegion,List<GreasedRegion>>RoomFinder. roomsNot 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. roomsNot likely to be used directly, but there may be things you can do with these that are cumbersome using only RoomFinder's simpler API.Methods in squidpony.squidgrid.mapping that return GreasedRegion Modifier and Type Method Description GreasedRegionSectionMap. nameToRegion(String name)Gets the GreasedRegion that has the given name.GreasedRegionSectionMap. numberToRegion(int number)Gets the GreasedRegion that has the given identifying number.GreasedRegionSectionMap. positionToContaining(int x, int y)Gets the GreasedRegion (a group of points as made by the constructor) that contains the given x, y point.GreasedRegionSectionMap. positionToContaining(Coord position)Gets the GreasedRegion (a group of points as made by the constructor) that contains the given x, y point.static GreasedRegionWorldMapGenerator.MimicMap. reprojectToElliptical(GreasedRegion rectangular)Meant for making maps conform to the Mollweide (elliptical) projection that MimicMap uses.Methods in squidpony.squidgrid.mapping with parameters of type GreasedRegion Modifier and Type Method Description char[][]PoliticalMapper. generate(GreasedRegion land, int factionCount, 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).char[][]PoliticalMapper. generate(GreasedRegion land, Map<Character,String> existingAtlas, 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).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).static char[][]LineKit. pruneLines(char[][] map, GreasedRegion seen, char[][] writeInto)Adjusts an existing map that uses box-drawing characters so non-visible line segments aren't rendered.static char[][]LineKit. pruneLines(char[][] map, GreasedRegion seen, char[] symbols, char[][] writeInto)Adjusts an existing map that uses box-drawing characters so non-visible line segments aren't rendered.static GreasedRegionWorldMapGenerator.MimicMap. reprojectToElliptical(GreasedRegion rectangular)Meant for making maps conform to the Mollweide (elliptical) projection that MimicMap uses.Constructors in squidpony.squidgrid.mapping with parameters of type GreasedRegion Constructor Description LocalMimicMap(long initialSeed, GreasedRegion toMimic)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude.LocalMimicMap(long initialSeed, GreasedRegion toMimic, double octaveMultiplier)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude.LocalMimicMap(long initialSeed, GreasedRegion toMimic, Noise.Noise2D noiseGenerator)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude.LocalMimicMap(long initialSeed, GreasedRegion toMimic, Noise.Noise2D noiseGenerator, double octaveMultiplier)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection).LocalMimicMap(GreasedRegion toMimic)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, without projecting the land positions or changing heat by latitude.MapModule(char[][] map, GreasedRegion validDoors, Coord min, Coord max)Constructs a MapModule from the given arguments without modifying them, copying map without changing its size, copying validDoors, and using the same min and max (which are immutable, so they can be reused).MimicMap(long initialSeed, GreasedRegion toMimic)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection).MimicMap(long initialSeed, GreasedRegion toMimic, double octaveMultiplier)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection).MimicMap(long initialSeed, GreasedRegion toMimic, Noise.Noise3D noiseGenerator)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection).MimicMap(long initialSeed, GreasedRegion toMimic, Noise.Noise3D noiseGenerator, double octaveMultiplier)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection).MimicMap(GreasedRegion toMimic)Constructs a concrete WorldMapGenerator for a map that should have land in roughly the same places as the given GreasedRegion's "on" cells, using an elliptical projection (specifically, a Mollweide projection). - 
Uses of GreasedRegion in squidpony.squidgrid.mapping.styled
Fields in squidpony.squidgrid.mapping.styled declared as GreasedRegion Modifier and Type Field Description GreasedRegionDungeonBoneGen. regionA GreasedRegion that, afterDungeonBoneGen.generate(TilesetType, int, int)has been called, will hold the floor cells in its data as "on" cells and walls as "off" cells.GreasedRegionDungeonBoneGen. workingRegionNot recommended for general usage; a GreasedRegion that is frequently modified by this generator and is kept in a field so this and potentially other classes can avoid allocating new GreasedRegions withremake(GreasedRegion)or the various refill methods in GreasedRegion. - 
Uses of GreasedRegion in squidpony.squidmath
Fields in squidpony.squidmath declared as GreasedRegion Modifier and Type Field Description static GreasedRegionMaskedShapeGenerator. alwaysSolidGreasedRegionCellularAutomaton. currentReturned directly by some methods, but you may want to change this at some other point.static GreasedRegion[]BlueNoise. LEVELSA 256-element array ofGreasedRegions, each 64x64, where the first GreasedRegion has an impossibly strict threshold on what points to include (it is empty), but the second has some points far apart, the third has more, and so on until the last element includes almost all points.static GreasedRegionMaskedShapeGenerator. potentialBodystatic GreasedRegionMaskedShapeGenerator. potentialSolidGreasedRegionMaskedShapeGenerator. randomRegionMethods in squidpony.squidmath that return GreasedRegion Modifier and Type Method Description GreasedRegionGreasedRegion. allOn()Sets all cells in this to "on."GreasedRegionGreasedRegion. alterBounds(int widthChange, int heightChange)Changes the width and/or height of this GreasedRegion, enlarging or shrinking starting at the edges wherex == width - 1andy == height - 1.GreasedRegionGreasedRegion. and(GreasedRegion other)Intersection of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. andNot(GreasedRegion other)Difference of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. andWrapping64(GreasedRegion other)Intersection of two GreasedRegions, assigning the result into this GreasedRegion, with the special requirement that other must be a 64x64 area, and the special property that other will be considered tiled to cover all of the area of this GreasedRegion.GreasedRegionGreasedRegion. connect()Takes the pairs of "on" cells in this GreasedRegion that are separated by exactly one cell in an orthogonal line, and changes the gap cells to "on" as well.GreasedRegionGreasedRegion. connect8way()Takes the pairs of "on" cells in this GreasedRegion that are separated by exactly one cell in an orthogonal or diagonal line, and changes the gap cells to "on" as well.GreasedRegionGreasedRegion. connectLines()Takes the pairs of "on" cells in this GreasedRegion that are separated by exactly one cell in an orthogonal or diagonal line, and changes the gap cells to "on" as well.GreasedRegionGreasedRegion. copy()Simple method that returns a newly-allocated copy of this GreasedRegion; modifications to one won't change the other, and this method returns the copy while leaving the original unchanged.GreasedRegionGreasedRegion. copyRotated(int turns)Makes a copy of this GreasedRegion that has been rotated 90 degreesturnstimes.static GreasedRegionGreasedRegion. decompress(String compressed)Decompresses a String returned bytoCompressedString(), returning a new GreasedRegion with identical width, height, and contents to the GreasedRegion before compression.static GreasedRegionGreasedRegion. deserializeFromString(String s)GreasedRegionGreasedRegion. deteriorate(RandomnessSource random, double preservation)Randomly removes points from a GreasedRegion, with preservation as a fraction between 1.0 (keep all) and 0.0 (remove all).GreasedRegionGreasedRegion. deteriorate(RandomnessSource rng, int preservation)Randomly removes points from a GreasedRegion, with larger values for preservation keeping more of the existing shape intact.GreasedRegionGreasedRegion. disperse()Removes "on" cells that are orthogonally adjacent to other "on" cells, keeping at least one cell in a group "on." Uses a "checkerboard" pattern to determine which cells to turn off, with all cells that would be black on a checkerboard turned off and all others kept as-is.GreasedRegionGreasedRegion. disperse8way()Removes "on" cells that are 8-way adjacent to other "on" cells, keeping at least one cell in a group "on." Uses a "grid-like" pattern to determine which cells to turn off, with all cells with even x and even y kept as-is but all other cells (with either or both odd x or odd y) turned off.GreasedRegionGreasedRegion. disperseRandom(RandomnessSource random)Removes "on" cells that are nearby other "on" cells, with a random factor to which bits are actually turned off that still ensures exactly half of the bits are kept as-is (the one exception is when height is an odd number, which makes the bottom row slightly random).GreasedRegionGreasedRegion. empty()Equivalent toclear(), setting all cells to "off," but also returns this for chaining.GreasedRegionGreasedRegion. expand()Takes the "on" cells in this GreasedRegion and expands them by one cell in the 4 orthogonal directions, making each "on" cell take up a plus-shaped area that may overlap with other "on" cells (which is just a normal "on" cell then).GreasedRegionGreasedRegion. expand(int amount)Takes the "on" cells in this GreasedRegion and expands them by amount cells in the 4 orthogonal directions, making each "on" cell take up a plus-shaped area that may overlap with other "on" cells (which is just a normal "on" cell then).GreasedRegionGreasedRegion. expand8way()GreasedRegionGreasedRegion. expand8way(int amount)GreasedRegion[]GreasedRegion. expandSeries(int amount)Takes the "on" cells in this GreasedRegion and produces amount GreasedRegions, each one expanded by 1 cell in the 4 orthogonal directions relative to the previous GreasedRegion, making each "on" cell take up a plus-shaped area that may overlap with other "on" cells (which is just a normal "on" cell then).GreasedRegion[]GreasedRegion. expandSeries8way(int amount)GreasedRegionGreasedRegion. extend()Gets a new Zone that contains all the Coords inthisplus all neighboring Coords, which can be orthogonally or diagonally adjacent to any Coord this has in it.GreasedRegionGreasedRegion. fill(boolean contents)Sets all cells in this to "on" if contents is true, or "off" if contents is false.GreasedRegionGreasedRegion. flip(boolean leftRight, boolean upDown)GreasedRegionGreasedRegion. flood(GreasedRegion bounds)Likeexpand(), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood(GreasedRegion bounds, int amount)Likeexpand(int), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood8way(GreasedRegion bounds)Likeexpand8way(), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood8way(GreasedRegion bounds, int amount)Likeexpand8way(int), but limits expansion to the "on" cells ofbounds.GreasedRegion[]GreasedRegion. floodSeries(GreasedRegion bounds, int amount)Repeatedly callsflood(GreasedRegion)amounttimes and returns the intermediate steps in a GreasedRegion array of sizeamount.GreasedRegion[]GreasedRegion. floodSeries8way(GreasedRegion bounds, int amount)Repeatedly callsflood8way(GreasedRegion)amounttimes and returns the intermediate steps in a GreasedRegion array of sizeamount.GreasedRegionGreasedRegion. fray(double fractionKept)Likeretract(), this removes the "on" cells that are 4-way-adjacent to any "off" cell, but unlike that method it keeps a fraction of those surface cells, quasi-randomly selecting them.GreasedRegionGreasedRegion. fringe()Takes the "on" cells in this GreasedRegion and expands them by one cell in the 4 orthogonal directions, producing a diamoond shape, then removes the original area before expansion, producing only the cells that were "off" in this and within 1 cell (orthogonal-only) of an "on" cell.GreasedRegionGreasedRegion. fringe(int amount)Takes the "on" cells in this GreasedRegion and expands them by amount cells in the 4 orthogonal directions (iteratively, producing a diamond shape), then removes the original area before expansion, producing only the cells that were "off" in this and within amount cells (orthogonal-only) of an "on" cell.GreasedRegionGreasedRegion. fringe8way()GreasedRegionGreasedRegion. fringe8way(int amount)GreasedRegion[]GreasedRegion. fringeSeries(int amount)Takes the "on" cells in this GreasedRegion and produces amount GreasedRegions, each one expanded by 1 cell in the 4 orthogonal directions relative to the previous GreasedRegion, making each "on" cell take up a diamond- shaped area.GreasedRegion[]GreasedRegion. fringeSeries8way(int amount)GreasedRegionGreasedRegion. getExternalBorder()Gets a Collection of Coord values that are not in this GreasedRegion, but are adjacent to it, either orthogonally or diagonally.GreasedRegionGreasedRegion. getInternalBorder()GreasedRegionGreasedRegion. insert(int tight)Sets the given cell, "tightly" encoded for a specific width/height as byasTightEncoded(), to "on".GreasedRegionGreasedRegion. insert(int x, int y)Sets the cell at x,y to "on".GreasedRegionGreasedRegion. insert(int x, int y, GreasedRegion other)Takes another GreasedRegion, called other, with potentially different size and inserts its "on" cells into thi GreasedRegion at the given x,y offset, allowing negative x and/or y to put only part of other in this.GreasedRegionGreasedRegion. insert(Coord point)Sets the cell at point to "on".GreasedRegionGreasedRegion. insertCircle(Coord center, int radius)GreasedRegionGreasedRegion. insertRectangle(int startX, int startY, int rectangleWidth, int rectangleHeight)GreasedRegionGreasedRegion. insertSeveral(int[] points)GreasedRegionGreasedRegion. insertSeveral(Iterable<Coord> points)GreasedRegionGreasedRegion. insertSeveral(Coord... points)GreasedRegionGreasedRegion. insertTranslation(int x, int y)Adds to this GreasedRegion with a moved set of its own "on" cells, moved to the given x and y offset.GreasedRegionGreasedRegion. largestPart()Finds the largest contiguous area of "on" cells in this GreasedRegion and returns it; does not modify this GreasedRegion.GreasedRegionGreasedRegion. largestPart8way()Finds the largest contiguous area of "on" cells in this GreasedRegion and returns it; does not modify this GreasedRegion.GreasedRegionGreasedRegion. mirrorY()Returns a new GreasedRegion that has been mirrored along the rightmost edge, parallel to the y-axis.GreasedRegionGreasedRegion. mixedRandomRegion(double fraction)Modifies this GreasedRegion so it contains a deterministic but random-seeming subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. mixedRandomRegion(double fraction, int limit)Modifies this GreasedRegion so it contains a deterministic but random-seeming subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. mixedRandomRegion(double fraction, int limit, long seed)Modifies this GreasedRegion so it contains a deterministic but random-seeming subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. neighborDown()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor downwards when this is called.GreasedRegionGreasedRegion. neighborDownLeft()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor downwards and to the left when this is called.GreasedRegionGreasedRegion. neighborDownRight()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor downwards and to the right when this is called.GreasedRegionGreasedRegion. neighborLeft()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor to the left when this is called.GreasedRegionGreasedRegion. neighborRight()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor to the right when this is called.GreasedRegionGreasedRegion. neighborUp()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor upwards when this is called.GreasedRegionGreasedRegion. neighborUpLeft()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor upwards and to the left when this is called.GreasedRegionGreasedRegion. neighborUpRight()Modifies this GreasedRegion so the only cells that will be "on" have a neighbor upwards and to the right when this is called.GreasedRegionGreasedRegion. not()Negates this GreasedRegion, turning "on" to "off" and "off" to "on."GreasedRegionGreasedRegion. notAnd(GreasedRegion other)Like andNot, but subtracts this GreasedRegion from other and stores the result in this GreasedRegion, without mutating other.static GreasedRegionGreasedRegion. of(int width, int height, long... data)Constructs a GreasedRegion using a vararg for data.GreasedRegionGreasedRegion. or(GreasedRegion other)Union of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. quasiRandomRegion(double fraction)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. quasiRandomRegion(double fraction, int limit)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. randomRegion(IRNG rng, int size)GreasedRegionGreasedRegion. randomScatter(IRNG rng, int minimumDistance)Modifies this GreasedRegion so it contains a random subset of its previous contents, choosing cells so that the distance between any two "on" cells is at leastminimumDistance, with at least one cell as "on" if any were "on" in this originally.GreasedRegionGreasedRegion. randomScatter(IRNG rng, int minimumDistance, int limit)Modifies this GreasedRegion so it contains a random subset of its previous contents, choosing cells so that the distance between any two "on" cells is at leastminimumDistance, with at least one cell as "on" if any were "on" in this originally.GreasedRegionGreasedRegion. refill(boolean[][] map)Reassigns this GreasedRegion with the given rectangular boolean array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(boolean[] bits, int width, int height)Reassigns this GreasedRegion with the given 1D boolean array, reusing the current data storage (without extra allocations) if this.width == width and this.height == height, where an [x][y] position is obtained from bits given an index n with x = n / height, y = n % height, any value of true considered "on", and any value of false considered "off."GreasedRegionGreasedRegion. refill(byte[][] map, int lower, int upper)Reassigns this GreasedRegion with the given rectangular byte array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(char[][] map, char yes)Reassigns this GreasedRegion with the given rectangular char array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(char[][] map, char[] yes)Reassigns this GreasedRegion with the given rectangular char array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(double[][] map, double upperBound)Reassigns this GreasedRegion with the given rectangular double array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(double[][] map, double lower, double upper)Reassigns this GreasedRegion with the given rectangular double array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(double[][] map, double lowerBound, double upperBound, int scale)Reassigns this GreasedRegion with the given rectangular double array, reusing the current data storage (without extra allocations) ifthis.width == map.length * scale && this.height == map[0].length * scale.GreasedRegionGreasedRegion. refill(int[][] map, int yes)Reassigns this GreasedRegion with the given rectangular int array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(int[][] map, int lower, int upper)Reassigns this GreasedRegion with the given rectangular int array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(long[] data2, int dataWidth, int dataHeight, int width, int height)Primarily for internal use, this method copies data2 into the internal long array the new GreasedRegion will use, but treats data2 as having the dimensions [dataWidth][dataHeight], and uses the potentially-different dimensions [width][height] for this GreasedRegion, potentially re-allocating the internal data this uses if width and/or height are different from what they were.GreasedRegionGreasedRegion. refill(short[][] map, int lower, int upper)Reassigns this GreasedRegion with the given rectangular short array, reusing the current data storage (without extra allocations) if this.width == map.length and this.height == map[0].length.GreasedRegionGreasedRegion. refill(String[] map, char yes)Weird refill method that takes a String array, _as it would be printed_, so each String is a row and indexing would be done with y, x instead of the normal x, y.GreasedRegionGreasedRegion. refill(IRNG random, int width, int height)Reassigns this GreasedRegion by filling it with random values from random, reusing the current data storage (without extra allocations) if this.width == width and this.height == height, and typically assigning approximately half of the cells in this to "on" and the rest to off.GreasedRegionGreasedRegion. refill(RandomnessSource random, double fraction, int width, int height)Reassigns this GreasedRegion randomly, reusing the current data storage (without extra allocations) if this.width == width and this.height == height, while trying to set the given fraction of cells to on.GreasedRegionGreasedRegion. refill(RandomnessSource random, int width, int height)Reassigns this GreasedRegion by filling it with random values from random, reusing the current data storage (without extra allocations) if this.width == width and this.height == height, and typically assigning approximately half of the cells in this to "on" and the rest to off.GreasedRegionGreasedRegion. remake(GreasedRegion other)A useful method for efficiency, remake() reassigns this GreasedRegion to have its contents replaced by other.GreasedRegionGreasedRegion. remove(int x, int y)GreasedRegionGreasedRegion. remove(int x, int y, GreasedRegion other)Takes another GreasedRegion, called other, with potentially different size and removes its "on" cells from this GreasedRegion at the given x,y offset, allowing negative x and/or y to remove only part of other in this.GreasedRegionGreasedRegion. remove(Coord point)GreasedRegionGreasedRegion. removeCircle(Coord center, int radius)GreasedRegionGreasedRegion. removeCorners()Where a cell is "on" but forms a right-angle with exactly two orthogonally-adjacent "on" cells and exactly two orthogonally-adjacent "off" cells, this turns each of those cells "off." This won't affect east-west lines of flat "on" cells, nor north-south lines.GreasedRegionGreasedRegion. removeEdges()Turns all cells that are adjacent to the boundaries of the GreasedRegion to "off".GreasedRegionGreasedRegion. removeIsolated()GreasedRegionGreasedRegion. removeRectangle(int startX, int startY, int rectangleWidth, int rectangleHeight)Removes all "on" cells from (startX, startY) inclusive to (startX+rectangleWidth, startY+rectangleHeight) exclusive, removing a total width of rectangleWidth and a total height of rectangleHeight in cells.GreasedRegionGreasedRegion. removeSeveral(Iterable<Coord> points)GreasedRegionGreasedRegion. removeSeveral(Coord... points)GreasedRegionGreasedRegion. resizeAndEmpty(int width, int height)If this GreasedRegion has the same width and height passed as parameters, this acts the same asempty(), makes no allocations, and returns this GreasedRegion with its contents all "off"; otherwise, this does allocate a differently-sized amount of internal data to match the new width and height, sets the fields to all match the new width and height, and returns this GreasedRegion with its new width and height, with all contents "off".GreasedRegionGreasedRegion. retract()Takes the "on" cells in this GreasedRegion and retracts them by one cell in the 4 orthogonal directions, making each "on" cell that was orthogonally adjacent to an "off" cell into an "off" cell.GreasedRegionGreasedRegion. retract(int amount)Takes the "on" cells in this GreasedRegion and retracts them by one cell in the 4 orthogonal directions, doing this iteeratively amount times, making each "on" cell that was within amount orthogonal distance to an "off" cell into an "off" cell.GreasedRegionGreasedRegion. retract8way()GreasedRegionGreasedRegion. retract8way(int amount)GreasedRegion[]GreasedRegion. retractSeries(int amount)GreasedRegion[]GreasedRegion. retractSeries8way(int amount)GreasedRegionBalancedPermutations. rotatedGrid()GreasedRegionCellularAutomaton. runBasicSmoothing()Reduces the sharpness of corners by only considering a cell on if the previous version has 5 of the 9 cells in the containing 3x3 area as "on." Typically, this method is run repeatedly.GreasedRegionCellularAutomaton. runDiagonalGapCleanup()This takes theCellularAutomaton.currentGreasedRegion and removes any cells that have a diagonal neighbor if that neighbor cannot be accessed from shared orthogonal neighbors.GreasedRegionCellularAutomaton. runGameOfLife()Runs one step of the simulation called Conway's Game of Life, which has relatively simple rules: Any "on" cell with fewer than two "on" neighbors becomes "off." Any "on" cell with two or three "on" neighbors (no more than three) stays "on." Any "on" cell with more than three "on" neighbors becomes "off." Any "off" cell with exactly three "on" neighbors becomes "on." These rules can bring about complex multi-step patterns in many cases, eventually stabilizing to predictable patterns in most cases.GreasedRegionGreasedRegion. separatedRegionBlue(double fraction)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. separatedRegionBlue(double fraction, int limit)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. separatedRegionZCurve(double fraction)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. separatedRegionZCurve(double fraction, int limit)Modifies this GreasedRegion so it contains a quasi-random subset of its previous contents, choosing cells so that thesize()matches the givenfractionof the total amount of "on" cells in this.GreasedRegionGreasedRegion. set(boolean value, int x, int y)Sets the cell at x,y to on if value is true or off if value is false.GreasedRegionGreasedRegion. set(boolean value, Coord point)Sets the cell at point to on if value is true or off if value is false.GreasedRegionBalancedPermutations. shuffledGrid()GreasedRegionBalancedPermutations. shuffledGridMultiple(int repeats)GreasedRegionGreasedRegion. spill(GreasedRegion bounds, int volume, IRNG rng)A randomized flood-fill that modifies this GreasedRegion so it randomly adds adjacent cells while staying inside the "on" cells ofbounds, untilsize()is equal tovolumeor there are no more cells this can expand into.GreasedRegionGreasedRegion. surface()GreasedRegionGreasedRegion. surface(int amount)GreasedRegionGreasedRegion. surface8way()GreasedRegionGreasedRegion. surface8way(int amount)GreasedRegion[]GreasedRegion. surfaceSeries(int amount)GreasedRegion[]GreasedRegion. surfaceSeries8way(int amount)GreasedRegionGreasedRegion. thin()Likeretract(), this reduces the width of thick areas of this GreasedRegion, but thin() will not remove areas that would be identical in a subsequent call to retract(), such as if the area would be eliminated.GreasedRegionGreasedRegion. thin8way()Likeretract8way(), this reduces the width of thick areas of this GreasedRegion, but thin8way() will not remove areas that would be identical in a subsequent call to retract8way(), such as if the area would be eliminated.GreasedRegionGreasedRegion. thinFully()Callsthin()repeatedly, until the result is unchanged from the last call.GreasedRegionGreasedRegion. thinFully8way()Callsthin8way()repeatedly, until the result is unchanged from the last call.GreasedRegionGreasedRegion. toggle(int x, int y)Changes the on/off state of the cell with the given x and y, making an on cell into an off cell, or an off cell into an on cell.GreasedRegionGreasedRegion. translate(int x, int y)Moves the "on" cells in this GreasedRegion to the given x and y offset, removing cells that move out of bounds.GreasedRegionGreasedRegion. translate(Coord c)Translates a copy ofthisby the x,y values inc.static GreasedRegionCoordPacker. unpackGreasedRegion(short[] packed, int width, int height)Utility method that constructs a GreasedRegion (a faster but more-memory-hungry way to encode regions) from a short array of packed data.static GreasedRegionCoordPacker. unpackIntoGreasedRegion(short[] packed, GreasedRegion target)Utility method that fills an existing GreasedRegiontargetwith any "on" cells in the packed short arraypacked.static GreasedRegionCoordPacker. unpackIntoGreasedRegion(short[] packed, GreasedRegion target, int offsetX, int offsetY)Utility method that fills an existing GreasedRegiontargetwith any "on" cells in the packed short arraypacked, inserting cells from packed at an offset when they go into target.GreasedRegionGreasedRegion. xor(GreasedRegion other)Symmetric difference (more commonly known as exclusive or, hence the name) of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. zoom(int x, int y)Effectively doubles the x and y values of each cell this contains (not scaling each cell to be larger, so each "on" cell will be surrounded by "off" cells), and re-maps the positions so the given x and y in the doubled space become 0,0 in the resulting GreasedRegion (which is this, assigning to itself).Methods in squidpony.squidmath that return types with arguments of type GreasedRegion Modifier and Type Method Description static Collection<GreasedRegion>GreasedRegion. appendContaining(Collection<GreasedRegion> into, int x, int y, Collection<GreasedRegion> packed)Tries to look up the position x,y in each GreasedRegion in packed; each GreasedRegion that contains that x,y point is appended into the Collectioninto.static Collection<GreasedRegion>GreasedRegion. appendContaining(Collection<GreasedRegion> into, int x, int y, GreasedRegion... packed)Tries to look up the position x,y in each GreasedRegion in packed; each GreasedRegion that contains that x,y point is appended into the Collectioninto.ArrayList<GreasedRegion>GreasedRegion. expandSeriesToLimit()ArrayList<GreasedRegion>GreasedRegion. expandSeriesToLimit8way()ArrayList<GreasedRegion>GreasedRegion. floodSeriesToLimit(GreasedRegion bounds)Repeatedly generates new GreasedRegions, each one cell expanded in 4 directions from the previous GreasedRegion and staying inside the "on" cells ofbounds, until it can't expand any more.ArrayList<GreasedRegion>GreasedRegion. floodSeriesToLimit8way(GreasedRegion bounds)Repeatedly generates new GreasedRegions, each one cell expanded in 8 directions from the previous GreasedRegion and staying inside the "on" cells ofbounds, until it can't expand any more.ArrayList<GreasedRegion>GreasedRegion. fringeSeriesToLimit()ArrayList<GreasedRegion>GreasedRegion. fringeSeriesToLimit8way()ArrayList<GreasedRegion>GreasedRegion. retractSeriesToLimit()ArrayList<GreasedRegion>GreasedRegion. retractSeriesToLimit8way()ArrayList<GreasedRegion>GreasedRegion. split()If this GreasedRegion stores multiple unconnected "on" areas, this finds each isolated area (areas that are only adjacent diagonally are considered separate from each other) and returns it as an element in an ArrayList of GreasedRegion, with one GreasedRegion per isolated area.ArrayList<GreasedRegion>GreasedRegion. split8way()If this GreasedRegion stores multiple unconnected "on" areas, this finds each isolated area (areas that are only adjacent diagonally are considered one area with this) and returns it as an element in an ArrayList of GreasedRegion, with one GreasedRegion per isolated area.ArrayList<GreasedRegion>GreasedRegion. surfaceSeriesToLimit()ArrayList<GreasedRegion>GreasedRegion. surfaceSeriesToLimit8way()static OrderedSet<GreasedRegion>GreasedRegion. whichContain(int x, int y, Collection<GreasedRegion> packed)static OrderedSet<GreasedRegion>GreasedRegion. whichContain(int x, int y, GreasedRegion... packed)Methods in squidpony.squidmath with parameters of type GreasedRegion Modifier and Type Method Description GreasedRegionGreasedRegion. and(GreasedRegion other)Intersection of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. andNot(GreasedRegion other)Difference of two GreasedRegions, assigning the result into this GreasedRegion.GreasedRegionGreasedRegion. andWrapping64(GreasedRegion other)Intersection of two GreasedRegions, assigning the result into this GreasedRegion, with the special requirement that other must be a 64x64 area, and the special property that other will be considered tiled to cover all of the area of this GreasedRegion.static Collection<GreasedRegion>GreasedRegion. appendContaining(Collection<GreasedRegion> into, int x, int y, GreasedRegion... packed)Tries to look up the position x,y in each GreasedRegion in packed; each GreasedRegion that contains that x,y point is appended into the Collectioninto.static int[][]GreasedRegion. bitSum(GreasedRegion... regions)Generates a 2D int array from an array or vararg of GreasedRegions, treating each cell in the nth region as the nth bit of the int at the corresponding x,y cell in the int array.GreasedRegionGreasedRegion. flood(GreasedRegion bounds)Likeexpand(), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood(GreasedRegion bounds, int amount)Likeexpand(int), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood8way(GreasedRegion bounds)Likeexpand8way(), but limits expansion to the "on" cells ofbounds.GreasedRegionGreasedRegion. flood8way(GreasedRegion bounds, int amount)Likeexpand8way(int), but limits expansion to the "on" cells ofbounds.GreasedRegion[]GreasedRegion. floodSeries(GreasedRegion bounds, int amount)Repeatedly callsflood(GreasedRegion)amounttimes and returns the intermediate steps in a GreasedRegion array of sizeamount.GreasedRegion[]GreasedRegion. floodSeries8way(GreasedRegion bounds, int amount)Repeatedly callsflood8way(GreasedRegion)amounttimes and returns the intermediate steps in a GreasedRegion array of sizeamount.ArrayList<GreasedRegion>GreasedRegion. floodSeriesToLimit(GreasedRegion bounds)Repeatedly generates new GreasedRegions, each one cell expanded in 4 directions from the previous GreasedRegion and staying inside the "on" cells ofbounds, until it can't expand any more.ArrayList<GreasedRegion>GreasedRegion. floodSeriesToLimit8way(GreasedRegion bounds)Repeatedly generates new GreasedRegions, each one cell expanded in 8 directions from the previous GreasedRegion and staying inside the "on" cells ofbounds, until it can't expand any more.GreasedRegionGreasedRegion. insert(int x, int y, GreasedRegion other)Takes another GreasedRegion, called other, with potentially different size and inserts its "on" cells into thi GreasedRegion at the given x,y offset, allowing negative x and/or y to put only part of other in this.booleanGreasedRegion. intersects(GreasedRegion other)Returns true if any cell is "on" in both this GreasedRegion and in other; returns false otherwise.GreasedRegionGreasedRegion. notAnd(GreasedRegion other)Like andNot, but subtracts this GreasedRegion from other and stores the result in this GreasedRegion, without mutating other.GreasedRegionGreasedRegion. or(GreasedRegion other)Union of two GreasedRegions, assigning the result into this GreasedRegion.CellularAutomatonCellularAutomaton. remake(GreasedRegion next)Re-initializes this CellularAutomaton using a different GreasedRegion as a basis.GreasedRegionGreasedRegion. remake(GreasedRegion other)A useful method for efficiency, remake() reassigns this GreasedRegion to have its contents replaced by other.GreasedRegionGreasedRegion. remove(int x, int y, GreasedRegion other)Takes another GreasedRegion, called other, with potentially different size and removes its "on" cells from this GreasedRegion at the given x,y offset, allowing negative x and/or y to remove only part of other in this.GreasedRegionGreasedRegion. spill(GreasedRegion bounds, int volume, IRNG rng)A randomized flood-fill that modifies this GreasedRegion so it randomly adds adjacent cells while staying inside the "on" cells ofbounds, untilsize()is equal tovolumeor there are no more cells this can expand into.static int[][]GreasedRegion. sum(GreasedRegion... regions)Generates a 2D int array from an array or vararg of GreasedRegions, starting at all 0 and adding 1 to the int at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can produce any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can produce any number between 0 and 16 in a cell.static double[][]GreasedRegion. sumDouble(GreasedRegion... regions)Generates a 2D double array from an array or vararg of GreasedRegions, starting at all 0 and adding 1 to the double at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can produce any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can produce any number between 0 and 16 in a cell.static int[][]GreasedRegion. sumInto(int[][] existing, GreasedRegion... regions)Adds to an existing 2D int array with an array or vararg of GreasedRegions, adding 1 to the int in existing at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can increment by any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can increase the value in existing by any number between 0 and 16 in a cell.static double[][]GreasedRegion. sumIntoDouble(double[][] existing, GreasedRegion... regions)Adds to an existing 2D double array with an array or vararg of GreasedRegions, adding 1 to the double in existing at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can increment by any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can increase the value in existing by any number between 0 and 16 in a cell.static int[][]GreasedRegion. sumWeighted(GreasedRegion[] regions, int[] weights)Generates a 2D int array from an array of GreasedRegions and an array of weights, starting the 2D result at all 0 and, for every GreasedRegion that has that cell as "on," adding the int in the corresponding weights array at the position of that cell.static double[][]GreasedRegion. sumWeightedDouble(GreasedRegion[] regions, double[] weights)Generates a 2D double array from an array of GreasedRegions and an array of weights, starting the 2D result at all 0 and, for every GreasedRegion that has that cell as "on," adding the double in the corresponding weights array at the position of that cell.static GreasedRegionCoordPacker. unpackIntoGreasedRegion(short[] packed, GreasedRegion target)Utility method that fills an existing GreasedRegiontargetwith any "on" cells in the packed short arraypacked.static GreasedRegionCoordPacker. unpackIntoGreasedRegion(short[] packed, GreasedRegion target, int offsetX, int offsetY)Utility method that fills an existing GreasedRegiontargetwith any "on" cells in the packed short arraypacked, inserting cells from packed at an offset when they go into target.static OrderedSet<GreasedRegion>GreasedRegion. whichContain(int x, int y, GreasedRegion... packed)GreasedRegionGreasedRegion. xor(GreasedRegion other)Symmetric difference (more commonly known as exclusive or, hence the name) of two GreasedRegions, assigning the result into this GreasedRegion.Method parameters in squidpony.squidmath with type arguments of type GreasedRegion Modifier and Type Method Description static Collection<GreasedRegion>GreasedRegion. appendContaining(Collection<GreasedRegion> into, int x, int y, Collection<GreasedRegion> packed)Tries to look up the position x,y in each GreasedRegion in packed; each GreasedRegion that contains that x,y point is appended into the Collectioninto.static Collection<GreasedRegion>GreasedRegion. appendContaining(Collection<GreasedRegion> into, int x, int y, GreasedRegion... packed)Tries to look up the position x,y in each GreasedRegion in packed; each GreasedRegion that contains that x,y point is appended into the Collectioninto.static int[][]GreasedRegion. sum(List<GreasedRegion> regions)Generates a 2D int array from a List of GreasedRegions, starting at all 0 and adding 1 to the int at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can produce any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can produce any number between 0 and 16 in a cell.static double[][]GreasedRegion. sumDouble(List<GreasedRegion> regions)Generates a 2D double array from a List of GreasedRegions, starting at all 0 and adding 1 to the double at a position once for every GreasedRegion that has that cell as "on." This means if you give 8 GreasedRegions to this method, it can produce any number between 0 and 8 in a cell; if you give 16 GreasedRegions, then it can produce any number between 0 and 16 in a cell.static OrderedSet<GreasedRegion>GreasedRegion. whichContain(int x, int y, Collection<GreasedRegion> packed)Constructors in squidpony.squidmath with parameters of type GreasedRegion Constructor Description CellularAutomaton(GreasedRegion current)Stores a direct reference tocurrentas this object'sCellularAutomaton.currentfield, and initializes the other necessary fields.GreasedRegion(GreasedRegion other)Copy constructor that takes another GreasedRegion and copies all of its data into this new one.