}
}
+/*!
+ * This method recenter tuples in \b this in order to be centered at the origin to benefit about the advantages of maximal precision to be around the box
+ * around origin of 'radius' 1.
+ *
+ * \param [in] eps absolute epsilon. under that value of delta between max and min no scale is performed.
+ */
+void DataArrayDouble::recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception)
+{
+ checkAllocated();
+ int dim=getNumberOfComponents();
+ std::vector<double> bounds(2*dim);
+ getMinMaxPerComponent(&bounds[0]);
+ for(int i=0;i<dim;i++)
+ {
+ double delta=bounds[2*i+1]-bounds[2*i];
+ double offset=(bounds[2*i]+bounds[2*i+1])/2.;
+ if(delta>eps)
+ applyLin(1./delta,-offset/delta,i);
+ else
+ applyLin(1.,-offset,i);
+ }
+}
+
double DataArrayDouble::getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception)
{
if(getNumberOfComponents()!=1)
bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const throw(INTERP_KERNEL::Exception);
void zipCoords() throw(INTERP_KERNEL::Exception);
double getCaracteristicDimension() const throw(INTERP_KERNEL::Exception);
+ void recenterForMaxPrecision(double eps) const throw(INTERP_KERNEL::Exception);
void changeSpaceDimension(int newSpaceDim, double dftVal=0.) throw(INTERP_KERNEL::Exception);
void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception) = 0;
void convertAllToPoly();
void convertExtrudedPolyhedra() throw(INTERP_KERNEL::Exception);
void unPolyze() throw(INTERP_KERNEL::Exception);
+ void simplifyPolyhedra(double eps) throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildSpreadZonesWithPoly() const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy) throw(INTERP_KERNEL::Exception);
};