vg
tools for working with variation graphs
Public Member Functions | Private Attributes | List of all members
vg::GFAToPinchTranslator Class Reference

Public Member Functions

int64_t translate (const string &name)
 Translate from GFA name to pinch thread name. More...
 
const string & untranslate (const int64_t &name)
 Translate back from pinch thread name to GFA name. More...
 

Private Attributes

unordered_map< string, int64_t > forward
 Map from string name to numerical name number. More...
 
unordered_map< int64_t, string > backward
 Map from numerical name number back to string name. More...
 
int64_t next_unused = 1
 What is the next unused name we can assign? More...
 

Detailed Description

Represents a translation from GFA node name string to pinch thread name number. Tries to translate numerical node names as themselves, to the extent possible.

Member Function Documentation

◆ translate()

int64_t vg::GFAToPinchTranslator::translate ( const string &  name)

Translate from GFA name to pinch thread name.

◆ untranslate()

const string & vg::GFAToPinchTranslator::untranslate ( const int64_t &  name)

Translate back from pinch thread name to GFA name.

Member Data Documentation

◆ backward

unordered_map<int64_t, string> vg::GFAToPinchTranslator::backward
private

Map from numerical name number back to string name.

◆ forward

unordered_map<string, int64_t> vg::GFAToPinchTranslator::forward
private

Map from string name to numerical name number.

◆ next_unused

int64_t vg::GFAToPinchTranslator::next_unused = 1
private

What is the next unused name we can assign?


The documentation for this class was generated from the following file: