Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ISM::SVGHelper Class Reference

#include <SVGHelper.hpp>

Classes

struct  OptimizationRound
 
struct  OptimizationRun
 
struct  TopologyContainer
 

Public Member Functions

void processHistory (std::vector< std::vector< std::pair< TopologyPtr, unsigned int >>> &history, CostFunctionPtr< TopologyPtr > globalCostFunction, const std::string &patternName)
 
 SVGHelper (path outputPath)
 
void writeResult ()
 

Private Member Functions

double calculateCircleRadius (double evaluationDuration, double minEvaluationDuration, double maxEvaluationDuration)
 
void calculatePositions (std::vector< OptimizationRun > &optimizationRuns, std::vector< std::vector< int >> &seperatorLinePositions, unsigned int &imgWidth, unsigned int &imgHeight)
 
std::vector< int > calculateXValues (unsigned int numTopologies, unsigned int imageWidth)
 
std::vector< ptree > createSVG (std::vector< OptimizationRun > optimizationRuns)
 
ptree createXML (const std::string &patternName)
 
ptree genCircleSVG (double radius, int x, int y, const std::string &circleColor, bool highlight, const std::string &highlightColor)
 
ptree genEvaluationRoundXML (unsigned int roundNumber, unsigned int chosenIndex)
 
ptree genPolylineSVG (std::vector< std::string > linePoints)
 
ptree genRectSVG (int x, int y, unsigned int width, unsigned int height, const std::string &colorString)
 
std::string genRGBString (double cost, double minCost, double maxCost)
 
ptree genSeparatorLineSVG (int y, int x1, int x2)
 
ptree genTextSVG (const std::string &lineOne, const std::string &lineTwo, const std::string &lineThree, int x, int y)
 
ptree genTopologyContainerXML (TopologyContainer tc)
 

Private Attributes

const std::string ATR_CHOSEN_INDEX = "chosen_index"
 
const std::string ATR_EVALUATION_RESULT = "evaluation_result"
 
const std::string ATR_PATTERN_NAME = "pattern_name"
 
const std::string ATR_RELATION_IDS = "relation_ids"
 
const std::string ATR_ROUND_NUMBER = "round_number"
 
const std::string COLOR_BEST = "purple"
 
const std::string COLOR_FIRST_HIGHLIGHT = "aqua"
 
const std::string COLOR_HIGHLIGHT = "cornflowerblue"
 
const std::string COLOR_LAST_HIGHLIGHT = "blue"
 
const std::string COLOR_RANDOM_RESTART_HIGHLIGHT = "black"
 
const std::string COLOR_RANDOM_WALK_HIGHLIGHT = "black"
 
const unsigned int FONT_SIZE = 30
 
const unsigned int HIGHLIGHT_WIDTH = 7
 
const unsigned int LINE_WIDTH = 6
 
std::vector< OptimizationRoundmAllEvaluationRounds
 
const unsigned int MAX_CIRCLE_RADIUS = 160
 
const unsigned int MAX_TOPOLOGIES_PER_LINE = 12
 
OptimizationRound mCurrentOptimizationRound
 
OptimizationRun mCurrentOptimizationRun
 
std::string mCurrentPatternName
 
const unsigned int MIN_CIRCLE_RADIUS = 100
 
path mOutputPath
 
std::map< std::string, std::vector< OptimizationRun > > mPatternNameToOptimizationRuns
 
const std::string NAME_OPTIMIZATION_RUN = "optimization-run"
 
const std::string NAME_ROUND = "round"
 
const std::string NAME_TOPOLOGY = "topology"
 
const unsigned int PADDING = 20
 

Detailed Description

Definition at line 39 of file SVGHelper.hpp.

Constructor & Destructor Documentation

ISM::SVGHelper::SVGHelper ( path  outputPath)
inline

Definition at line 42 of file SVGHelper.hpp.

Member Function Documentation

double ISM::SVGHelper::calculateCircleRadius ( double  evaluationDuration,
double  minEvaluationDuration,
double  maxEvaluationDuration 
)
private

Definition at line 519 of file SVGHelper.cpp.

void ISM::SVGHelper::calculatePositions ( std::vector< OptimizationRun > &  optimizationRuns,
std::vector< std::vector< int >> &  seperatorLinePositions,
unsigned int &  imgWidth,
unsigned int &  imgHeight 
)
private

Definition at line 141 of file SVGHelper.cpp.

std::vector< int > ISM::SVGHelper::calculateXValues ( unsigned int  numTopologies,
unsigned int  imageWidth 
)
private

Definition at line 107 of file SVGHelper.cpp.

