Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SOA<K>

Type parameters

  • K: string

Hierarchy

  • SOA

Implements

  • ILength

Index

Constructors

constructor

Properties

buffers

buffers: Record<K, TypedArray>

length

length: number

specs

specs: SOASpecs<K>

Methods

addSpecs

attribValue

  • attribValue(id: K, i: number): Vec
  • Parameters

    • id: K
    • i: number

    Returns Vec

attribValueUnsafe

  • attribValueUnsafe(id: K, i: number): Vec
  • Parameters

    • id: K
    • i: number

    Returns Vec

attribValues

  • attribValues(id: K, from?: number, to?: number): Vec[]
  • Parameters

    • id: K
    • from: number = 0
    • to: number = ...

    Returns Vec[]

copyTo

  • copyTo(dest: SOA<K>, ids?: K[], destFrom?: number, srcFrom?: number, srcTo?: number): SOA<K>
  • Parameters

    • dest: SOA<K>
    • Optional ids: K[]
    • destFrom: number = 0
    • srcFrom: number = 0
    • srcTo: number = ...

    Returns SOA<K>

Protected ensureAttrib

  • ensureAttrib(id: K): void

index

  • index(i: number): SOATuple<K, Vec>
  • index<ID>(i: number, ids: ID[]): SOATuple<ID, Vec>

indexUnsafe

  • indexUnsafe(i: number): SOATuple<K, Vec>
  • indexUnsafe<ID>(i: number, ids: ID[]): SOATuple<ID, Vec>

keys

  • keys(): K[]

setAttribValue

  • setAttribValue(id: K, i: number, val: ReadonlyVec): void
  • Parameters

    • id: K
    • i: number
    • val: ReadonlyVec

    Returns void

setAttribValueUnsafe

  • setAttribValueUnsafe(id: K, i: number, val: ReadonlyVec): SOA<K>
  • Parameters

    • id: K
    • i: number
    • val: ReadonlyVec

    Returns SOA<K>

setAttribValues

  • setAttribValues(id: K, vals: Iterable<ReadonlyVec>, from?: number): SOA<K>
  • Parameters

    • id: K
    • vals: Iterable<ReadonlyVec>
    • from: number = 0

    Returns SOA<K>

setIndex

  • setIndex(i: number, vals: Partial<SOATuple<K, ReadonlyVec>>): SOA<K>

setIndexUnsafe

  • setIndexUnsafe(i: number, vals: Partial<SOATuple<K, ReadonlyVec>>): SOA<K>

setValues

  • setValues(vals: Partial<SOATuple<K, Iterable<ReadonlyVec>>>, from?: number): SOA<K>
  • Parameters

    • vals: Partial<SOATuple<K, Iterable<ReadonlyVec>>>
    • from: number = 0

    Returns SOA<K>

Protected validateSpec

values

  • values(from?: number, to?: number): IterableIterator<SOATuple<K, Vec>>
  • Parameters

    • from: number = 0
    • to: number = ...

    Returns IterableIterator<SOATuple<K, Vec>>

Generated using TypeDoc