function
SLAM.PoseGraph.RGBDGraphMeasurements.Bound
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | catalog | RGBDKeyframes.Catalog | | |
| input | id | Integer | | |
| input | slot | Integer | | |
| input | epoch | Integer | | |
| output | valid | Boolean | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function Bound
input RGBDKeyframes.Catalog catalog;
input Integer id; input Integer slot; input Integer epoch;
output Boolean valid;
algorithm
// Header certification belongs to the caller. Integer domains precede
// subtraction, ring arithmetic and all catalog subscripts.
valid := catalog.nextId >= 1 and catalog.nextId <= identifierLimit
and catalog.lastEpoch >= -1 and catalog.lastEpoch <= identifierLimit;
if valid then
valid := id >= max(1,catalog.nextId-nodeCapacity) and id < catalog.nextId
and slot >= 1 and slot <= nodeCapacity and epoch >= 0 and epoch <= catalog.lastEpoch;
end if;
if valid then
valid := mod(id-1,nodeCapacity)+1 == slot;
if valid then
valid := catalog.occupied[slot] and catalog.ids[slot] == id
and catalog.generations[slot] == catalog.generation
and catalog.epochs[slot] == epoch;
end if;
end if;
end Bound;