<commit_before>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>
// =============================================================================
//
// Implementation of 1-D piece-wise cubic spline curves.
//
// =============================================================================

#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>

#include "chrono/core/ChCubicSpline.h"
#include "chrono/core/ChMatrixDynamic.h"

namespace chrono {

ChCubicSpline::ChCubicSpline(const std::vector<double>& t, const std::vector<double>& y)
    : m_t(t), m_y(y), m_left_bc_type(DEFAULT_BC), m_right_bc_type(DEFAULT_BC), m_process(true) {
    int n = (int)t.size();
    assert(n >= 2);
    assert(n == y.size());
    assert(std : is_sorted(t.begin(), t.end()));
    m_ypp.resize(n);
}

void ChCubicSpline::SetLeftBC(BCType type, double val) {
    m_left_bc_type = type;
    m_left_bc = val;
    m_process = true;
}

void ChCubicSpline::SetRightBC(BCType type, double val) {
    m_right_bc_type = type;
    m_right_bc = val;
    m_process = true;
}

void ChCubicSpline::Process() {
    int n = (int)m_t.size();
<commit_msg>Fix typo in assert<commit_after>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: <NAME>
// =============================================================================
//
// Implementation of 1-D piece-wise cubic spline curves.
//
// =============================================================================

#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>

#include "chrono/core/ChCubicSpline.h"
#include "chrono/core/ChMatrixDynamic.h"

namespace chrono {

ChCubicSpline::ChCubicSpline(const std::vector<double>& t, const std::vector<double>& y)
    : m_t(t), m_y(y), m_left_bc_type(DEFAULT_BC), m_right_bc_type(DEFAULT_BC), m_process(true) {
    int n = (int)t.size();
    assert(n >= 2);
    assert(n == y.size());
    assert(std::is_sorted(t.begin(), t.end()));
    m_ypp.resize(n);
}

void ChCubicSpline::SetLeftBC(BCType type, double val) {
    m_left_bc_type = type;
    m_left_bc = val;
    m_process = true;
}

void ChCubicSpline::SetRightBC(BCType type, double val) {
    m_right_bc_type = type;
    m_right_bc = val;
    m_process = true;
}

void ChCubicSpline::Process() {
    int n = (int)m_t.size();

{'fraction_non_alphanumeric': 0.3162042875157629, 'fraction_numerical': 0.0037831021437578815, 'mean_word_length': 4.7481884057971016, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '7038298', 'n_tokens_mistral': 1037, 'n_tokens_neox': 978, 'n_words': 226}