Show / Hide Table of Contents

Class AdjacentModel

AdjacentModel constrains which tiles can be placed adjacent to which other ones. It does so by maintaining for each tile, a list of tiles that can be placed next to it in each direction. The list is always symmetric, i.e. if it is legal to place tile B directly above tile A, then it is legal to place A directly below B.

Inheritance
object
TileModel
AdjacentModel
Inherited Members
TileModel.MultiplyFrequency(Tile, double, TileRotation)
Namespace: DeBroglie.Models
Assembly: DeBroglie.dll
Syntax
public class AdjacentModel : TileModel

Constructors

| Edit this page View Source

AdjacentModel()

Constructs an AdjacentModel.

Declaration
public AdjacentModel()
| Edit this page View Source

AdjacentModel(DirectionSet)

Constructs an AdjacentModel.

Declaration
public AdjacentModel(DirectionSet directions)
Parameters
Type Name Description
DirectionSet directions
| Edit this page View Source

AdjacentModel(ITopoArray<Tile>)

Constructs an AdjacentModel and initializees it with a given sample.

Declaration
public AdjacentModel(ITopoArray<Tile> sample)
Parameters
Type Name Description
ITopoArray<Tile> sample

Properties

| Edit this page View Source

Tiles

Declaration
public override IEnumerable<Tile> Tiles { get; }
Property Value
Type Description
IEnumerable<Tile>
Overrides
TileModel.Tiles

Methods

| Edit this page View Source

AddAdjacency(Adjacency)

Declaration
public void AddAdjacency(AdjacentModel.Adjacency adjacency)
Parameters
Type Name Description
AdjacentModel.Adjacency adjacency
| Edit this page View Source

AddAdjacency(Tile, Tile, Direction)

Declares that dest can be placed adjacent to src, in the direction specified.

Declaration
public void AddAdjacency(Tile src, Tile dest, Direction d)
Parameters
Type Name Description
Tile src
Tile dest
Direction d
| Edit this page View Source

AddAdjacency(Tile, Tile, int, int, int)

Declares that dest can be placed adjacent to src, in the direction specified by (x, y, z). (x, y, z) must be a valid direction, which usually means a unit vector.

Declaration
public void AddAdjacency(Tile src, Tile dest, int x, int y, int z)
Parameters
Type Name Description
Tile src
Tile dest
int x
int y
int z
| Edit this page View Source

AddAdjacency(IList<Tile>, IList<Tile>, Direction)

Declares that the tiles in dest can be placed adjacent to the tiles in src, in the direction specified by (x, y, z). (x, y, z) must be a valid direction, which usually means a unit vector.

Declaration
public void AddAdjacency(IList<Tile> src, IList<Tile> dest, Direction dir)
Parameters
Type Name Description
IList<Tile> src
IList<Tile> dest
Direction dir
| Edit this page View Source

AddAdjacency(IList<Tile>, IList<Tile>, Direction, TileRotation)

Declares that the tiles in dest can be placed adjacent to the tiles in src, in the direction specified. Then it adds similar declarations for other rotations and reflections, as specified by rotations.

Declaration
public void AddAdjacency(IList<Tile> src, IList<Tile> dest, Direction dir, TileRotation tileRotation = null)
Parameters
Type Name Description
IList<Tile> src
IList<Tile> dest
Direction dir
TileRotation tileRotation
| Edit this page View Source

AddAdjacency(IList<Tile>, IList<Tile>, int, int, int)

Declares that the tiles in dest can be placed adjacent to the tiles in src, in the direction specified by (x, y, z). (x, y, z) must be a valid direction, which usually means a unit vector.

Declaration
public void AddAdjacency(IList<Tile> src, IList<Tile> dest, int x, int y, int z)
Parameters
Type Name Description
IList<Tile> src
IList<Tile> dest
int x
int y
int z
| Edit this page View Source

AddAdjacency(IList<Tile>, IList<Tile>, int, int, int, TileRotation)

Declares that the tiles in dest can be placed adjacent to the tiles in src, in the direction specified by (x, y, z). Then it adds similar declarations for other rotations and reflections, as specified by rotations.

Declaration
public void AddAdjacency(IList<Tile> src, IList<Tile> dest, int x, int y, int z, TileRotation tileRotation = null)
Parameters
Type Name Description
IList<Tile> src
IList<Tile> dest
int x
int y
int z
TileRotation tileRotation
| Edit this page View Source

AddSample(ITopoArray<Tile>)

Declaration
public void AddSample(ITopoArray<Tile> sample)
Parameters
Type Name Description
ITopoArray<Tile> sample
| Edit this page View Source

AddSample(ITopoArray<Tile>, TileRotation)

Declaration
public void AddSample(ITopoArray<Tile> sample, TileRotation tileRotation = null)
Parameters
Type Name Description
ITopoArray<Tile> sample
TileRotation tileRotation
| Edit this page View Source

Create<T>(ITopoArray<T>)

Constructs an AdjacentModel and initializees it with a given sample.

Declaration
public static AdjacentModel Create<T>(ITopoArray<T> sample)
Parameters
Type Name Description
ITopoArray<T> sample
Returns
Type Description
AdjacentModel
Type Parameters
Name Description
T
| Edit this page View Source

Create<T>(T[,], bool)

Constructs an AdjacentModel and initializees it with a given sample.

Declaration
public static AdjacentModel Create<T>(T[,] sample, bool periodic)
Parameters
Type Name Description
T[,] sample
bool periodic
Returns
Type Description
AdjacentModel
Type Parameters
Name Description
T
| Edit this page View Source

IsAdjacent(Tile, Tile, Direction)

Declaration
public bool IsAdjacent(Tile src, Tile dest, Direction d)
Parameters
Type Name Description
Tile src
Tile dest
Direction d
Returns
Type Description
bool
| Edit this page View Source

MultiplyFrequency(Tile, double)

Scales the the occurency frequency of a given tile by the given multiplier.

Declaration
public override void MultiplyFrequency(Tile tile, double multiplier)
Parameters
Type Name Description
Tile tile
double multiplier
Overrides
TileModel.MultiplyFrequency(Tile, double)
| Edit this page View Source

SetDirections(DirectionSet)

Sets the directions of the Adjacent model, if it has not been set at construction. This specifies how many neighbours each tile has. Once set, it cannot be changed.

Declaration
public void SetDirections(DirectionSet directions)
Parameters
Type Name Description
DirectionSet directions
| Edit this page View Source

SetFrequency(Tile, double)

Sets the frequency of a given tile.

Declaration
public void SetFrequency(Tile tile, double frequency)
Parameters
Type Name Description
Tile tile
double frequency
| Edit this page View Source

SetFrequency(Tile, double, TileRotation)

Finds a tile and all its rotations, and sets their total frequency.

Declaration
public void SetFrequency(Tile tile, double frequency, TileRotation tileRotation)
Parameters
Type Name Description
Tile tile
double frequency
TileRotation tileRotation
| Edit this page View Source

SetUniformFrequency()

Sets all tiles as equally likely to be picked

Declaration
public void SetUniformFrequency()
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX