Class CantorPairing
Provides an implementation of the Cantor pairing function. This class cannot be inherited.
Inherited Members
Namespace: Rebus
Assembly: Rebus.dll
Syntax
public static class CantorPairing
Remarks
The function in this class comes from this Wikipedia article.
Methods
Pair(Int32, Int32)
Assigns a natural number to the pair of natural numbers.
Declaration
public static int Pair(int value1, int value2)
Parameters
Type | Name | Description |
---|---|---|
Int32 | value1 | The first natural number. |
Int32 | value2 | The second natural number. |
Returns
Type | Description |
---|---|
Int32 | A natural number unique to the pair of |