<commit_before>// implementation for cube_evaluate.h

#include <utils/array1d.h>
#include <utils/fixed_array1d.h>
#include <geometry/point.h>
#include <geometry/grid.h>
#include <geometry/sampled_mapping.h>

using MathTL::Point;
using MathTL::Grid;

namespace WaveletTL
{
  template <class IBASIS, unsigned int DIM>
  SampledMapping<DIM>
  evaluate(const CubeBasis<IBASIS,DIM>& basis,
	   const typename CubeBasis<IBASIS,DIM>::Index& lambda,
	   const bool primal,
	   const int resolution)
  {
    FixedArray1D<Array1D<double>,DIM> values; // point values of the factors within psi_lambda
    for (unsigned int i = 0; i < DIM; i++)
      values[i] = evaluate(*(basis.bases()[i]),
			   typename IBASIS::Index(lambda.j(),
						  lambda.e()[i],
						  lambda.k()[i],
						  basis.bases()[i]),
			   primal,
			   resolution).values();
   
    SampledMapping<DIM> result(Point<DIM>(0), Point<DIM>(1), values);
    return result; // gcc 2.95 does not like these two lines melted into one
  }<commit_msg>namespace problem in cube_evaluate fixed<commit_after>// implementation for cube_evaluate.h

#include <utils/array1d.h>
#include <utils/fixed_array1d.h>
#include <geometry/point.h>
#include <geometry/grid.h>
#include <geometry/sampled_mapping.h>

using namespace MathTL;

namespace WaveletTL
{
  template <class IBASIS, unsigned int DIM>
  SampledMapping<DIM>
  evaluate(const CubeBasis<IBASIS,DIM>& basis,
	   const typename CubeBasis<IBASIS,DIM>::Index& lambda,
	   const bool primal,
	   const int resolution)
  {
    FixedArray1D<Array1D<double>,DIM> values; // point values of the factors within psi_lambda
    for (unsigned int i = 0; i < DIM; i++)
      values[i] = evaluate(*(basis.bases()[i]),
			   typename IBASIS::Index(lambda.j(),
						  lambda.e()[i],
						  lambda.k()[i],
						  basis.bases()[i]),
			   primal,
			   resolution).values();
   
    SampledMapping<DIM> result(Point<DIM>(0), Point<DIM>(1), values);
    return result; // gcc 2.95 does not like these two lines melted into one
  }
{'fraction_non_alphanumeric': 0.13640873015873015, 'fraction_numerical': 0.00992063492063492, 'mean_word_length': 3.825358851674641, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3704971', 'n_tokens_mistral': 769, 'n_tokens_neox': 677, 'n_words': 169}