Yet Another eXchange Tool 0.11.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
xt_cover.h File Reference
#include <stdbool.h>
#include <stdlib.h>
#include "core/ppm_visibility.h"
#include "xt/xt_core.h"
Include dependency graph for xt_cover.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Xt_pos_ext_vec
 
struct  Xt_pos_range
 

Functions

PPM_DSO_INTERNAL void xt_cover_start (struct Xt_pos_ext_vec *restrict cover, size_t initial_size)
 
PPM_DSO_INTERNAL void xt_cover_finish (struct Xt_pos_ext_vec *restrict cover)
 
PPM_DSO_INTERNAL size_t xt_cover_search (struct Xt_pos_ext_vec *restrict cover, struct Xt_pos_range query, size_t search_start_pos)
 
PPM_DSO_INTERNAL void xt_cover_range_append (struct Xt_pos_ext_vec *restrict cover, struct Xt_pos_ext range)
 
PPM_DSO_INTERNAL size_t xt_cover_insert_or_overlap (struct Xt_pos_ext_vec *restrict cover, struct Xt_pos_range range, size_t search_start_pos)
 
PPM_DSO_INTERNAL bool xt_idxlist_pos_ext_is_full_cover (Xt_idxlist idxlist, struct Xt_pos_ext_vec cover)
 

Detailed Description

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_cover.h.

Function Documentation

◆ xt_cover_finish()

PPM_DSO_INTERNAL void xt_cover_finish ( struct Xt_pos_ext_vec *restrict cover)

Definition at line 69 of file xt_cover.c.

Here is the caller graph for this function:

◆ xt_cover_insert_or_overlap()

PPM_DSO_INTERNAL size_t xt_cover_insert_or_overlap ( struct Xt_pos_ext_vec *restrict cover,
struct Xt_pos_range range,
size_t search_start_pos )
Parameters
covercontainer of extents describing already covered portions of index list
rangedescribes a contiguous interval of positions to search for and insert if not found
search_start_posshould 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 161 of file xt_cover.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_cover_range_append()

PPM_DSO_INTERNAL void xt_cover_range_append ( struct Xt_pos_ext_vec *restrict cover,
struct Xt_pos_ext range )

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 141 of file xt_cover.c.

Here is the caller graph for this function:

◆ xt_cover_search()

PPM_DSO_INTERNAL size_t xt_cover_search ( struct Xt_pos_ext_vec *restrict cover,
struct Xt_pos_range query,
size_t search_start_pos )
Parameters
covercontainer of extents describing already covered portions of index list
queryrange of positions to query if any in [query.start,query.end] is already in cover
search_start_posshould be 0 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 following query or SIZE_MAX if the last range is non-adjacent and precedes the query

Definition at line 100 of file xt_cover.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xt_cover_start()

PPM_DSO_INTERNAL void xt_cover_start ( struct Xt_pos_ext_vec *restrict cover,
size_t initial_size )

Definition at line 60 of file xt_cover.c.

Here is the caller graph for this function:

◆ xt_idxlist_pos_ext_is_full_cover()

PPM_DSO_INTERNAL bool xt_idxlist_pos_ext_is_full_cover ( Xt_idxlist idxlist,
struct Xt_pos_ext_vec cover )

tests if sorted pos_ext in coverage do indeed fully cover idxlist

Definition at line 75 of file xt_cover.c.

Here is the caller graph for this function: