Adjacency
Adjacency is a structure that defines how many objects of a particular kind can be accepted within a relation. It serves as an atomic unit in the adjacency specification, helping to define object interfactions within the protocol.
Representation
The adjacency structure is defined as follows:
struct Adjacency {
uint64 kind;
uint32 degMin;
uint32 degMax;
}
Fields
Type | Field | Description |
---|---|---|
uint64 | kind | The ID of the kind of objects that can be accepted. |
uint32 | degMin | The minimum number (inclusive) of objects of that kind. |
uint32 | degMax | The maximum number (inclusive) of objects of that kind. |
Encoding
A single adjacency structure can be encoded into a uint128;
(uint128(kind) << 64) | (uint128(degMin) << 32) | uint128(degMax)