<commit_before>// This file is part of libigl, a simple c++ geometry processing library.
// 
// Copyright (C) 2015 <NAME> <<EMAIL>>
// 
// This Source Code Form is subject to the terms of the Mozilla Public License 
// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
// obtain one at http://mozilla.org/MPL/2.0/.
#include "mod.h"

template <typename DerivedA, typename DerivedB>
IGL_INLINE void igl::mod(
  const Eigen::PlainObjectBase<DerivedA> & A,
  const int base,
  Eigen::PlainObjectBase<DerivedB> & B)
{
  B.resize(A.rows(),A.cols());
  for(int i = 0;i<B.size();i++)
  {
    *(B.data()+i) = (*(A.data()+i))%base;
  }
}
template <typename DerivedA>
IGL_INLINE Eigen::PlainObjectBase<DerivedA> igl::mod(
  const Eigen::PlainObjectBase<DerivedA> & A, const int base)
{
  DerivedA B;
  mod(A,base,B);
  return B;
}
#ifdef IGL_STATIC_LIBRARY
#endif<commit_msg>fix bug in return value<commit_after>// This file is part of libigl, a simple c++ geometry processing library.
// 
// Copyright (C) 2015 <NAME> <<EMAIL>>
// 
// This Source Code Form is subject to the terms of the Mozilla Public License 
// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
// obtain one at http://mozilla.org/MPL/2.0/.
#include "mod.h"

template <typename DerivedA, typename DerivedB>
IGL_INLINE void igl::mod(
  const Eigen::PlainObjectBase<DerivedA> & A,
  const int base,
  Eigen::PlainObjectBase<DerivedB> & B)
{
  B.resize(A.rows(),A.cols());
  for(int i = 0;i<B.size();i++)
  {
    *(B.data()+i) = (*(A.data()+i))%base;
  }
}
template <typename DerivedA>
IGL_INLINE Eigen::PlainObjectBase<DerivedA> igl::mod(
  const Eigen::PlainObjectBase<DerivedA> & A, const int base)
{
  Eigen::PlainObjectBase<DerivedA> B;
  mod(A,base,B);
  return B;
}
#ifdef IGL_STATIC_LIBRARY
#endif
{'fraction_non_alphanumeric': 0.15359116022099448, 'fraction_numerical': 0.009944751381215469, 'mean_word_length': 4.072829131652661, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 22, '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': '5352891', 'n_tokens_mistral': 710, 'n_tokens_neox': 663, 'n_words': 195}