Library
Module
Module type
Parameter
Class
Class type
The operations in the submodule Unsafe
are deemed unsafe because they expose unstable information, that is, information that will become out of date when further operations are performed. This unstable information includes a point's current tag, predecessor, and successor, as well as a region's current sequence of points. Unsafe operations can be useful in some situations (e.g., when debugging).
val tag : point -> int
tag p
is the current (internal) integer tag of the point p
. This tag lies in the semi-open interval [0, capacity)
. The point p
must be valid.
prev p
returns the current predecessor of the point p
in the total order, if there is one. The point p
must be valid.
next p
returns the current successor of the point p
in the total order, if there is one. The point p
must be valid.
first r
returns the smallest point that currently inhabits the region r
, if there is one.
last r
returns the greatest point that currently inhabits the region r
, if there is one.
val cardinal : region -> int
cardinal r
returns the number of points that currently exist in the region r
. Invalidated points are not counted.
iter f r
applies the function f
to every point that currently inhabits the region r
, in increasing order. Invalidated points are not included. The function f
must not have side effects on the data structure: in particular, it must not create new points or invalidate existing points.