<commit_before>/**
 *  \file
 *  \remark This file is part of VITA.
 *
 *  \copyright Copyright (C) 2014-2016 <NAME>.
 *
 *  \license
 *  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/
 */

#if !defined(VITA_UTILITY_H)
#define      VITA_UTILITY_H

#include <algorithm>
#include <iomanip>
#include <fstream>
#include <sstream>

#include "tinyxml2/tinyxml2.h"

#include "kernel/vita.h"

namespace vita
{
bool iequals(const std::string &, const std::string &);
std::string trim(const std::string &);

///
/// \return an `std::array` filled with value `v`.
///
/// This function is used to initialize array in member initialization list
/// of a constructor (so to be compliant with Effective C++).
/// To be efficient the compiler need to perform the RVO optimization / copy
/// elision.
///
/// \see <http://stackoverflow.com/q/21993780/3235496>
///
template<class T, unsigned N> std::array<T, N> make_array(T v)<commit_msg>[FIX] Missing header file in utility.h<commit_after>/**
 *  \file
 *  \remark This file is part of VITA.
 *
 *  \copyright Copyright (C) 2014-2016 <NAME>.
 *
 *  \license
 *  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/
 */

#if !defined(VITA_UTILITY_H)
#define      VITA_UTILITY_H

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <fstream>
#include <sstream>

#include "tinyxml2/tinyxml2.h"

#include "kernel/vita.h"

namespace vita
{
bool iequals(const std::string &, const std::string &);
std::string trim(const std::string &);

///
/// \return an `std::array` filled with value `v`.
///
/// This function is used to initialize array in member initialization list
/// of a constructor (so to be compliant with Effective C++).
/// To be efficient the compiler need to perform the RVO optimization / copy
/// elision.
///
/// \see <http://stackoverflow.com/q/21993780/3235496>
///
template<class T, unsigned N> std::array<T, N> make_array(T v)
{'fraction_non_alphanumeric': 0.14142335766423358, 'fraction_numerical': 0.02645985401459854, 'mean_word_length': 3.43030303030303, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3999525', 'n_tokens_mistral': 772, 'n_tokens_neox': 722, 'n_words': 258}