Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

EdgeKey

An EdgeKey is a utility class in GTSAM used to encode a pair of 32-bit unsigned integers into a single 64-bit gtsam.Key. This can be useful for representing edges in a graph or other paired relationships where each element of the pair fits within 32 bits.

Open In Colab

Initialization

An EdgeKey can be created by providing two 32-bit unsigned integers (i and j). It can also be created by decoding an existing gtsam.Key (integer), assuming it was encoded using the EdgeKey format.

EdgeKey from (10, 20): {10, 20}

EdgeKey from key 42949672980: {10, 20}

Properties and Usage

You can access the original i and j values and the combined Key.

EdgeKey: {123, 456}

  i: 123
  j: 456
  Key: 528280977864