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

DiscreteAxis rm unused

parent e84d7225
No related branches found
No related tags found
1 merge request!1621Scale (IAxis) now without children
...@@ -35,10 +35,8 @@ std::vector<Bin1D> centers2bins(const std::vector<double>& centers) ...@@ -35,10 +35,8 @@ std::vector<Bin1D> centers2bins(const std::vector<double>& centers)
DiscreteAxis::DiscreteAxis(const std::string& name, const std::vector<double>& points) DiscreteAxis::DiscreteAxis(const std::string& name, const std::vector<double>& points)
: IAxis(name, centers2bins(points)) : IAxis(name, centers2bins(points))
, m_coordinates(points)
{ {
ASSERT(size() == points.size()); ASSERT(size() == points.size());
ASSERT(size() == m_coordinates.size());
} }
DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, double last) DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, double last)
...@@ -46,16 +44,6 @@ DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, doub ...@@ -46,16 +44,6 @@ DiscreteAxis::DiscreteAxis(const std::string& name, size_t n, double first, doub
{ {
} }
void DiscreteAxis::checkIndex(size_t index) const
{
if (m_coordinates.size() > index)
return;
std::string message = "Error in DiscreteAxis::binCenter: passed index ";
message += std::to_string(index) + " exceeds the size ";
message += std::to_string(m_coordinates.size()) + " of the axis";
throw std::runtime_error(message);
}
IAxis* newDiscreteAxis(const std::string& name, const std::vector<double>& points) IAxis* newDiscreteAxis(const std::string& name, const std::vector<double>& points)
{ {
return new IAxis(name, centers2bins(points)); return new IAxis(name, centers2bins(points));
......
...@@ -23,11 +23,6 @@ class DiscreteAxis : public IAxis { ...@@ -23,11 +23,6 @@ class DiscreteAxis : public IAxis {
public: public:
DiscreteAxis(const std::string& name, const std::vector<double>& points); DiscreteAxis(const std::string& name, const std::vector<double>& points);
DiscreteAxis(const std::string& name, size_t n, double first, double last); DiscreteAxis(const std::string& name, size_t n, double first, double last);
private:
void checkIndex(size_t index) const;
std::vector<double> m_coordinates;
}; };
IAxis* newDiscreteAxis(const std::string& name, const std::vector<double>& points); IAxis* newDiscreteAxis(const std::string& name, const std::vector<double>& points);
......
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