package menhirGLR
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9dc415bda0e3dd274892d59876630ee5
sha512=2a06d7411ff02b45de1ac27fe124cd22b78f8fd400f708e8be1ed93ff0749c024abd142486ac5375ecde82333d9b9c860f962f5598519c45dd6ee65008b86230
doc/menhirGLR/MenhirGLR/LinearizedArray/index.html
Module MenhirGLR.LinearizedArraySource
This module offers support for linearizing an array of arrays (of possibly different lengths). All of the data is placed in a single data array, which is constructed by concatenating all of the little arrays. An entry array, which contains offsets into the data array, is also constructed.
read la i j reads the linearized array la at indices i and j. Thus, read (make a) i j is equivalent to a.(i).(j).
write la i j v writes the value v into the linearized array la at indices i and j.
length la is the number of rows of the array la. Thus, length (make a) is equivalent to Array.length a.
row_length la i is the length of the row at index i in the linearized array la. Thus, row_length (make a) i is equivalent to Array.length a.(i).
read_row la i reads the row at index i, producing a list. Thus, read_row (make a) i is equivalent to Array.to_list a.(i).
Provided the accessor functions get_data and get_entry offers read access to the data and entry arrays of the linearized array la, read_row_via get_data get_entry i reads a row at index i in the linearized array la.