LayerHcRef

ostrat.prid.phex.LayerHcRef
trait LayerHcRef[A <: AnyRef] extends LayerTcRef[A]

Reference data layer for HCen hex tile structure.

Attributes

Graph
Supertypes
trait LayerTcRef[A]
class Any
Known subtypes
class LayerHcRefRow[A]
trait LayerHcRefSys[A]
class LayerHcRefGrid[A]
class LayerHcRefMulti[A]

Members list

Value members

Concrete methods

def apply(hc: HCen)(implicit key: HexStruct): A

Apply method returns a data element from this data layer for the given HCen. The appropriate index is found from the implicit HGridSys. There is an alternative nme overload where the HGridSys is passed explicitly as the first parameter.

Apply method returns a data element from this data layer for the given HCen. The appropriate index is found from the implicit HGridSys. There is an alternative nme overload where the HGridSys is passed explicitly as the first parameter.

Attributes

def apply(key: HexStruct, hc: HCen): A

Apply method returns a data element from this data layer for the given HCen.

Apply method returns a data element from this data layer for the given HCen.

Attributes

def hcFlatMap[BB <: Arr[_]](f: (HCen, A) => BB)(implicit grid: HexStruct, build: BuilderArrFlat[BB]): BB

HCen with flatmap. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

HCen with flatmap. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def hcForeach[U](f: (HCen, A) => U)(implicit gSys: HexStruct): Unit

HCen with foreach. Applies the side effecting function to the HCen coordinate with its respective element. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

HCen with foreach. Applies the side effecting function to the HCen coordinate with its respective element. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def hcMap[B, BB <: Arr[B]](f: (HCen, A) => B)(implicit grid: HexStruct, build: BuilderArrMap[B, BB]): BB

HCen with map. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

HCen with map. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def hcOptFlatMap[BB <: Arr[_]](f: (HCen, A) => Option[BB])(implicit gridSys: HexStruct, build: BuilderArrFlat[BB]): BB

HCen with optFlatmap. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

HCen with optFlatmap. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def hcOptMap[B, BB <: Arr[B]](f: (A, HCen) => Option[B])(implicit grid: HexStruct, build: BuilderArrMap[B, BB]): BB

Maps each data element with thw corresponding HCen to an Option of type B. Collects the Some's values. The length of the returned Arr will be between 0 and the length of this LayerHcRefSys.

Maps each data element with thw corresponding HCen to an Option of type B. Collects the Some's values. The length of the returned Arr will be between 0 and the length of this LayerHcRefSys.

Attributes

def projHCenFlatMap[BB <: Arr[_]](f: (HCen, A) => BB)(implicit key: HexStruct, proj: HSysProjection, build: BuilderArrFlat[BB]): BB
def rc(r: Int, c: Int)(implicit key: HexStruct): A
def rc(key: HexStruct, r: Int, c: Int): A
def set(hc: HCen, value: A)(implicit gridSys: HexStruct): Unit
def set(r: Int, c: Int, value: A)(implicit gridSys: HexStruct): Unit

Inherited methods

def arrayUnsafe: Array[A]

The mutable backing Array. End users should rarely if ever have to access this field

The mutable backing Array. End users should rarely if ever have to access this field

Attributes

Inherited from:
LayerTcRef
def foreach[U](f: A => U): Unit

For each element in the underlying array performs the side effecting function. This method treats the LayerTcRef class like a standard Arr or Array. It does not utilise the grid TGrid from which this LayerTcRef was created.

For each element in the underlying array performs the side effecting function. This method treats the LayerTcRef class like a standard Arr or Array. It does not utilise the grid TGrid from which this LayerTcRef was created.

Attributes

Inherited from:
LayerTcRef
final def length: Int

The number of tile centres this array of data represents.

The number of tile centres this array of data represents.

Attributes

Inherited from:
LayerTcRef
def map[B, BB <: Arr[B]](f: A => B)(implicit build: BuilderArrMap[B, BB]): BB

Each element in the underlying array is mapped by the parameter function to an element of type B. This method treat the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.

Each element in the underlying array is mapped by the parameter function to an element of type B. This method treat the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.

Attributes

Inherited from:
LayerTcRef
final def mutSetAll(value: A): Unit

Set all tiles to the given value.

Set all tiles to the given value.

Attributes

Inherited from:
LayerTcRef