triangularmap.tmap

Classes

ArrayTMap(n, value, *args, **kwargs)

Create a TMap of size n using a NumPy array initialised with value as underlying storage.

DictTMap(n, default_factory, *args, **kwargs)

Create a TMap of size n using a defaultdict as underlying storage.

TMap(arr[, linearise_blocks, _n])

A wrapper around a 1D array that provides access in triangular (or ternary) coordinates.

TensorTMap(n, value, *args, **kwargs)

Same as ArrayTMap() but use a PyTorch tensor (torch.full) instead.