Options
All
  • Public
  • Public/Protected
  • All
Menu

@thi.ng/morton

Index

Functions

Const cartesianToTree

  • cartesianToTree(v: number[]): number[]
  • Takes a vector of positive integer coordinates and returns vector of nD quad tree coordinates.

    Parameters

    • v: number[]

    Returns number[]

Const decode10

  • decode10(a: number): number
  • Parameters

    • a: number

    Returns number

Const decode16

  • decode16(a: number): number
  • Parameters

    • a: number

    Returns number

Const decode5

  • decode5(a: number): number
  • Parameters

    • a: number

    Returns number

Const decodeScaled10

  • decodeScaled10(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const decodeScaled16

  • decodeScaled16(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const decodeScaled5

  • decodeScaled5(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const demux2

  • demux2(n: number): number[]
  • Parameters

    • n: number

    Returns number[]

Const demux3

  • demux3(n: number): number[]
  • Parameters

    • n: number

    Returns number[]

Const demuxScaled2

  • demuxScaled2(n: number, minx?: number, maxx?: number, miny?: number, maxy?: number): number[]
  • Parameters

    • n: number
    • minx: number = 0
    • maxx: number = 1
    • miny: number = ...
    • maxy: number = ...

    Returns number[]

Const demuxScaled2v

  • demuxScaled2v(n: number, min?: ArrayLike<number>, max?: ArrayLike<number>): number[]
  • Parameters

    • n: number
    • min: ArrayLike<number> = ...
    • max: ArrayLike<number> = ...

    Returns number[]

Const demuxScaled3

  • demuxScaled3(n: number, minx?: number, maxx?: number, miny?: number, maxy?: number, minz?: number, maxz?: number): number[]
  • Parameters

    • n: number
    • minx: number = 0
    • maxx: number = 1
    • miny: number = ...
    • maxy: number = ...
    • minz: number = ...
    • maxz: number = ...

    Returns number[]

Const demuxScaled3v

  • demuxScaled3v(n: number, min?: ArrayLike<number>, max?: ArrayLike<number>): number[]
  • Parameters

    • n: number
    • min: ArrayLike<number> = ...
    • max: ArrayLike<number> = ...

    Returns number[]

Const encode10

  • encode10(a: number): number
  • Parameters

    • a: number

    Returns number

Const encode16

  • encode16(a: number): number
  • Parameters

    • a: number

    Returns number

Const encode5

  • encode5(a: number): number
  • Parameters

    • a: number

    Returns number

Const encodeScaled10

  • encodeScaled10(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const encodeScaled16

  • encodeScaled16(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const encodeScaled5

  • encodeScaled5(x: number, min?: number, max?: number): number
  • Parameters

    • x: number
    • min: number = 0
    • max: number = 1

    Returns number

Const mortonToTree

  • mortonToTree(m: number, dim: number): number[]
  • Parameters

    • m: number
    • dim: number

    Returns number[]

Const mux2

  • mux2(a: number, b: number): number
  • Parameters

    • a: number
    • b: number

    Returns number

Const mux3

  • mux3(a: number, b: number, c: number): number
  • Parameters

    • a: number
    • b: number
    • c: number

    Returns number

Const muxScaled2

  • muxScaled2(x: number, y: number, minx?: number, maxx?: number, miny?: number, maxy?: number): number
  • Parameters

    • x: number
    • y: number
    • minx: number = 0
    • maxx: number = 1
    • miny: number = ...
    • maxy: number = ...

    Returns number

Const muxScaled2v

  • muxScaled2v(v: ArrayLike<number>, min?: ArrayLike<number>, max?: ArrayLike<number>): number
  • Parameters

    • v: ArrayLike<number>
    • min: ArrayLike<number> = ...
    • max: ArrayLike<number> = ...

    Returns number

Const muxScaled3

  • muxScaled3(x: number, y: number, z: number, minx?: number, maxx?: number, miny?: number, maxy?: number, minz?: number, maxz?: number): number
  • Parameters

    • x: number
    • y: number
    • z: number
    • minx: number = 0
    • maxx: number = 1
    • miny: number = ...
    • maxy: number = ...
    • minz: number = ...
    • maxz: number = ...

    Returns number

Const muxScaled3v

  • muxScaled3v(v: ArrayLike<number>, min?: ArrayLike<number>, max?: ArrayLike<number>): number
  • Parameters

    • v: ArrayLike<number>
    • min: ArrayLike<number> = ...
    • max: ArrayLike<number> = ...

    Returns number

Const treeToCartesian

  • treeToCartesian(t: number[], dim: number): number[]
  • Inverse operation of cartesianToTree. Takes vector of nD quad tree coordinates and converts them back to cartesian.

    Parameters

    • t: number[]

      tree coords

    • dim: number

      dimensionality

    Returns number[]

Const treeToMorton

  • treeToMorton(t: number[], dim: number): number
  • Parameters

    • t: number[]
    • dim: number

    Returns number

Generated using TypeDoc