HCenArrLayer

ostrat.prid.phex.HCenArrLayer
See theHCenArrLayer companion object
trait HCenArrLayer[A, ArrA <: Arr[A]]

A data layer for an HGridSys where each tile's data is an Arr of the specified type.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class HCenIntNArrLayer[A, ArrA]
class LayerHcRArr[A]

Members list

Value members

Abstract methods

def foreach(f: ArrA => Unit): Unit

Foreachs over each tile's Arr.

Foreachs over each tile's Arr.

Attributes

def foreachHcForeach(f: (HCen, A) => Unit)(implicit gSys: HGridSys): Unit

Foreachs over each element of the respective Arrs with a preceding HCen. Applying the side effecting function.

Foreachs over each element of the respective Arrs with a preceding HCen. Applying the side effecting function.

Attributes

The HGridSys hex grid system that is the key to this tile data layer

The HGridSys hex grid system that is the key to this tile data layer

Attributes

def iApply(index: Int): ArrA

Returns the Arr at the given integer index. This method is called iApply rather than apply as end users should have to use it, preferring instead the apply methods referencing the tile data by the HCen.

Returns the Arr at the given integer index. This method is called iApply rather than apply as end users should have to use it, preferring instead the apply methods referencing the tile data by the HCen.

Attributes

def iForeach(f: (Int, ArrA) => Unit): Unit

Foreachs over each tile's Arr with a preceding index.

Foreachs over each tile's Arr with a preceding index.

Attributes

Concrete methods

def apply(hCen: HCen): ArrA

Returns the Arr data for the given HCen coordinate. There is a name over load of this method that takes the integer R and C components as parameters.

Returns the Arr data for the given HCen coordinate. There is a name over load of this method that takes the integer R and C components as parameters.

Attributes

def apply(r: Int, c: Int): ArrA

Returns the Arr data for the given HCen coordinate. There is a name over load of this method that takes the HCen class as a parameter.

Returns the Arr data for the given HCen coordinate. There is a name over load of this method that takes the HCen class as a parameter.

Attributes

final def hcMap[B, ArrB <: Arr[B], LayerT <: HCenArrLayer[B, ArrB]](f: (HCen, ArrA) => ArrB)(implicit builder: HCenArrLayerBuilder[B, ArrB, LayerT]): LayerT

Maps each tile's HCen with its respective Arr to a new Arr.

Maps each tile's HCen with its respective Arr to a new Arr.

Attributes

final def map[B, ArrB <: Arr[B], LayerT <: HCenArrLayer[B, ArrB]](f: ArrA => ArrB)(implicit builder: HCenArrLayerBuilder[B, ArrB, LayerT]): LayerT

Maps from this HCenArrLayer to an HCenArrLayer type ArrB.

Maps from this HCenArrLayer to an HCenArrLayer type ArrB.

Attributes

def mapHCMap[B, ArrB <: Arr[B], LayerT <: HCenArrLayer[B, ArrB]](f: (HCen, A) => B)(implicit layerBBuild: HCenArrLayerBuilder[B, ArrB, LayerT]): LayerT

Maps from ArrA to ArrBs by mapping each element A, with the respective HCen to an element B.

Maps from ArrA to ArrBs by mapping each element A, with the respective HCen to an element B.

Attributes

def mapHcFlatMap[ArrT <: Arr[_]](f: (A, HCen) => ArrT)(implicit build: BuilderArrFlat[ArrT]): ArrT

FlatMaps the elements of each Arr with the corresponding HCen to a Arr.

FlatMaps the elements of each Arr with the corresponding HCen to a Arr.

Attributes

def mapMap[B, ArrB <: Arr[B], LayerT <: HCenArrLayer[B, ArrB]](f: A => B)(implicit layerBBuild: HCenArrLayerBuilder[B, ArrB, LayerT]): LayerT

Maps from ArrA to ArrBs by mapping each element A to an element B.

Maps from ArrA to ArrBs by mapping each element A to an element B.

Attributes

def numTiles: Int

The number of tile's in this data layer.

The number of tile's in this data layer.

Attributes