<commit_before>#pragma once

#include "math.hpp"
#include "cast.hpp"

namespace ncv
{
        ///
        /// \brief resize the input matrix by the given factor (using bilinear interpolation)
        ///
        template
        <       typename tmatrix,
                typename tscalar = double
        >
        void bilinear(const tmatrix& src, tmatrix& dst, tscalar factor)
        {
                typedef typename tmatrix::Scalar tvalue;

                static const tscalar eps = math::cast<tscalar>(1e-2);
                static const tscalar one = math::cast<tscalar>(1.0);

                if (factor < eps || math::abs(factor - one) < eps)
                {
                        dst = src;
                }
                else
                {
                        const int irows = math::cast<int>(src.rows());
                        const int icols = math::cast<int>(src.cols());
                        const int orows = math::cast<int>(0.5 + factor * irows);
                        const int ocols = math::cast<int>(0.5 + factor * icols);
                        const tscalar is = one / factor;

                        // bilinear interpolation
                        dst.resize(orows, ocols);
                        for (int _or = 0; _or < orows; _or ++)
                        {<commit_msg>fix type order<commit_after>#pragma once

#include "math.hpp"
#include "cast.hpp"

namespace ncv
{
        ///
        /// \brief resize the input matrix by the given factor (using bilinear interpolation)
        ///
        template
        <
                typename tscalar = double,
                typename tmatrix
        >
        void bilinear(const tmatrix& src, tmatrix& dst, tscalar factor)
        {
                typedef typename tmatrix::Scalar tvalue;

                static const tscalar eps = math::cast<tscalar>(1e-2);
                static const tscalar one = math::cast<tscalar>(1.0);

                if (factor < eps || math::abs(factor - one) < eps)
                {
                        dst = src;
                }
                else
                {
                        const int irows = math::cast<int>(src.rows());
                        const int icols = math::cast<int>(src.cols());
                        const int orows = math::cast<int>(0.5 + factor * irows);
                        const int ocols = math::cast<int>(0.5 + factor * icols);
                        const tscalar is = one / factor;

                        // bilinear interpolation
                        dst.resize(orows, ocols);
                        for (int _or = 0; _or < orows; _or ++)
                        {
{'fraction_non_alphanumeric': 0.10214044310927525, 'fraction_numerical': 0.006759294029290274, 'mean_word_length': 1.1711491442542787, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 17, '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': '7281810', 'n_tokens_mistral': 723, 'n_tokens_neox': 653, 'n_words': 188}