Table of Contents

Class ClusterLocation

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Packed ClusterLocation encoding for B+Tree values and spatial entries. Uses a fixed multiplier of 64 (max cluster size) for uniform encoding across all archetypes.

public static class ClusterLocation
Inheritance
ClusterLocation
Inherited Members

Fields

MaxClusterSize

Maximum cluster size. Used as multiplier for packed encoding.

public const int MaxClusterSize = 64

Field Value

int

Methods

Pack(int, int)

Pack a cluster chunk ID and slot index into a single int.

public static int Pack(int clusterChunkId, int slotIndex)

Parameters

clusterChunkId int
slotIndex int

Returns

int

Remarks

Max capacity: int.MaxValue / 64 = 33.5M clusters.

Unpack(int)

Unpack a packed ClusterLocation into (clusterChunkId, slotIndex).

public static (int clusterChunkId, int slotIndex) Unpack(int packed)

Parameters

packed int

Returns

(int clusterChunkId, int slotIndex)