package pbrt
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Pbrt.Repeated_fieldSource
optimized data structure for fast inserts so that decoding can be efficient
Type can be constructed at no cost from an existing array.
make v create an initial repeated field container v is not used but needed to initialize the internal array data structure.
This design flow is intentional to keep optimal performance.
Therefore lengh (make 1) will return 0.
of_array_no_copy a initialized a new repeated field container with a.
a is not copied into a but only referenced so any later modification to any a element will affected a t container.
add x c appends a to container c
This operation is not constant time since it might trigger an alocation of an array. However it is optimized for the total insert time of element one by one.
fold_left f e0 c accumulates e0 through each elements
map_to_array f c map all c element to an array containing f e_i element.