src/FieldOperations/binFieldList2Lattice.hh
//------------------------------------------------------------------------------
// Helper method to translate the given position to an index into a 1-D array.
//------------------------------------------------------------------------------
Helper method to translate the given position to an index into a 1-D array.
Helper method to translate the given position to an index into a 1 - D array .
inline
size_t
latticeIndexElement(const double xi,
                    const double xmin,
                    const double xmax,
                    const unsigned nsample) {
  return std::min(nsample - 1U, unsigned(std::max(0.0, std::min(1.0, (xi - xmin)/(xmax - xmin)))*nsample));
}
inline size_t latticeIndexElement ( const double xi , const double xmin , const double xmax , const unsigned nsample ) { return std :: min ( nsample - 1U , unsigned ( std :: max ( 0.0 , std :: min ( 1.0 , ( xi - xmin ) / ( xmax - xmin ) ) ) * nsample ) ) ; }
Helper method to translate the given position to an index into a 1-D array.
Helper method to translate the given position to an index into a 1 - D array .