/** * \file output_helpers.h * \brief manipulation of text, and Interconversion between text and numbers * Copyright 2007-2013 IMP Inventors. All rights reserved. */ #ifndef IMPALGEBRA_INTERNAL_GRID_APPLY_H #define IMPALGEBRA_INTERNAL_GRID_APPLY_H #include IMPALGEBRA_BEGIN_INTERNAL_NAMESPACE template struct GridApplier { static void apply(const Grid &g, typename Grid::ExtendedIndex &lb, typename Grid::ExtendedIndex &ub, const typename Grid::Vector &corner, const typename Grid::Vector &cell, typename Grid::Index &index, typename Grid::Vector ¢er, Functor &f) { int *data=index.access_data().get_data(); for (data[D]=lb[D]; data[D]::apply(g, lb, ub, corner, cell, index, center, f); } } }; template struct GridApplier { static void apply(const Grid &g, typename Grid::ExtendedIndex &lb, typename Grid::ExtendedIndex &ub, const typename Grid::Vector &corner, const typename Grid::Vector &cell, typename Grid::Index &index, typename Grid::Vector ¢er, Functor &f) { const int D=0; for (index.access_data().get_data()[D]=lb[0]; index[0] struct GridApplier { static void apply_recursive(const Grid &g, typename Grid::ExtendedIndex &lb, typename Grid::ExtendedIndex &ub, const typename Grid::Vector &corner, unsigned int D, const typename Grid::Vector &cell, typename Grid::Index &index, typename Grid::Vector ¢er, Functor &f) { int *data=index.access_data().get_data(); for (data[D]=lb[D]; data[D]