vg
tools for working with variation graphs
Public Member Functions | Public Attributes | List of all members
vg::IndexedVG::CacheEntry Struct Reference

#include <indexed_vg.hpp>

Public Member Functions

 CacheEntry (cursor_t &to_read)
 Make a cache entry for a group by reading a cursor at that group's start. More...
 
 CacheEntry (CacheEntry &&other)=default
 
CacheEntryoperator= (CacheEntry &&other)=default
 
Graph query (const id_t &id) const
 Pull out the subgraph for the given node. More...
 

Public Attributes

Graph merged_group
 All the graphs get merged into this one. More...
 
unordered_map< id_t, size_t > id_to_node_index
 This maps from node ID to index in the merged graph. More...
 
unordered_map< id_t, vector< size_t > > id_to_edge_indices
 This maps from node ID to indexes of touched edges in the merged graph. More...
 
int64_t next_group
 

Detailed Description

Represents an entry in the cache for a parsed group of graphs. Has its own indexes and the virtual offset of the next group.

Constructor & Destructor Documentation

◆ CacheEntry() [1/2]

vg::IndexedVG::CacheEntry::CacheEntry ( cursor_t to_read)

Make a cache entry for a group by reading a cursor at that group's start.

◆ CacheEntry() [2/2]

vg::IndexedVG::CacheEntry::CacheEntry ( CacheEntry &&  other)
default

Member Function Documentation

◆ operator=()

CacheEntry& vg::IndexedVG::CacheEntry::operator= ( CacheEntry &&  other)
default

◆ query()

Graph vg::IndexedVG::CacheEntry::query ( const id_t id) const

Pull out the subgraph for the given node.

Member Data Documentation

◆ id_to_edge_indices

unordered_map<id_t, vector<size_t> > vg::IndexedVG::CacheEntry::id_to_edge_indices

This maps from node ID to indexes of touched edges in the merged graph.

◆ id_to_node_index

unordered_map<id_t, size_t> vg::IndexedVG::CacheEntry::id_to_node_index

This maps from node ID to index in the merged graph.

◆ merged_group

Graph vg::IndexedVG::CacheEntry::merged_group

All the graphs get merged into this one.

◆ next_group

int64_t vg::IndexedVG::CacheEntry::next_group

This is the virtual offset of the next group in the file. If this was the last group in the file, this is numeric_limits<int64_t>::max().


The documentation for this struct was generated from the following files: