Skip to content
Snippets Groups Projects
Commit 28ca1704 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added explicit statements

cppcheck warnings
parent 77c057b9
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
......@@ -56,7 +56,7 @@ protected:
AnalysisBase* my_input_data;
public:
static void registerKeywords( Keywords& keys );
AnalysisBase(const ActionOptions&);
explicit AnalysisBase(const ActionOptions&);
/// These are required because we inherit from both ActionAtomistic and ActionWithArguments
void lockRequests();
void unlockRequests();
......
......@@ -44,7 +44,7 @@ private:
Matrix<double> dissimilarities;
public:
static void registerKeywords( Keywords& keys );
EuclideanDissimilarityMatrix( const ActionOptions& ao );
explicit EuclideanDissimilarityMatrix( const ActionOptions& ao );
/// Do the analysis
void performAnalysis();
/// This ensures that classes that use this data know that dissimilarities were set
......
......@@ -40,7 +40,7 @@ private:
unsigned seed;
public:
static void registerKeywords( Keywords& keys );
FarthestPointSampling( const ActionOptions& ao );
explicit FarthestPointSampling( const ActionOptions& ao );
void selectLandmarks();
};
......
......@@ -45,7 +45,7 @@ protected:
void voronoiAnalysis( const std::vector<unsigned>& myindices, std::vector<double>& lweights, std::vector<unsigned>& assignments ) const ;
public:
static void registerKeywords( Keywords& keys );
LandmarkSelectionBase( const ActionOptions& ao );
explicit LandmarkSelectionBase( const ActionOptions& ao );
/// Return the number of data points
unsigned getNumberOfDataPoints() const ;
/// Return the index of the data point in the base class
......
......@@ -43,7 +43,7 @@ private:
double gamma;
public:
static void registerKeywords( Keywords& keys );
LandmarkStaged( const ActionOptions& ao );
explicit LandmarkStaged( const ActionOptions& ao );
void selectLandmarks();
};
......
......@@ -52,7 +52,7 @@ private:
std::vector<std::string> req_vals;
public:
static void registerKeywords( Keywords& keys );
OutputColvarFile( const ActionOptions& );
explicit OutputColvarFile( const ActionOptions& );
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
void performAnalysis();
};
......
......@@ -42,7 +42,7 @@ private:
std::string fname;
public:
static void registerKeywords( Keywords& keys );
PrintDissimilarityMatrix( const ActionOptions& ao );
explicit PrintDissimilarityMatrix( const ActionOptions& ao );
void performAnalysis();
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
};
......
......@@ -51,7 +51,7 @@ private:
std::vector<double> weights;
public:
static void registerKeywords( Keywords& keys );
ReadDissimilarityMatrix( const ActionOptions& ao );
explicit ReadDissimilarityMatrix( const ActionOptions& ao );
unsigned getNumberOfDataPoints() const ;
// Return the index of the data point in the base class
unsigned getDataPointIndexInBase( const unsigned& idata ) const ;
......
......@@ -42,7 +42,7 @@ private:
LandmarkSelectionBase* mylandmarks;
public:
static void registerKeywords( Keywords& keys );
ReselectLandmarks( const ActionOptions& ao );
explicit ReselectLandmarks( const ActionOptions& ao );
void selectLandmarks();
};
......
......@@ -40,7 +40,7 @@ private:
unsigned seed;
public:
static void registerKeywords( Keywords& keys );
SelectRandomFrames( const ActionOptions& ao );
explicit SelectRandomFrames( const ActionOptions& ao );
void selectLandmarks();
};
......
......@@ -37,7 +37,7 @@ This can be used to output the a histogram using the weighted histogram techniqu
class WhamHistogram : public ActionShortcut {
public:
static void registerKeywords( Keywords& keys );
WhamHistogram( const ActionOptions& );
explicit WhamHistogram( const ActionOptions& );
};
PLUMED_REGISTER_ACTION(WhamHistogram,"WHAM_HISTOGRAM")
......
......@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object.
class WhamWeights : public ActionShortcut {
public:
static void registerKeywords( Keywords& keys );
WhamWeights( const ActionOptions& );
explicit WhamWeights( const ActionOptions& );
};
PLUMED_REGISTER_ACTION(WhamWeights,"WHAM_WEIGHTS")
......
......@@ -43,7 +43,7 @@ protected:
DimensionalityReductionBase* dimredbase;
public:
static void registerKeywords( Keywords& keys );
DimensionalityReductionBase( const ActionOptions& );
explicit DimensionalityReductionBase( const ActionOptions& );
/// Get the ith data point (this returns the projection)
virtual void getProjection( const unsigned& idata, std::vector<double>& point, double& weight );
/// Actually perform the analysis
......
......@@ -50,7 +50,7 @@ private:
std::string filename;
public:
static void registerKeywords( Keywords& keys );
OutputPCAProjection( const ActionOptions& );
explicit OutputPCAProjection( const ActionOptions& );
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
void performAnalysis();
};
......
......@@ -53,7 +53,7 @@ private:
void generateProjection( const unsigned& idat, std::vector<double>& point );
public:
static void registerKeywords( Keywords& keys );
ProjectNonLandmarkPoints( const ActionOptions& ao );
explicit ProjectNonLandmarkPoints( const ActionOptions& ao );
/// Get a reference configuration (this returns the projection)
analysis::DataCollectionObject& getStoredData( const unsigned& idat, const bool& calcdist );
/// Overwrite getArguments so we get arguments from underlying class
......
......@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object.
class SketchMap : public ActionShortcut {
public:
static void registerKeywords( Keywords& keys );
SketchMap( const ActionOptions& );
explicit SketchMap( const ActionOptions& );
};
PLUMED_REGISTER_ACTION(SketchMap,"SKETCH_MAP")
......
......@@ -49,7 +49,7 @@ protected:
double mixparam;
public:
static void registerKeywords( Keywords& keys );
SketchMapBase( const ActionOptions& );
explicit SketchMapBase( const ActionOptions& );
/// This starts the process of calculating the projections
void calculateProjections( const Matrix<double>&, Matrix<double>& );
/// This finishes the process of calculating the prjections
......
......@@ -40,7 +40,7 @@ private:
double cgtol;
public:
static void registerKeywords( Keywords& keys );
SketchMapConjGrad( const ActionOptions& ao );
explicit SketchMapConjGrad( const ActionOptions& ao );
void minimise( Matrix<double>& );
};
......
......@@ -43,7 +43,7 @@ private:
std::vector<unsigned> npoints, nfgrid;
public:
static void registerKeywords( Keywords& keys );
SketchMapPointwise( const ActionOptions& ao );
explicit SketchMapPointwise( const ActionOptions& ao );
void minimise( Matrix<double>& );
};
......
......@@ -53,7 +53,7 @@ private:
std::vector<std::unique_ptr<ReferenceConfiguration> > myframes;
public:
static void registerKeywords( Keywords& keys );
SketchMapRead( const ActionOptions& ao );
explicit SketchMapRead( const ActionOptions& ao );
void minimise( Matrix<double>& );
analysis::DataCollectionObject& getStoredData( const unsigned& idata, const bool& calcdist );
unsigned getNumberOfDataPoints() const ;
......
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