toFlatIndex

fun toFlatIndex(layer: Int, offset: Int): Int

Flat node index given a layer and an offset from the start of that layer. From merkle_to_flat_index.