minuet.nn.functional.hash#

Functions

simple_hash(coordinates[, reverse])

Compute the hash values of the coordinates

unique_coordinates(coordinates[, batch_dims])

Remove duplicated in the sorted coordinates.

simple_hash(coordinates: Tensor, reverse: bool = False) Tensor#

Compute the hash values of the coordinates

Parameters:
  • coordinates – the coordinates to be hashed

  • reverse – hash each coordinates with the reverse order

Returns:

the hashed values for each coordinates

unique_coordinates(coordinates: Tensor, batch_dims: Tensor | None = None)#

Remove duplicated in the sorted coordinates. Multiple coordinate tensors can be handled together by specifying the batch_dims tensor, which stores the start and the end indices of each coordinate tensors.

Parameters:
  • coordinates – the tensors to be handled

  • batch_dims – the batch_dims tensor if there are multiple coordinate tensors

Returns:

The coordinates tensor with duplicates removed