The passed argument must be in range 0..length,
where length is the total number of elements in the underlying data storage
(for an AlgART array, its Array.length()).
The number of actually mapped elements (DataBuffer.count()) will be equal to
min(DataBuffer.capacity(),length-position).

map

Maps this data buffer to the specified position of the underlying data storage (usually AlgART array)
for accessing first min(maxCount,DataBuffer.capacity()) elements starting from this position.
If readData=true, the fragment of the data storage will be loaded
and accessible in the DataBuffer.data() Java array at the positions
DataBuffer.fromIndex()..DataBuffer.toIndex()-1.
If readData=false, the behaviour is the same with the exception of
reading data from the data storage is not guaranteed.
This mode can be useful for optimization in DataBuffer.AccessMode.READ_WRITE mode,
if you are sure that you will fully rewrite all mapped elements and, so, want
to save time by avoiding useless reading them.

The passed position must be in range 0..length,
where length is the total number of elements in the underlying data storage
(for an AlgART array, its Array.length()).
The number of actually mapped elements (DataBuffer.count()) will be equal to
min(maxCount,DataBuffer.capacity(),length-position).

This method should be used instead of the full map(position) version,
if you need to access a less number of elements than the full buffer capacity
or if you are going to fully rewrite all mapped elements.

data

Returns the Java array which contains the mapped region of the data.
The actual data elements are placed at the positions DataBuffer.fromIndex()..DataBuffer.toIndex()-1.
For bit elements, returned Java array is a packed long[] array,
and the positions in this array should be considered in terms of PackedBitArrays class.