std::vector< ptree > ISM::SVGHelper::createSVG ( std::vector< OptimizationRun optimizationRuns)
private

Definition at line 229 of file SVGHelper.cpp.

ptree ISM::SVGHelper::createXML ( const std::string &  patternName)
private

Definition at line 455 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genCircleSVG ( double  radius,
int  x,
int  y,
const std::string &  circleColor,
bool  highlight,
const std::string &  highlightColor 
)
private

Definition at line 355 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genEvaluationRoundXML ( unsigned int  roundNumber,
unsigned int  chosenIndex 
)
private

Definition at line 484 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genPolylineSVG ( std::vector< std::string >  linePoints)
private

Definition at line 420 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genRectSVG ( int  x,
int  y,
unsigned int  width,
unsigned int  height,
const std::string &  colorString 
)
private

Definition at line 441 of file SVGHelper.cpp.

std::string ISM::SVGHelper::genRGBString ( double  cost,
double  minCost,
double  maxCost 
)
private

Definition at line 493 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genSeparatorLineSVG ( int  y,
int  x1,
int  x2 
)
private

Definition at line 406 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genTextSVG ( const std::string &  lineOne,
const std::string &  lineTwo,
const std::string &  lineThree,
int  x,
int  y 
)
private

Definition at line 371 of file SVGHelper.cpp.

ptree ISM::SVGHelper::genTopologyContainerXML ( TopologyContainer  tc)
private

Definition at line 476 of file SVGHelper.cpp.

void ISM::SVGHelper::processHistory ( std::vector< std::vector< std::pair< TopologyPtr, unsigned int >>> &  history,
CostFunctionPtr< TopologyPtr globalCostFunction,
const std::string &  patternName 
)

Definition at line 29 of file SVGHelper.cpp.

void ISM::SVGHelper::writeResult ( )

Definition at line 85 of file SVGHelper.cpp.

Member Data Documentation

const std::string ISM::SVGHelper::ATR_CHOSEN_INDEX = "chosen_index"
private

Definition at line 79 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::ATR_EVALUATION_RESULT = "evaluation_result"
private

Definition at line 81 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::ATR_PATTERN_NAME = "pattern_name"
private

Definition at line 82 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::ATR_RELATION_IDS = "relation_ids"
private

Definition at line 83 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::ATR_ROUND_NUMBER = "round_number"
private

Definition at line 80 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_BEST = "purple"
private

Definition at line 92 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_FIRST_HIGHLIGHT = "aqua"
private

Definition at line 89 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_HIGHLIGHT = "cornflowerblue"
private

Definition at line 91 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_LAST_HIGHLIGHT = "blue"
private

Definition at line 90 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_RANDOM_RESTART_HIGHLIGHT = "black"
private

Definition at line 95 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::COLOR_RANDOM_WALK_HIGHLIGHT = "black"
private

Definition at line 94 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::FONT_SIZE = 30
private

Definition at line 100 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::HIGHLIGHT_WIDTH = 7
private

Definition at line 101 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::LINE_WIDTH = 6
private

Definition at line 102 of file SVGHelper.hpp.

std::vector<OptimizationRound> ISM::SVGHelper::mAllEvaluationRounds
private

Definition at line 111 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::MAX_CIRCLE_RADIUS = 160
private

Definition at line 98 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::MAX_TOPOLOGIES_PER_LINE = 12
private

Definition at line 104 of file SVGHelper.hpp.

OptimizationRound ISM::SVGHelper::mCurrentOptimizationRound
private

Definition at line 108 of file SVGHelper.hpp.

OptimizationRun ISM::SVGHelper::mCurrentOptimizationRun
private

Definition at line 109 of file SVGHelper.hpp.

std::string ISM::SVGHelper::mCurrentPatternName
private

Definition at line 110 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::MIN_CIRCLE_RADIUS = 100
private

Definition at line 97 of file SVGHelper.hpp.

path ISM::SVGHelper::mOutputPath
private

Definition at line 106 of file SVGHelper.hpp.

std::map<std::string, std::vector<OptimizationRun> > ISM::SVGHelper::mPatternNameToOptimizationRuns
private

Definition at line 112 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::NAME_OPTIMIZATION_RUN = "optimization-run"
private

Definition at line 87 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::NAME_ROUND = "round"
private

Definition at line 86 of file SVGHelper.hpp.

const std::string ISM::SVGHelper::NAME_TOPOLOGY = "topology"
private

Definition at line 85 of file SVGHelper.hpp.

const unsigned int ISM::SVGHelper::PADDING = 20
private

Definition at line 99 of file SVGHelper.hpp.


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


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41