EdgeGnW / RustPraxisProjekt2024

A rust graph library utilizing wavelettrees/matrices
0 stars 0 forks source link

Error in creation of wavelet_matrix inside of conversion into wavemodel #41

Closed DerFred3 closed 1 week ago

DerFred3 commented 1 week ago

Inside of the process of converting a GraphModel into a WaveModel the sequence containing the outgoing vertices of each edge needs to be converted to numbers for the QWT-structure.

Currently all that is done is passing a vector of ascending integers up until the length of the sequence:

let sequence_indices = (0..sequence.len()).collect::<Vec<usize>>();

This needs to be changed into some mapping where each vertex inside of the adjacency-list gets assigned an index (starting at 0?). By not doing this the positional information about each vertex inside of the sequence is lost. The order in which the vertices get an index assigned to them is crucial and needs to be of some comparable-order (at best!). Otherwise this exact mapping needs to be stored separately, further increasing the required space of the whole data-structure.

This 'mapping' is explicitly needed when querying the wavelet-matrix, as the rank and select operation each demand a symbol for which the corresponding operation shall be performed.