#include <stdlib.h>
#include <string.h>
#include "core/ppm_xfuncs.h"
#include "ensure_array_size.h"
#include "xt/xt_idxlist.h"
#include "xt_cover.h"
Go to the source code of this file.
◆ xt_cover_finish()
◆ xt_cover_insert_or_overlap()
size_t xt_cover_insert_or_overlap |
( |
struct Xt_pos_ext_vec *restrict |
cover, |
|
|
struct Xt_pos_range |
range, |
|
|
bool |
forward, |
|
|
size_t |
search_start_pos |
|
) |
| |
- Parameters
-
cover | container of extents describing already covered portions of index list |
range | describes a contiguous interval of positions to search for and insert if not found |
forward | direction in which to search cover, i.e. incrementing from search_start_pos if true and decrementing if false |
search_start_pos | should be 0, if forward == true or cover->num_pos_ext, if forward == false to search all of cover, choose value to start search at if part of cover is known to be non-matching |
- Returns
- SIZE_MAX if range could be fully integrated with cover, position i of overlapping cover.pos_ext[i] otherwise
Definition at line 148 of file xt_cover.c.
◆ xt_cover_range_append()
append range to cover
- Note
- user must ensure range actually is appendable, i.e. does not overlap or precede an existing range in cover
Definition at line 128 of file xt_cover.c.
◆ xt_cover_search()
size_t xt_cover_search |
( |
struct Xt_pos_ext_vec *restrict |
cover, |
|
|
struct Xt_pos_range |
query, |
|
|
bool |
forward, |
|
|
size_t |
search_start_pos |
|
) |
| |
- Parameters
-
cover | container of extents describing already covered portions of index list |
query | range of positions to query if any in [query.start,query.end] is already in cover |
forward | direction to search the cover |
search_start_pos | should be 0, if forward == true or cover->num_pos_ext, if forward == false to search all of cover, choose value to start search at if part of cover is known to be non-matching |
- Returns
- index of first position extent in cover that overlaps or is adjacent to query
Definition at line 95 of file xt_cover.c.
◆ xt_cover_start()
void xt_cover_start |
( |
struct Xt_pos_ext_vec *restrict |
cover, |
|
|
size_t |
initial_size |
|
) |
| |
◆ xt_idxlist_pos_ext_is_full_cover()
tests if sorted pos_ext in coverage do indeed fully cover idxlist
Definition at line 75 of file xt_cover.c.