3. Contents of objects#

We detail the content of the objects in the sd_listr8 data structure, those in the sd_listis data structure are identical in every way with the only difference between the objects ». BINT « , ». LPAS « and ». VALE « that contain integers instead of real ones. The structure may seem complicated for storing a list of reals. The object ». VALE « would suffice. It actually contains the list. The structure is designed to take advantage of the fact that the numbers in the list can be evenly spaced: list « in constant step » by pieces. In this case, some algorithms use this concept of constant step. The description of the list is in fact doubled:

*”. VALE “: contains the list of values,

*”. BINT “,”. LPAS “and”. NBPA “: contain information equivalent to this list.

Suppose we want to store the list of 8 reals:

1

\(\mathit{a0}\mathrm{=}\mathit{a0}\)

2

\(\mathit{a1}\mathrm{=}\mathit{a0}+1\mathrm{\ast }\mathit{dt1}\)

3

\(\mathit{a2}\mathrm{=}\mathit{a0}+2\mathrm{\ast }\mathit{dt1}\)

4

\(\mathit{a3}\mathrm{=}\mathit{a2}+1\mathrm{\ast }\mathit{dt2}\)

5

\(\mathit{a4}\mathrm{=}\mathit{a2}+2\mathrm{\ast }\mathit{dt2}\)

6

\(\mathit{a5}\mathrm{=}\mathit{a2}+3\mathrm{\ast }\mathit{dt2}\)

7

\(\mathit{a6}\mathrm{=}\mathit{a5}+1\mathrm{\ast }\mathit{dt3}\)

8

\(\mathit{a7}\mathrm{=}\mathit{a5}+2\mathrm{\ast }\mathit{dt3}\)

The content of the objects ». VALE « and ». BINT « will be:

“. VALE “: S V R8 dim=8

v (1) = a0

v (2) = a1

...

v (8) = a7

This object contains the values in the list.


“. BINT “: S V R8 dim=4

v (1) = a0

v (2) = a2

v (3) = a5

v (4) = a7

This object contains the ends of areas where the step is constant.

The objects. » LPAS « and ». NBPA « will contain:

“. LPAS “: S V R8 dim = 3 (This object contains the values of the « steps »)

\(v(1)\mathrm{=}\mathit{d1}\)

value of the 1st step

\(v(2)\mathrm{=}\mathit{d2}\)

2nd step value

\(v(3)\mathrm{=}\mathit{d3}\)

3rd step value

“. NBPA “: S V I dim = 3 (This object contains the number of « steps » for each interval)

\(v(1)\mathrm{=}2\)

number of intervals of length \(\mathit{d1}\)

\(v(2)\mathrm{=}3\)

number of intervals of length \(\mathit{d2}\)

\(v(3)\mathrm{=}2\)

number of intervals of length \(\mathit{d3}\)

In the (general) case where the list has several items:

  • long (LPAS) = long (NBPA)

  • long (BINT) = long (NBPA) + 1

note

For real lists, it may happen that the value of the « constant step » (object « . LPAS « ) is not an exact divisor of the length of the « zones » (object « . BINT « ) (object « . « ). As a result, the last « step » in an area may be slightly different from the other steps in the zone. This difference cannot be greater than \({10}^{-3}\) (in relative value) .

Special case of the list with only 1 element:

In case the list has only one item: