package tezos-protocol-013-PtJakart
val section_encoding :
section Tezos_protocol_environment_013_PtJakart.Data_encoding.t
val pp_section :
Tezos_protocol_environment_013_PtJakart.Format.formatter ->
section ->
unit
A dissection
is a split of a section in several smaller sections that form a partition of this section.
val dissection_encoding :
dissection option Tezos_protocol_environment_013_PtJakart.Data_encoding.t
val pp_dissection :
Tezos_protocol_environment_013_PtJakart.Format.formatter ->
dissection ->
unit
val empty_dissection : dissection
empty_dissection
is an empty set.
val add_section : section -> dissection -> dissection
add_section section dissection
contains the sections of dissection
plus a new section
.
val find_section : section -> dissection -> section option
find_section section dissection
returns Some section
if section
is a member of dissection
. Returns None
otherwise.
val fold_over_dissection :
(tick -> section -> 'a -> 'a) ->
dissection ->
'a ->
'a
fold_over_dissection f dissection i
traverses dissection
from the section of lowest tick to the section of highest ticks applying f
to compute the next value of the accumulator, initially set to i
.
val dissection_cardinal : dissection -> int
dissection_cardinal dissection
returns the number of sections in the given dissection
.
val last_section : dissection -> (tick * section) option
last_section dissection
returns Some (tick, section)
if the last section
of dissection
starts at tick
. Returns None
if dissection
is empty.
val valid_section : section -> bool
A section is valid if its start_at
tick is smaller than its stop_at
tick.
val valid_dissection : section -> dissection -> bool
valid_dissection section dissection
returns true
iff dissection
is a partition of section
.