Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 74f92d8a authored by ext-rogers_c's avatar ext-rogers_c
Browse files

Remove unwanted code

parent 5201fe8c
No related branches found
No related tags found
1 merge request!459Resolve "Unit Test TestSolvePolynomialQuadraticSmoothed disabled"
#include <iomanip>
#include <cmath>
#include "Interface/Mesh.hh"
#include "Utils/Exception.hh"
namespace interpolation {
/////// TwoDGrid ///////
TwoDGrid::TwoDGrid() : _x(2,0), _y(2,0), _xSize(2), _ySize(2), _maps(), _constantSpacing(false)
{
_x[1] = 1.; _y[1] = 1.;
}
TwoDGrid::TwoDGrid(double dX, double dY, double minX, double minY, int numberOfXCoords, int numberOfYCoords)
: _x(), _y(), _xSize(numberOfXCoords), _ySize(numberOfYCoords), _maps(), _constantSpacing(true)
{
if(numberOfXCoords < 2 || numberOfYCoords < 2) throw(MAUS::Exception(MAUS::Exception::recoverable, "2D Grid must be at least 2x2 grid", "TwoDGrid::TwoDGrid(...)"));
for(int i=0; i<numberOfXCoords; i++) _x.push_back(minX+i*dX);
for(int j=0; j<numberOfYCoords; j++) _y.push_back(minY+j*dY);
SetConstantSpacing();
}
TwoDGrid::TwoDGrid(int xSize, const double *x, int ySize, const double *y) : _x(x, x+xSize), _y(y, y+ySize), _xSize(xSize), _ySize(ySize), _maps(), _constantSpacing(false)
{
if(xSize < 2 || ySize < 2) throw(MAUS::Exception(MAUS::Exception::recoverable, "2D Grid must be at least 2x2 grid", "TwoDGrid::TwoDGrid(...)"));
SetConstantSpacing();
delete [] x;
delete [] y;
}
TwoDGrid::TwoDGrid(std::vector<double> x, std::vector<double> y) : _x (x), _y(y), _xSize(x.size()), _ySize(y.size()), _maps(), _constantSpacing(false)
{
if(_xSize < 2 || _ySize < 2) throw(MAUS::Exception(MAUS::Exception::recoverable, "2D Grid must be at least 2x2 grid", "TwoDGrid::TwoDGrid(...)"));
SetConstantSpacing();
}
TwoDGrid::~TwoDGrid()
{
}
Mesh::Iterator TwoDGrid::Begin() const
{
return Mesh::Iterator(std::vector<int>(2,1), this);
}
Mesh::Iterator TwoDGrid::End() const
{
std::vector<int> end(2, 1); end[0] = _xSize+1; return Mesh::Iterator(end, this);
}
void TwoDGrid::Position(const Mesh::Iterator& it, double * position) const
{
position[0] = x(it._state[0]);
position[1] = y(it._state[1]);
}
void TwoDGrid::CentrePosition(const Mesh::Iterator& it, double * position) const
{
if( it._state[0]>=xSize() ) position[0] = MaxX() + ( x(xSize() ) - x(xSize()-1) )*(it._state[0]-xSize()+0.5) ;
else if( it._state[0]<0 ) position[0] = MinX() + (x(2)-x(1))*(it._state[0]-0.5);
else position[0] = 0.5*(x(it._state[0]+1)+x(it._state[0]));
if( it._state[1]>=ySize() ) position[1] = MaxY() + ( y(ySize() ) - y(ySize()-1) )*(it._state[1]-ySize()+0.5) ;
else if( it._state[1]<0 ) position[1] = MinY() + (y(2)-y(1))*(it._state[1]-0.5);
else position[1] = 0.5*(y(it._state[1]+1)+y(it._state[1]));
}
Mesh::Iterator& TwoDGrid::AddEquals(Mesh::Iterator& lhs, int difference) const
{
if(difference < 0) return SubEquals(lhs, -difference);
lhs._state[0] += difference/(_ySize);
lhs._state[1] += difference%(_ySize);
if(lhs._state[1] > _ySize) {lhs._state[1] -= _ySize; lhs._state[0]++;}
return lhs;
}
Mesh::Iterator& TwoDGrid::SubEquals(Mesh::Iterator& lhs, int difference) const
{
if(difference < 0) return AddEquals(lhs, -difference);
lhs._state[0] -= difference/(_ySize);
lhs._state[1] -= difference%(_ySize);
if(lhs._state[1] < 1) {lhs._state[1] += _ySize; lhs._state[0]--;}
return lhs;
}
Mesh::Iterator& TwoDGrid::AddEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
return AddEquals(lhs, rhs.ToInteger());
}
Mesh::Iterator& TwoDGrid::SubEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
return SubEquals(lhs, rhs.ToInteger());
}
Mesh::Iterator& TwoDGrid::AddOne (Mesh::Iterator& lhs) const
{
if(lhs._state[1] == this->ySize()) {lhs._state[1] = 1; ++lhs._state[0];}
else ++lhs._state[1];
return lhs;
}
Mesh::Iterator& TwoDGrid::SubOne (Mesh::Iterator& lhs) const
{
if(lhs._state[1] == 1) {lhs._state[1] = this->ySize(); --lhs._state[0];}
else --lhs._state[1];
return lhs;
}
//Check relative position
bool TwoDGrid::IsGreater(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
if(lhs._state[0] > rhs._state[0]) return true;
else if (lhs._state[0] == rhs._state[0] && lhs._state[1] > rhs._state[1]) return true;
return false;
}
void TwoDGrid::Remove(VectorMap* map) //remove *map if it exists; delete this if there are no more VectorMaps
{
std::vector<VectorMap*>::iterator it = std::find(_maps.begin(), _maps.end(), map);
if(it<_maps.end()) { _maps.erase(it); }
if(_maps.begin() == _maps.end()) { delete this; }
}
void TwoDGrid::Add(VectorMap* map) //add *map if it has not already been added
{
std::vector<VectorMap*>::iterator it = std::find(_maps.begin(), _maps.end(), map);
if(it==_maps.end()) { _maps.push_back(map); }
}
void TwoDGrid::SetConstantSpacing()
{
_constantSpacing = true;
for (unsigned int i = 0; i < _x.size()-1; i++)
if (std::abs(1-(_x[i+1]-_x[i])/(_x[1]-_x[0])) > 1e-9)
_constantSpacing = false;
for (unsigned int i = 0; i < _y.size()-1; i++)
if (std::abs(1-(_y[i+1]-_y[i])/(_y[1]-_y[0])) > 1e-9)
_constantSpacing = false;
}
Mesh::Iterator TwoDGrid::Nearest(const double* position) const
{
std::vector<int> index(2);
LowerBound(position[0], index[0], position[1], index[1]);
if(index[0] < _xSize-1 && index[0] >= 0)
index[0] += (2*(position[0] - _x[index[0]]) > _x[index[0]+1]-_x[index[0]] ? 2 : 1);
else
index[0] += 1;
if(index[1] < _ySize-1 && index[1] >= 0)
index[1] += (2*(position[1] - _y[index[1]]) > _y[index[1]+1]-_y[index[1]] ? 2 : 1);
else
index[1] += 1;
if(index[0] < 1) index[0] = 1;
if(index[1] < 1) index[1] = 1;
if(index[0] > _xSize) index[0] = _xSize;
if(index[1] > _ySize) index[1] = _ySize;
return Mesh::Iterator(index, this);
}
///// End of TwoDGrid /////
/// ////// NDGrid ///////
NDGrid::NDGrid() : _coord(), _maps(), _constantSpacing(false)
{
for(unsigned int i=0; i<2; i++) {_coord.push_back(std::vector<double>(2,0)); _coord.back()[1] = 1.;}
}
NDGrid::NDGrid(std::vector<int> size, std::vector<const double *> gridCoordinates) : _coord(), _maps(), _constantSpacing(false)
{
for(unsigned int i=0; i<size.size(); i++)
{
if(size[i] < 2)
throw(MAUS::Exception(MAUS::Exception::recoverable, "ND Grid must be at least 2x2x...x2 grid", "NDGrid::NDGrid(...)"));
_coord.push_back(std::vector<double>(gridCoordinates[i], gridCoordinates[i] + size[i]) );
}
SetConstantSpacing();
}
NDGrid::NDGrid(int nDimensions, int* size, double* spacing, double* min) : _coord(nDimensions), _maps(), _constantSpacing(true)
{
for(int i=0; i<nDimensions; i++)
{
if(size[i] < 2) throw(MAUS::Exception(MAUS::Exception::recoverable, "ND Grid must be at least 2x2x...x2 grid", "NDGrid::NDGrid(...)"));
_coord[i] = std::vector<double>(size[i]);
for(unsigned int j=0; j<_coord[i].size(); j++) _coord[i][j] = min[i] + j*spacing[i];
}
}
NDGrid::NDGrid(std::vector< std::vector<double> > gridCoordinates) : _coord(gridCoordinates), _maps(), _constantSpacing(false)
{
for(unsigned int i=0; i<gridCoordinates.size(); i++)
if(gridCoordinates[i].size() < 2) throw(MAUS::Exception(MAUS::Exception::recoverable, "ND Grid must be at least 2x2x...x2 grid", "NDGrid::NDGrid(...)"));
SetConstantSpacing();
}
double* NDGrid::newCoordArray ( const int& dimension) const
{
double * array = new double[_coord[dimension].size() ];
for(unsigned int i=0; i<_coord[dimension].size(); i++) array[i] = _coord[dimension][i];
return array;
}
//Mesh::Iterator wraps around a std::vector<int>
//it[0] is least significant, it[max] is most signifcant
Mesh::Iterator& NDGrid::AddEquals(Mesh::Iterator& lhs, int difference) const
{
if(difference < 0) return SubEquals(lhs, -difference);
std::vector<int> index (_coord.size(),0);
std::vector<int> content(_coord.size(),1);
for(int i=int(index.size()-2); i>=0; i--) content[i] = content[i+1]*_coord[i+1].size(); //content could be member variable
for(int i=0; i<int(index.size()); i++)
{
index[i] = difference/content[i];
difference -= index[i] * content[i];
}
for(unsigned int i=0; i<index.size(); i++) lhs._state[i] += index[i];
for(int i=int(index.size())-1; i>0; i--)
{
if(lhs._state[i] > int(_coord[i].size()) )
{
lhs._state[i-1]++;
lhs._state[i] -= _coord[i].size();
}
}
return lhs;
}
Mesh::Iterator& NDGrid::SubEquals(Mesh::Iterator& lhs, int difference) const
{
if(difference < 0) return AddEquals(lhs, -difference);
std::vector<int> index (_coord.size(),0);
std::vector<int> content(_coord.size(),1);
for(int i=int(index.size()-2); i>=0; i--) content[i] = content[i+1]*_coord[i+1].size(); //content could be member variable
for(int i=0; i<int(index.size()); i++)
{
index[i] = difference/content[i];
difference -= index[i] * content[i];
}
for(unsigned int i=0; i<index.size(); i++) lhs._state[i] -= index[i];
for(int i=int(index.size())-1; i>0; i--)
{
if(lhs._state[i] < 1)
{
lhs._state[i-1]--;
lhs._state[i] += _coord[i].size();
}
}
return lhs;
}
Mesh::Iterator& NDGrid::AddEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
return AddEquals(lhs, rhs.ToInteger());
}
Mesh::Iterator& NDGrid::SubEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
return SubEquals(lhs, rhs.ToInteger());
}
Mesh::Iterator& NDGrid::AddOne (Mesh::Iterator& lhs) const
{
int i=_coord.size()-1;
while(lhs[i] == int(_coord[i].size()) && i>0) {lhs[i]=1; i--;}
lhs[i]++;
return lhs;
}
Mesh::Iterator& NDGrid::SubOne (Mesh::Iterator& lhs) const
{
lhs[_coord.size()-1] -= 1;
int i = _coord.size()-1;
while(lhs[i] == 0 && i>0)
{
lhs._state[i] = _coord[i].size();
i--;
lhs._state[i]--;
}
return lhs;
}
void NDGrid::SetConstantSpacing()
{
_constantSpacing = true;
for(unsigned int i=0; i<_coord.size(); i++)
for(unsigned int j=0; j<_coord[i].size()-1; j++)
if( std::abs(1-(_coord[i][j+1]-_coord[i][j])/(_coord[i][1]-_coord[i][0])) > 1e-9 )
{_constantSpacing = false; return;}
}
bool NDGrid::IsGreater(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const
{
unsigned int i = 0;
while(lhs._state[i] == rhs._state[i] && i<rhs._state.size()-1) i++; //if all equal; rhs[i] = rhs.last
return (lhs[i] > rhs[i]);
}
int NDGrid::ToInteger(const Mesh::Iterator& lhs) const
{
int difference = 0;
std::vector<int> index (_coord.size(),0);
std::vector<int> content(_coord.size(),1);
for(int i=int(index.size()-2); i>=0; i--) content[i] = content[i+1]*_coord[i+1].size(); //content could be member variable
for(int i=0; i<int(index.size()); i++) difference += (lhs._state[i]-1) * (content[i]);
return difference;
}
Mesh::Iterator NDGrid::Nearest(const double* position) const
{
std::vector<int> index(_coord.size());
std::vector<double> pos (position, position+_coord.size());
LowerBound (pos, index);
for(unsigned int i=0; i<_coord.size(); i++)
{
if(index[i] < int(_coord[i].size()-1) && index[i] >= 0) index[i] += (2*(position[i] - _coord[i][index[i]]) > _coord[i][index[i]+1]-_coord[i][index[i]] ? 2 : 1);
else index[i]++;
if(index[i] < 1) index[i] = 1;
if(index[i] > int(_coord[i].size())) index[i] = _coord[i].size();
}
return Mesh::Iterator(index, this);
}
}
////// NDGrid END ////////
// MAUS WARNING: THIS IS LEGACY CODE.
#ifndef TwoDGrid_hh
#define TwoDGrid_hh
#include <algorithm>
#include <cmath>
#include <ostream>
#include <vector>
#include "Fields/Interpolation/Mesh.h"
namespace interpolation {
//Holds grid info for 2dTo1d interpolation algorithm;
//also controls memory usage (essentially a boost::shared_pointer but not as elegent);
class TwoDGrid : public Mesh
{
public:
class Iterator;
//get value
Mesh * Clone() {return new TwoDGrid(*this);}
Mesh * Dual () {return NULL;}
//ERROR SHOULD NOT ALLOW MESH WITH 1 GRID POINT (causes error in LowerBound)
TwoDGrid();
TwoDGrid(double dX, double dY, double minX, double minY, int numberOfXCoords, int numberOfYCoords);
TwoDGrid(int xSize, const double *x, int ySize, const double *y);
TwoDGrid(std::vector<double> x, std::vector<double> y);
~TwoDGrid();
//get coordinate; round bracket indexing starts at 1 goes to nCoords
inline double& x (const int& i) {return _x[i-1];}
inline double& y (const int& j) {return _y[j-1];}
inline const double& x (const int& i) const {return _x[i-1];}
inline const double& y (const int& j) const {return _y[j-1];}
inline int xSize() const {return int(_x.size());}
inline int ySize() const {return int(_y.size());}
std::vector<double> xVector() {return std::vector<double>(_x);}
std::vector<double> yVector() {return std::vector<double>(_y);}
double* newXArray() {double *x = new double[_x.size()]; for(unsigned int i=0; i<_x.size(); i++) x[i]=_x[i]; return x;}
double* newYArray() {double *y = new double[_y.size()]; for(unsigned int i=0; i<_y.size(); i++) y[i]=_y[i]; return y;}
//if you are sure the grid has constant spacing ConstSpacing is quicker; VarSpacing in either case
//return lower bound on x for insertion i.e. 0 if x < x[1], 1 if x[1] < x < x[2], ... , x.size()-1 if x > x.back()
inline void xLowerBound (const double& x, int& xIndex) const
{if(_constantSpacing) xIndex = static_cast<int>(std::floor( (x - _x[0])/(_x[1]-_x[0]) )); else xIndex = std::lower_bound(_x.begin(), _x.end(), x)-_x.begin()-1;}
inline void yLowerBound (const double& y, int& yIndex) const
{if(_constantSpacing) yIndex = static_cast<int>(std::floor( (y - _y[0])/(_y[1]-_y[0]) )); else yIndex = std::lower_bound(_y.begin(), _y.end(), y)-_y.begin()-1;}
inline void LowerBound (const double& x, int& xIndex, const double& y, int& yIndex) const
{xLowerBound(x, xIndex); yLowerBound(y, yIndex);}
inline double MinX() const {return _x[0];}
inline double MaxX() const {return _x[_xSize-1];}
inline double MinY() const {return _y[0];}
inline double MaxY() const {return _y[_ySize-1];}
void Add (VectorMap* map); //add *map if it has not already been added
void Remove(VectorMap* map); //remove *map if it exists; delete this if there are no more VectorMaps
void SetX(int nXCoords, double * x) {_x = std::vector<double>(x,x+nXCoords);}
void SetY(int nYCoords, double * y) {_y = std::vector<double>(y,y+nYCoords);}
Mesh::Iterator Begin() const;
Mesh::Iterator End() const;
//position of mesh point
virtual void Position(const Mesh::Iterator& it, double * position) const;
//position of centre of mesh point at it and opposite diagonal in +ve index direction
virtual void CentrePosition(const Mesh::Iterator& it, double * position) const;
int PositionDimension() const {return 2;}
int ToInteger(const Mesh::Iterator& lhs) const {return (lhs.State()[0]-1)*(_ySize)+lhs.State()[1]-1;}
void SetConstantSpacing(bool spacing) {_constantSpacing = spacing;}
void SetConstantSpacing();
bool GetConstantSpacing() const {return _constantSpacing; }
Mesh::Iterator Nearest(const double* position) const;
protected:
//Change position
Mesh::Iterator& AddEquals(Mesh::Iterator& lhs, int difference) const;
Mesh::Iterator& SubEquals(Mesh::Iterator& lhs, int difference) const;
Mesh::Iterator& AddEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
Mesh::Iterator& SubEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
Mesh::Iterator& AddOne (Mesh::Iterator& lhs) const;
Mesh::Iterator& SubOne (Mesh::Iterator& lhs) const;
//Check relative position
bool IsGreater(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
private:
std::vector<double> _x;
std::vector<double> _y;
int _xSize;
int _ySize;
std::vector<VectorMap*> _maps;
bool _constantSpacing;
friend Mesh::Iterator operator++(Mesh::Iterator& lhs, int);
friend Mesh::Iterator operator--(Mesh::Iterator& lhs, int);
friend Mesh::Iterator& operator++(Mesh::Iterator& lhs);
friend Mesh::Iterator& operator--(Mesh::Iterator& lhs);
friend Mesh::Iterator operator- (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator operator+ (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator& operator-=(Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator& operator+=(Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator operator- (const Mesh::Iterator&, const int&);
friend Mesh::Iterator operator+ (const Mesh::Iterator&, const int&);
friend Mesh::Iterator& operator-=(Mesh::Iterator&, const int&);
friend Mesh::Iterator& operator+=(Mesh::Iterator&, const int&);
friend bool operator==(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator!=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator>=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator<=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator< (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator> (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
};
//Holds grid info for some vector mapping;
//also controls memory usage (essentially a boost::shared_pointer but not as elegent);
class NDGrid : public Mesh
{
public:
class Iterator;
Mesh * Clone() {return new NDGrid(*this);}
Mesh * Dual () {return NULL;}
//get value
NDGrid();
NDGrid(int nDimensions, int* size, double* spacing, double* min);
NDGrid(std::vector<int> size, std::vector<const double *> gridCoordinates);
NDGrid(std::vector< std::vector<double> > gridCoordinates);
~NDGrid() {;}
//get coordinate; round bracket indexing starts at 1 goes to nCoords
inline double& coord ( const int& index, const int& dimension) {return _coord[dimension][index-1];}
inline const double& coord ( const int& index, const int& dimension) const {return _coord[dimension][index-1];}
inline int size ( const int& dimension ) const {return _coord[dimension].size();}
std::vector<double> coordVector( const int& dimension ) const {return _coord[dimension];}
double* newCoordArray ( const int& dimension ) const;
//if you are sure the grid has constant spacing ConstSpacing is quicker; VarSpacing in either case
//indexing starts at 0 and goes to nCoords+1
inline void coordLowerBound (const double& x, const int& dimension, int& xIndex) const
{
if(_constantSpacing) xIndex = static_cast<int>(std::floor( (x - _coord[dimension][0])/(_coord[dimension][1]-_coord[dimension][0]) ));
else xIndex = std::lower_bound(_coord[dimension].begin(), _coord[dimension].end(), x)-_coord[dimension].begin()-1;
}
inline void LowerBound (const std::vector<double>& pos, std::vector<int>& xIndex) const
{xIndex = std::vector<int>(pos.size()); for(unsigned int i=0; i<pos.size(); i++) coordLowerBound(pos[i], i, xIndex[i]);}
inline double Min (const int& dimension) const {return _coord[dimension][0];}
inline double Max (const int& dimension) const {return _coord[dimension][_coord[dimension].size()-1];}
void SetCoord ( int dimension, int nCoords, double * x) {_coord[dimension] = std::vector<double>(x, x+nCoords);}
Mesh::Iterator Begin() const {return Mesh::Iterator(std::vector<int>(_coord.size(), 1), this);}
Mesh::Iterator End() const {std::vector<int> end(_coord.size(), 1); end[0] = _coord[0].size()+1; return Mesh::Iterator(end, this);}
void Position(const Mesh::Iterator& it, double * position) const {for(unsigned int i=0; i<it.State().size(); i++) position[i] = _coord[i][it[i]-1];}
int PositionDimension() const {return _coord.size();}
bool GetConstantSpacing() const {return _constantSpacing;}
void SetConstantSpacing(bool spacing) {_constantSpacing = spacing;}
void SetConstantSpacing();
int ToInteger (const Mesh::Iterator& lhs) const;
Mesh::Iterator Nearest (const double* position) const;
protected:
//Change position
virtual Mesh::Iterator& AddEquals(Mesh::Iterator& lhs, int difference) const;
virtual Mesh::Iterator& SubEquals(Mesh::Iterator& lhs, int difference) const;
virtual Mesh::Iterator& AddEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
virtual Mesh::Iterator& SubEquals(Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
virtual Mesh::Iterator& AddOne (Mesh::Iterator& lhs) const;
virtual Mesh::Iterator& SubOne (Mesh::Iterator& lhs) const;
//Check relative position
virtual bool IsGreater(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs) const;
private:
std::vector< std::vector<double> > _coord;
std::vector<VectorMap*> _maps;
bool _constantSpacing;
friend Mesh::Iterator operator++(Mesh::Iterator& lhs, int);
friend Mesh::Iterator operator--(Mesh::Iterator& lhs, int);
friend Mesh::Iterator& operator++(Mesh::Iterator& lhs);
friend Mesh::Iterator& operator--(Mesh::Iterator& lhs);
friend Mesh::Iterator operator- (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator operator+ (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator& operator-=(Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend Mesh::Iterator& operator+=(Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator==(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator!=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator>=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator<=(const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator< (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
friend bool operator> (const Mesh::Iterator& lhs, const Mesh::Iterator& rhs);
};
}
#endif
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