Skip to content

Commit

Permalink
1) Mostly improving plotting script (making it sort input data by x-a…
Browse files Browse the repository at this point in the history
…xis values)

2) Disabling sync with stdio.
  • Loading branch information
searchivairus committed Dec 10, 2017
1 parent df4fdbd commit c029f6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/genplot_configurable.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def genPGFPlot(experiments, methNames, methStyles, outputFile, xAxisField, yAxis

if printSameMeth == sameMethFlag:
methodData = experiments[methodId]
lines.append(LATEX_LINE % (methStyles[methodId],'\n'.join(methodData), legendEntry))
methodData.sort()
methodDataStr = [ str(e[0]) + ' ' + str(e[1]) for e in methodData]
lines.append(LATEX_LINE % (methStyles[methodId],'\n'.join(methodDataStr), legendEntry))
lines.append('%s %s %s' % ('%', methodId, methodName))


Expand Down Expand Up @@ -184,7 +186,7 @@ def parseExpr(inputFile, lineNumber, row, header, xAxisField, yAxisField):

methodId = row[METHOD_ID_FIELD_ID]
props = methodNameAndStyle(methodId)
return [methodId, props[0], props[1], row[header[xAxisField]] + ' ' + row[header[yAxisField]]]
return [methodId, props[0], props[1], (row[header[xAxisField]], row[header[yAxisField]]) ]

def genPlotLatex(inputFile, outputFile, xAxisField, yAxisField, axisType, noLegend, printXaxis, printYaxis):
header = {}
Expand Down
3 changes: 3 additions & 0 deletions similarity_search/src/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@

#include "logging.h"

#include <iostream>

namespace similarity {

void initLibrary(LogChoice choice, const char* pLogFile) {
std::ios_base::sync_with_stdio(false);
InitializeLogger(choice, pLogFile);
initSpaces();
initMethods();
Expand Down

0 comments on commit c029f6b

Please sign in to comment.