diff --git a/pub/CMakeLists.txt.user b/pub/CMakeLists.txt.user index 9b6ac0f019d5d16643ab1481983f94c72a065e6a..446bf810e5e6b616a799f212bf5a0cf4e2391eda 100644 --- a/pub/CMakeLists.txt.user +++ b/pub/CMakeLists.txt.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 3.2.1, 2015-01-12T15:52:51. --> +<!-- Written by QtCreator 3.2.1, 2015-01-26T11:47:40. --> <qtcreator> <data> <variable>EnvironmentId</variable> diff --git a/pub/lib/calc.cpp b/pub/lib/calc.cpp index 06d1ce42c4381d4c4f2846ace90a018dbaa43cc8..93ef212fb0669d853266df8716e8770bec9c860c 100644 --- a/pub/lib/calc.cpp +++ b/pub/lib/calc.cpp @@ -28,7 +28,7 @@ using namespace std; //! Evaluates one expression and displays result. -void NCalc::Calculator( string s ) +void NCalc::calculator( string s ) { // cout << "computing '" << s << "'\n"; PNode T = user_xaxparse( s.c_str() ); @@ -48,4 +48,4 @@ void NCalc::Calculator( string s ) } } // TODO: resuscitate NReg::lastresult = ret (aka $_); -} \ No newline at end of file +} diff --git a/pub/lib/calc.hpp b/pub/lib/calc.hpp index 814fd5bec64ab8e364ae5aa6db0b6f0c7002224d..75d34ffab2c17d04ad45cada046c20ea843f2f05 100644 --- a/pub/lib/calc.hpp +++ b/pub/lib/calc.hpp @@ -11,5 +11,5 @@ //! Command-line pocket calculator. namespace NCalc { - void Calculator( string expr ); -} \ No newline at end of file + void calculator( std::string expr ); +} diff --git a/pub/lib/commands.cpp b/pub/lib/commands.cpp index 42c7fd54f839edbad6f052a8085daed20de55ae4..9db5e4db6d8710789e38e708450f74ec98279b19 100644 --- a/pub/lib/commands.cpp +++ b/pub/lib/commands.cpp @@ -44,7 +44,7 @@ //! Executes cmd if is a Frida command, and returns true when successful. -bool fridaCommand( string cmd ) +bool frida_command( string cmd ) { int i; @@ -359,21 +359,21 @@ bool fridaCommand( string cmd ) } else if (cmd == "gsym") { system( ("gv " + CNode::eval( "psgsym" )->to_s() + "&").c_str() ); } else if (cmd == "p") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], false ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], false ); } else if (cmd == "pr") { NPloWin::Plots[NPloWin::iPlot]->X.set_auto(); NPloWin::Plots[NPloWin::iPlot]->Y.set_auto(); - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], false ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], false ); } else if (cmd == "pn") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], false, "next" ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], false, "next" ); } else if (cmd == "pv") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], false, "prev" ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], false, "prev" ); } else if (cmd == "a") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], true ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], true ); } else if (cmd == "an") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], true, "next" ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], true, "next" ); } else if (cmd == "av") { - NPlot::Plot( NPloWin::Plots[NPloWin::iPlot], true, "prev" ); + NPlot::plot( NPloWin::Plots[NPloWin::iPlot], true, "prev" ); } else if (cmd == "k") { @@ -426,62 +426,62 @@ bool fridaCommand( string cmd ) ; } else if (cmd == "m/") { - NManip::freezeZEntry( true ); + NManip::freeze_slice( true ); } else if (cmd == "m/-") { - NManip::freezeZEntry( false ); + NManip::freeze_slice( false ); } else if (cmd == "md") { NOperate::select(1); } else if (cmd == "mr") { NOperate::select(0); } else if (cmd == "mpd") { - NManip::PtsSelect( true ); + NManip::points_select( true ); } else if (cmd == "mpr") { - NManip::PtsSelect( false ); + NManip::points_select( false ); } else if (cmd == "mpa") { - NManip::PtsAvge(); + NManip::points_rebin(); } else if (cmd == "mpaf") { - NManip::PtsAvgeFixed(); + NManip::points_rebin_by_factor(); } else if (cmd.substr(0,4) == "mpae") { - NManip::PtsAvgeByErr( cmd.substr(4) ); + NManip::points_rebin_by_err( cmd.substr(4) ); } else if (cmd == "mpo") { - NManip::PtsSort(); + NManip::points_sort(); } else if (cmd == "mpq") { - NManip::PtsAvgeEq(); + NManip::points_rebin_duplicates(); } else if (cmd == "mpsym") { - NManip::PtsSymmetrize(); + NManip::points_symmetrize(); } else if (cmd == "msd") { - NManip::ScaSelect( true ); + NManip::slices_select( true ); } else if (cmd == "msr") { - NManip::ScaSelect( false ); + NManip::slices_select( false ); } else if (cmd == "msa") { - NManip::ScaAvge(); + NManip::slices_rebin(); } else if (cmd == "msb") { - NManip::ScaBreak(); + NManip::slices_break(); } else if (cmd == "msj") { - NManip::ScaJoin(); + NManip::slices_merge(); } else if (cmd == "ms*") { - NManip::ScaSpawn(); + NManip::slices_spawn(); } else if (cmd == "msx") { - NManip::ScaExch(); + NManip::exchange_x_z(); } else if (cmd == "mzx") { - NManip::ZExchange(); + NManip::zcoords_reorder(); } else if (cmd == "mz-") { NEdif::show_coordZ(); - NManip::ZDelete(); + NManip::zcoord_delete(); } else if (cmd == "mso") { - NManip::ScaSortByExpr(); + NManip::slices_sort(); } else if (cmd == "msoz") { - NManip::ScaSortByZ(); + NManip::slices_sort_by_zcoords(); } else if (cmd == "mfjp") { - NManip::FilMergePointwise(); + NManip::files_merge_pointwise(); } else if (cmd.substr(0,3) == "mfj") { - NManip::FilMerge( cmd.substr(3) ); + NManip::files_merge( cmd.substr(3) ); } else if (cmd == "mr-") { NEdif::del_numpar(); } else if (cmd == "mi") { - NManip::Interpolate(); + NManip::interpolate(); } else if (cmd == "mhm") { - NManip::HistoMake(); + NManip::make_histogram(); } else if (cmd == "o") { @@ -537,23 +537,23 @@ bool fridaCommand( string cmd ) ; } else if (cmd == "ry" ) { - NRSSM::ReadSpec( 0 ); + NRSSM::read_spec( 0 ); } else if (cmd == "ry2") { - NRSSM::ReadSpec( 1 ); + NRSSM::read_spec( 1 ); } else if (cmd == "ry4") { - NRSSM::ReadSpec( 3 ); + NRSSM::read_spec( 3 ); } else if (cmd == "ry8") { - NRSSM::ReadSpec( 7 ); + NRSSM::read_spec( 7 ); } else if (cmd == "ryd") { - NRSSM::ReadSpec( 12 ); + NRSSM::read_spec( 12 ); } else if (cmd == "ryo") { - NRSSM::ReadSpec( 9 ); + NRSSM::read_spec( 9 ); } else if (cmd == "ryc") { - NRSSM::ReadSpec( 16 ); + NRSSM::read_spec( 16 ); } else if (cmd == "rs") { - NRSSM::ReadSeries( 0 ); + NRSSM::read_series( 0 ); } else if (cmd == "rs2") { - NRSSM::ReadSeries( 1 ); + NRSSM::read_series( 1 ); } else if (cmd == "!") { diff --git a/pub/lib/commands.hpp b/pub/lib/commands.hpp index 596e8911cc3c134730e67677f93dfd1be9ea6c19..260846f59ca722ca5b7c6549e91d0244220f331a 100644 --- a/pub/lib/commands.hpp +++ b/pub/lib/commands.hpp @@ -7,4 +7,4 @@ //! \file commands.hpp //! \brief Function fridaCommand: executes one main-level command. -bool fridaCommand( string cmd ); \ No newline at end of file +bool frida_command( string cmd ); diff --git a/pub/lib/curve.cpp b/pub/lib/curve.cpp index 896edda0f35251fde4fb7d83947ddbebb2f1af9a..ccc66c52b75543c2501c0cd69d8a46769d142b2d 100644 --- a/pub/lib/curve.cpp +++ b/pub/lib/curve.cpp @@ -39,8 +39,8 @@ void NCurveFile::create_fitcurve() NOlm::IterateD fiter; POlc fc( new COlc ); - fc->askCurve( "Curve definition" ); - fc->curveDefaults(); + fc->curve_query( "Curve definition" ); + fc->curve_set_defaults(); while( POld fd = fiter() ) { POlc fout( fc->new_olc() ); @@ -71,8 +71,8 @@ void NCurveFile::create_freecurve() static int default_no=0; POlc fout( new COlc ); - fout->askCurve( "Curve definition" ); - fout->curveDefaults(); + fout->curve_query( "Curve definition" ); + fout->curve_set_defaults(); fout->name = string("curve") + S(default_no++); fout->xco = CCoord( "x", "" ); @@ -97,7 +97,7 @@ void NCurveFile::create_freecurve() void NCurveFile::change_expr() { POlc ftmp( new COlc ); - ftmp->askCurve( "Replace curve definition by" ); + ftmp->curve_query( "Replace curve definition by" ); NOlm::IterateC fiter; @@ -322,7 +322,7 @@ void NCurveFile::show_pars() { NOlm::IterateC fiter; while( POlc fin=fiter() ) - cout << fin->pInfoCat(); + cout << fin->info_table(); } //! Sets resolution file reference *sv, *kv, *jv. diff --git a/pub/lib/edif.cpp b/pub/lib/edif.cpp index 4879e7a7f44f51833089471ea0b42646c92936b2..f57221eefcb864724d564bf542d7da89394fd00f 100644 --- a/pub/lib/edif.cpp +++ b/pub/lib/edif.cpp @@ -108,7 +108,7 @@ void NEdif::show_spectra() fd->VS(j)->x[fd->nPts(j)-1] ); } } else { - cout << fc->pInfoCat(); + cout << fc->info_table(); } } } @@ -248,14 +248,14 @@ void NEdif::edit_coord( string which ) CCoord new_co(in); fin->lDoc.push_back( "ec"+string(which)+" "+new_co.str_compact()+ " # old: " + old_co.str_compact() ); - fin->setCoord( &var, new_co ); + fin->set_coord( &var, new_co ); } } else { CCoord new_co(in); while ( fin = fiter() ) { fin->lDoc.push_back( "ec"+string(which)+" "+new_co.str_compact()+ " # old: " + old_co.str_compact() ); - fin->setCoord( &var, new_co ); + fin->set_coord( &var, new_co ); } } } diff --git a/pub/lib/file_in.cpp b/pub/lib/file_in.cpp index f5d717c4741e5be3fc93078a19cc0e465c3d3ecd..efede2095408b1973595bd2b3310ab5153221929 100644 --- a/pub/lib/file_in.cpp +++ b/pub/lib/file_in.cpp @@ -190,8 +190,8 @@ void NFileIn::Load_08( ifstream& FS, string flong ) throw "DEFICIENT FILE: no formula"; string expr; *pName >> expr; - fc->parseFunction( expr ); - fc->curveDefaults(); + fc->parse_function( expr ); + fc->curve_set_defaults(); } //start to read Tables diff --git a/pub/lib/fit.cpp b/pub/lib/fit.cpp index d09209e6b0d7b64fe2d59e2cd46ea3da282c0f4e..65b233ae244f783b18d3b646eb401e9edf0aa7b8 100644 --- a/pub/lib/fit.cpp +++ b/pub/lib/fit.cpp @@ -450,7 +450,7 @@ void NCurveFit::fit( bool _allow_slow_conv ) control.patience = nCall; control.verbosity = verbosity; - if ( fc->hasGlobalPar() ) { + if ( fc->has_global_par() ) { fit_global( fc, fd, fiter.k(), control ); } else { #pragma omp parallel for diff --git a/pub/lib/manip.cpp b/pub/lib/manip.cpp index 9a8bbef501fd5e067e26223557b0114b0e0353fb..818f09ab6737cb6b774439d589819c18ee97e529 100644 --- a/pub/lib/manip.cpp +++ b/pub/lib/manip.cpp @@ -38,7 +38,7 @@ namespace NManip { //! Restrict forthcoming operations -void NManip::freezeZEntry( bool on ) +void NManip::freeze_slice( bool on ) { NOlm::IterateO fiter; string sel; @@ -61,7 +61,7 @@ void NManip::freezeZEntry( bool on ) //! Delete (or retain) points according to list of indices. -void NManip::PtsSelect( bool sel_del ) +void NManip::points_select( bool sel_del ) { NOlm::IterateD fiter; static string pSel = ""; @@ -96,7 +96,7 @@ void NManip::PtsSelect( bool sel_del ) //! Bin points. -void NManip::PtsAvge() +void NManip::points_rebin() { NOlm::IterateD fiter; @@ -147,7 +147,7 @@ void NManip::PtsAvge() //! Bin points. -void NManip::PtsAvgeFixed() +void NManip::points_rebin_by_factor() { NOlm::IterateD fiter; static int ng=2; @@ -189,7 +189,7 @@ void NManip::PtsAvgeFixed() //! Bin points to keep errors below a certain bound. -void NManip::PtsAvgeByErr( const string& subcmd ) +void NManip::points_rebin_by_err( const string& subcmd ) { NOlm::IterateD fiter; bool mode_abs; @@ -248,7 +248,7 @@ void NManip::PtsAvgeByErr( const string& subcmd ) //! Sort spectrum according to given expression. -void NManip::PtsSort() +void NManip::points_sort() { NOlm::IterateD fiter; string expr = sask("Sort points according to"); @@ -288,7 +288,7 @@ void NManip::PtsSort() //! Average points that have the same x. -void NManip::PtsAvgeEq(void) +void NManip::points_rebin_duplicates(void) { NOlm::IterateD fiter; COld fout; @@ -331,7 +331,7 @@ void NManip::PtsAvgeEq(void) //! Symmetrize spectrum. -void NManip::PtsSymmetrize() +void NManip::points_symmetrize() { NOlm::IterateD fiter; static string expr = "0"; @@ -422,7 +422,7 @@ void NManip::ScaRemoveConstantZ( POlo fio ) //! Delete (or retain) spectra according to list of indices. -void NManip::ScaSelect( bool sel_del ) +void NManip::slices_select( bool sel_del ) { CList JSel, JSelSorted; static string jSel = ""; @@ -446,7 +446,7 @@ void NManip::ScaSelect( bool sel_del ) //! Bin spectra. -void NManip::ScaAvge() +void NManip::slices_rebin() { NOlm::IterateO fiter; CList JSel; @@ -540,7 +540,7 @@ void NManip::ScaAvge() //! Merge spectra, concatenating points. -void NManip::ScaJoin() +void NManip::slices_merge() { NOlm::IterateD fiter; CList JSel; @@ -577,7 +577,7 @@ void NManip::ScaJoin() //! After each span, insert given number of copies. -void NManip::ScaSpawn() +void NManip::slices_spawn() { NOlm::IterateO fiter; static int njj = 2; @@ -605,7 +605,7 @@ void NManip::ScaSpawn() //! Exchange x and z. -void NManip::ScaExch() +void NManip::exchange_x_z() { NOlm::IterateD fiter; while ( ROld fin = fiter() ) { @@ -681,9 +681,9 @@ void NManip::ScaExch() } -//! Sort spectra according to expression. +//! Sort slices according to expression. -void NManip::ScaSortByExpr() +void NManip::slices_sort() { NOlm::IterateO fiter; string expr = sask("Sort spectra according to"); @@ -708,9 +708,9 @@ void NManip::ScaSortByExpr() } -//! Sort spectra according to full z vector. +//! Sort slices according to full z vector. -void NManip::ScaSortByZ() +void NManip::slices_sort_by_zcoords() { NOlm::IterateO fiter; while ( ROlo fin = fiter() ) { @@ -725,7 +725,7 @@ void NManip::ScaSortByZ() //! Change order of z coordinates. -void NManip::ZExchange() +void NManip::zcoords_reorder() { NOlm::IterateO fiter; int nzmin, nzmax = 0; @@ -827,7 +827,7 @@ void NManip::ZExchange() //! Delete z coordinate. -void NManip::ZDelete() +void NManip::zcoord_delete() { NOlm::IterateO fiter; string sel; @@ -869,7 +869,7 @@ void NManip::ZDelete() //! Break file into several files, according to z0. -void NManip::ScaBreak() +void NManip::slices_break() { NOlm::IterateO fiter; while ( ROlo fin = fiter() ) { @@ -908,7 +908,7 @@ void NManip::ScaBreak() //! Merge files, concatenating spectra/curves. -void NManip::FilMerge( const string& opts ) +void NManip::files_merge( const string& opts ) { if ( NOlm::sel_size()<=1 ) throw "won't merge less than 2 files"; @@ -1062,7 +1062,7 @@ void NManip::FilMerge( const string& opts ) //! Merge files with same number of spectra, concatenating spectra with same j. -void NManip::FilMergePointwise() +void NManip::files_merge_pointwise() { NOlm::IterateD fiter; // Copy first input file: @@ -1108,7 +1108,7 @@ void NManip::FilMergePointwise() //! Locate y in x' to determine y'(x'=y). -void NManip::Interpolate() +void NManip::interpolate() { string expr = wask( "Interpolate in reference file" ); if (expr=="") @@ -1166,7 +1166,7 @@ void NManip::Interpolate() //! Create and fill histograms based on x values and their y weights. -void NManip::HistoMake() +void NManip::make_histogram() { // Determine range: double xmin=0, xmax=0; // initialized to prevent warning @@ -1228,4 +1228,4 @@ void NManip::HistoMake() } NOlm::mem_store( fout, fiter.k() ); } -} \ No newline at end of file +} diff --git a/pub/lib/manip.hpp b/pub/lib/manip.hpp index 6d241737688d85546196ba7ef85f3de497976494..188d8d7426d727b0e306ee87dd5549931e53d2e6 100644 --- a/pub/lib/manip.hpp +++ b/pub/lib/manip.hpp @@ -10,27 +10,26 @@ //! Manipulate data (select, bin, sort, ...) namespace NManip { - void freezeZEntry( bool on ); - void PtsSelect( bool sel_del ); - void PtsAvge(); - void PtsAvgeFixed(); - void PtsAvgeByErr( const string& subcmd ); - void PtsSort(); - void PtsAvgeEq(); - void PtsSymmetrize(); - void ScaSelect( bool sel_del ); - void ScaAvge(); - void ScaJoin(); - void ScaBreak(); - void ScaSpawn(); - void ZExchange(); - void ZDelete(); - void ScaZ(); - void ScaSortByExpr(); - void ScaSortByZ(); - void ScaExch(); - void HistoMake(); - void FilMerge( const string& opts ); - void FilMergePointwise(); - void Interpolate(); -} \ No newline at end of file + void freeze_slice( bool on ); + void points_select( bool sel_del ); + void points_rebin(); + void points_rebin_by_factor(); + void points_rebin_by_err( const string& subcmd ); + void points_rebin_duplicates(); + void points_sort(); + void points_symmetrize(); + void slices_select( bool sel_del ); + void slices_rebin(); + void slices_merge(); + void slices_break(); + void slices_spawn(); + void zcoords_reorder(); + void zcoord_delete(); + void slices_sort(); + void slices_sort_by_zcoords(); + void exchange_x_z(); + void make_histogram(); + void files_merge( const string& opts ); + void files_merge_pointwise(); + void interpolate(); +} diff --git a/pub/lib/olf.cpp b/pub/lib/olf.cpp index e35b8877f894a96aa191c18230a5a53870fd83e4..344562cf57dbbf3732ab7a3130f65bcddabde599 100644 --- a/pub/lib/olf.cpp +++ b/pub/lib/olf.cpp @@ -198,7 +198,7 @@ CCoord COlc::coord( CVar* var ) const //! Change one coordinate. -void COld::setCoord( CVar* var, CCoord& co ) +void COld::set_coord( CVar* var, CCoord& co ) { if ( var->typ==CVar::_X ) { xco = co; @@ -219,7 +219,7 @@ void COld::setCoord( CVar* var, CCoord& co ) //! Change one coordinate. -void COlc::setCoord( CVar* var, CCoord& co ) +void COlc::set_coord( CVar* var, CCoord& co ) { if ( var->typ==CVar::_X ) { xco = co; @@ -284,7 +284,7 @@ int COld::nPts() const { //! Prompt for curve description, and initialize things. -void COlc::askCurve( const string& quest ) +void COlc::curve_query( const string& quest ) { ask_again: string resp = sask( quest+" (or e(c|i)(r|w); h for help) ?" ); @@ -319,7 +319,7 @@ void COlc::askCurve( const string& quest ) expr = sask( "Curve evaluation command ?" ); nP = iask( "Number of parameters ?" ); } else { - parseFunction( resp ); + parse_function( resp ); } if( nP>100 ) throw "PLAUSIBILITY CHECK FAILED: unexpected number of parameters np = " @@ -332,7 +332,7 @@ void COlc::askCurve( const string& quest ) //! Set auxiliary parameters to default values. -void COlc::curveDefaults() +void COlc::curve_set_defaults() { for( int ip=0; ip<nP; ip++ ) PCo.push_back( CCoord("p" + S(ip), "") ); @@ -342,7 +342,7 @@ void COlc::curveDefaults() //! Parse function expression. -void COlc::parseFunction( const string& _expr ) +void COlc::parse_function( const string& _expr ) { evaMode = COlc::_EXPR; expr = _expr; @@ -569,7 +569,7 @@ vector<string> COlc::infoFile() const //! Returns header for scan parameter list. -string COlc::infoScanHeader() const +string COlc::info_table_header() const { const int PINFO_WRD_SIZ=15; char wrd[PINFO_WRD_SIZ]; @@ -590,10 +590,10 @@ string COlc::infoScanHeader() const //! Returns a table of j,z,p lines. -string COlc::pInfoCat() const +string COlc::info_table() const { vector<string> vs = infoFile(); - vs.push_back( infoScanHeader() ); + vs.push_back( info_table_header() ); for( int j=0; j<nJ(); j++ ) vs.push_back( infoLine( j ) ); string ret = ""; @@ -604,7 +604,7 @@ string COlc::pInfoCat() const //! Returns true if some parameters are global. -bool COlc::hasGlobalPar() const +bool COlc::has_global_par() const { for ( int j=0; j<nJ(); ++j ) if ( VC(j)->hasGlobalPar() ) @@ -629,4 +629,4 @@ string COlc::weight_str() const return "with reciprocal variance (data only)"; } throw "BUG: unexpected weight"; -} \ No newline at end of file +} diff --git a/pub/lib/olf.hpp b/pub/lib/olf.hpp index 567036c11779e8dcee0d18805fe04cea98422c7d..a6fb0105134fc624e3446c542376d283902db3af 100644 --- a/pub/lib/olf.hpp +++ b/pub/lib/olf.hpp @@ -42,7 +42,7 @@ class COlo { virtual PSlice new_slice( int j ) const = 0; virtual POlo new_olo( bool modified=true ) const = 0; virtual CCoord coord( class CVar* var ) const = 0; - virtual void setCoord( class CVar* var, CCoord& co ) = 0; + virtual void set_coord( class CVar* var, CCoord& co ) = 0; }; @@ -64,7 +64,7 @@ class COld : public COlo { int nPts(int j) const; int nPts() const; // 0 unless all spectra j have same nPts(j) CCoord coord( class CVar* var ) const; - void setCoord( class CVar* var, CCoord& co ); + void set_coord( class CVar* var, CCoord& co ); }; @@ -109,18 +109,18 @@ class COlc : public COlo { void copy_mainvec( ROlo fin ); // Pertinent functions: - bool hasGlobalPar() const; + bool has_global_par() const; string weight_str() const; vector<string> infoFile() const; - string infoScanHeader() const; - string pInfoCat() const; + string info_table_header() const; + string info_table() const; CCoord coord( class CVar* var ) const; - void setCoord( class CVar* var, CCoord& co ); + void set_coord( class CVar* var, CCoord& co ); // The following nontrivial function are implemented in curve.cpp: - void curveDefaults(); - void parseFunction( const string& expr ); - void askCurve( const string& quest ); + void curve_set_defaults(); + void parse_function( const string& expr ); + void curve_query( const string& quest ); void curve_val_vec( vector<double>* v, vector<double>* dv, const vector<double>& vt, int k, int j ) const; void curve_val_sca( double* r, double* dr, double farg, int k, int j ) const; @@ -132,4 +132,4 @@ class COlc : public COlo { #define P2D(p) boost::dynamic_pointer_cast< class COld>(p) #define R2D(p) boost::dynamic_pointer_cast<const class COld>(p) #define P2C(p) boost::dynamic_pointer_cast< class COlc>(p) -#define R2C(p) boost::dynamic_pointer_cast<const class COlc>(p) \ No newline at end of file +#define R2C(p) boost::dynamic_pointer_cast<const class COlc>(p) diff --git a/pub/lib/plot.cpp b/pub/lib/plot.cpp index 1549ac1b37ee61776efebfd174fbab79a17f3d01..1ec7029945a2abde14e8d4ed8f7d89597005746a 100644 --- a/pub/lib/plot.cpp +++ b/pub/lib/plot.cpp @@ -426,7 +426,7 @@ int plot_curve_refine( CPlot* plot, POlc fc, int k, int j, int cstyle ) //! Plot set of spectra, or add to open plot. -void NPlot::Plot( class CPlot *plot, bool add, const string& mode ) +void NPlot::plot( class CPlot *plot, bool add, const string& mode ) { NOlm::IterateO fiter; @@ -476,7 +476,7 @@ void NPlot::Plot( class CPlot *plot, bool add, const string& mode ) vector<string> vs = fc->infoFile(); for (int i=0; i<vs.size(); i++) plot->doc_TxLine( " " + vs[i] ); - plot->doc_TxLine( " " + fc->infoScanHeader() ); + plot->doc_TxLine( " " + fc->info_table_header() ); } JSel.evaluate( 0, f->nJ()-1 ); diff --git a/pub/lib/plot.hpp b/pub/lib/plot.hpp index 2a5163e006da829ed46f7c3d54c469189665c028..0c6750d2f39ceee62c5be810e24c2c7d0eb85ec4 100644 --- a/pub/lib/plot.hpp +++ b/pub/lib/plot.hpp @@ -11,5 +11,5 @@ //! Plot data and curves. namespace NPlot { - void Plot( class CPlot *plot, bool add, const string& mode="ask" ); -} \ No newline at end of file + void plot( class CPlot *plot, bool add, const string& mode="ask" ); +} diff --git a/pub/lib/rssm.cpp b/pub/lib/rssm.cpp index 35d0bdb985afa99c4b27ea970d4ec34e5c34c037..04a527f1023d7cbcf0fb2d797a6c24606fb360b1 100644 --- a/pub/lib/rssm.cpp +++ b/pub/lib/rssm.cpp @@ -212,7 +212,7 @@ void CRawfileSpheres::RdRawYam( ifstream& F_in ) //! Read one raw data file. -void NRSSM::ReadSpec( int flag ) +void NRSSM::read_spec( int flag ) // flag values (to be OR'ed): // 1 save also open @@ -369,7 +369,7 @@ void NRSSM::ReadSpec( int flag ) //! Read a series of raw data files. -void NRSSM::ReadSeries( int flag ) +void NRSSM::read_series( int flag ) // flag values (to be OR'ed): // 1 save also open diff --git a/pub/lib/rssm.hpp b/pub/lib/rssm.hpp index 82adfbd0543b2c01c05673853e31a80059d1d3d7..edf68dd7be04ae011f7cba0140c7c5b08d0062fd 100644 --- a/pub/lib/rssm.hpp +++ b/pub/lib/rssm.hpp @@ -10,7 +10,7 @@ //! Directly read SPHERES raw data. namespace NRSSM { - void ReadSpec( int flag ); - void ReadSeries( int flag ); - void ReadSeries2Histo( int flag ); -} \ No newline at end of file + void read_spec( int flag ); + void read_series( int flag ); + void read_series_to_histogram( int flag ); +} diff --git a/pub/lib/toplevel.cpp b/pub/lib/toplevel.cpp index d02b49663328bbd97e91ae8a881f9ac116ec147d..50bdd4903cb07e497955233f588cb47e0f444e94 100644 --- a/pub/lib/toplevel.cpp +++ b/pub/lib/toplevel.cpp @@ -87,10 +87,10 @@ void CFrida::execute_cmd( const string cmdline ) printf( "total frida CPU time now %g\n", time_total ); printf( "last command took %g\n", time_cmd ); return; - } else if ( fridaCommand( cmd ) ) { + } else if ( frida_command( cmd ) ) { ; } else { - NCalc::Calculator( cmd ); + NCalc::calculator( cmd ); } time_cmd = ((double) (clock() - clock_cmd_i)) / CLOCKS_PER_SEC; } diff --git a/pub/lib/var.cpp b/pub/lib/var.cpp index 4e37c8cd651e4a41e6fbc7c6c70f399ee12c2fc6..2abea9b34a2c9cf675e4aaf1891f94cf05013021 100644 --- a/pub/lib/var.cpp +++ b/pub/lib/var.cpp @@ -23,7 +23,7 @@ //! Returns number contained in parameter label s, starting at index pos. -int CVar::requestNum( string s, int pos ) +int CVar::request_num( string s, int pos ) { if ( s.size()<=pos ) throw "missing parameter number in '" + s + "'"; @@ -43,17 +43,17 @@ CVar::CVar( string s ) throw "Variable name missing"; if ( s[0]=='p' ) { // curve parameter - num = requestNum( s, 1 ); + num = request_num( s, 1 ); typ = _CP; } else if ( s=="z+" ) { // new z value typ = _Z; } else if ( s[0]=='z' ) { // existing z value - num = requestNum( s, 1 ); + num = request_num( s, 1 ); typ = _Z; } else if ( s=="r+" ) { // new real par typ = _R; } else if ( s[0]=='r' ) { // existing real par - num = requestNum( s, 1 ); + num = request_num( s, 1 ); typ = _R; } else if ( s=="nj" ) { typ = _NJ; diff --git a/pub/lib/var.hpp b/pub/lib/var.hpp index aad1fee72890c8071b453f32703411580ce835b8..965dcf7a29f514bc6d20f6254deded35869c4e1b 100644 --- a/pub/lib/var.hpp +++ b/pub/lib/var.hpp @@ -40,5 +40,5 @@ class CVar { string var_info() const; private: - static int requestNum( string s, int pos ); -}; \ No newline at end of file + static int request_num( string s, int pos ); +};