Skip to content
Snippets Groups Projects
Commit 25f6d6c2 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Merge branch 'master' of apps.jcns.fz-juelich.de:jwu-varia

Conflicts:
	libcerf/CHANGELOG
	trivia/lib/string_convs.cpp
parents 0f8960a9 2e4860b3
No related branches found
No related tags found
No related merge requests found
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
for e in ext:
if e=="h":
e = "hpp"
fnames += sorted( glob.glob( root+"*."+e ) )
return fnames
......@@ -44,7 +44,7 @@ string triv::strg( int val )
string triv::strg( size_t val )
{
return str( format( "%u" ) % val );
return str( format( "%i" ) % ((int)val) );
}
//! Convert char to string.
......
......@@ -77,7 +77,12 @@ bool triv::is_equidist( double *step, const vector<double>& V )
vector<size_t> triv::sorted_indices(vector<double> const& V)
{
vector<size_t> I(V.size());
iota(begin(I), end(I), static_cast<size_t>(0));
// C++11, not yet supported by gcc-4.4:
// iota(begin(I), end(I), 0);
// workaround:
for( size_t i=0; i<I.size(); ++i )
I[i] = i;
// end workaround.
sort( begin(I), end(I), [&](size_t a, size_t b) { return V[a] < V[b]; } );
return I;
}
# -*- mode: python -*-
# Include file for program lssrc.
# Returns user-written source files.
import glob, re
def source_files(root,ext):
fnames = []
for e in ext:
fnames += sorted( glob.glob( root+"*."+e ) )
return fnames
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment