Maximum Acyclic Subgraph - Multiple Sequence Alignment
MaximumAcyclicSubgraph
Public Member Functions | List of all members
colormap Class Reference

This Class stores an unordered_map from strings to colors and a method to map strings (expecially kmers) to a unique color. More...

#include <colormap.h>

Public Member Functions

 colormap (std::vector< std::string > &givenKmers, std::vector< sf::Color > &givenColorlist)
 
 colormap ()
 standard Constructor More...
 
void updateAssignment (std::vector< std::string > &givenKmers, std::vector< sf::Color > &givenColorlist)
 
sf::Color Map (std::string Kmer)
 
std::unordered_map< std::string, sf::Color > giveAssignment ()
 

Detailed Description

This Class stores an unordered_map from strings to colors and a method to map strings (expecially kmers) to a unique color.

The Class stores 1 variable: colorAssignment, which is a unordered_map with kmers (strings) as keys and a color as the assigned value. You can initialize a "colormap" with a vector of colors and a vector of kmers (strings). But both lists have to has the same size so, that the map method is unique and functionally complete. The Class stores 1 function: Map, which maps a single kmer (string) to a unique color

Constructor & Destructor Documentation

colormap::colormap ( std::vector< std::string > &  givenKmers,
std::vector< sf::Color > &  givenColorlist 
)

the complete constructor, which initialize the unordered_map with strings as keys and Color values as values

Parameters
givenKmersa vector of different kmers (strings)
givenColorlista vector of different Color values
colormap::colormap ( )

standard Constructor

the standard constructor, which initialize the unordered_map empty

Member Function Documentation

unordered_map< string, Color > colormap::giveAssignment ( )

Method to return the private unordered_map colorAssignment, which have strings as keys and Color values as values

Returns
an unordered_map with kmers as keys and Colors as values
Color colormap::Map ( std::string  Kmer)

this method will map a single Kmer (string) to a unique Color value with the class functions of the unorderd map.

Parameters
kmera string which is a Kmer
Returns
a Color value (unique)
void colormap::updateAssignment ( std::vector< std::string > &  givenKmers,
std::vector< sf::Color > &  givenColorlist 
)

this method initialize the unordered map colorAssignment.

Parameters
givenKmersa vector of different kmers (strings)
givenColorlista vector of different Color values

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