<commit_before>#ifndef BVH_H
#define BVH_H

#include "joint.h"

#include <memory>
#include <vector>

namespace bvh {

class Bvh {
  public:
    Bvh() : num_frames_(0), frame_time_(0), num_channels_(0) {}

    /**
     * Recalculation of local transformation matrix for each frame in each joint
     *
     * Should be called to set local_transformation_matrix vectors in joints
     * structures.
     *
     * @param [in] start_joint  A joint of which each child local transformation
     * matrix will be recalculated, as default it is NULL which will be resolved
     * to root_joint in method body
     */
    void recalculate_joints_ltm(std::shared_ptr<Joint> start_joint = NULL);

    void add_joint(const std::shared_ptr<Joint> joint) {
      joints_.push_back(joint);
      num_channels_ += joint->num_channels();
    }

    const Joint* root_joint() const { return root_joint_.get(); }

    const std::vector <std::shared_ptr <Joint>> joints() const {
      return joints_;
    }

    unsigned num_frames() const { return num_frames_; }

    double frame_time() const { return frame_time_; }

    unsigned num_channels() const { return num_channels_; }

    void set_root_joint(const std::shared_ptr<Joint> arg) { root_joint_ = arg; }

    void set_joints(const std::vector <std::shared_ptr <Joint>> arg) {
      joints_ = arg;
    }

    void set_num_frames(const unsigned arg) { num_frames_ = arg; }

    void set_frame_time(const double arg) { frame_time_ = arg; }

  private:
    /** A root joint in this bvh file */
    std::shared_ptr<Joint> root_joint_;
    /** All joints in file in order of parse */<commit_msg>Change root joint getter function.<commit_after>#ifndef BVH_H
#define BVH_H

#include "joint.h"

#include <memory>
#include <vector>

namespace bvh {

class Bvh {
  public:
    Bvh() : num_frames_(0), frame_time_(0), num_channels_(0) {}

    /**
     * Recalculation of local transformation matrix for each frame in each joint
     *
     * Should be called to set local_transformation_matrix vectors in joints
     * structures.
     *
     * @param [in] start_joint  A joint of which each child local transformation
     * matrix will be recalculated, as default it is NULL which will be resolved
     * to root_joint in method body
     */
    void recalculate_joints_ltm(std::shared_ptr<Joint> start_joint = NULL);

    void add_joint(const std::shared_ptr<Joint> joint) {
      joints_.push_back(joint);
      num_channels_ += joint->num_channels();
    }

    const std::shared_ptr<Joint> root_joint() const { return root_joint_; }

    const std::vector <std::shared_ptr <Joint>> joints() const {
      return joints_;
    }

    unsigned num_frames() const { return num_frames_; }

    double frame_time() const { return frame_time_; }

    unsigned num_channels() const { return num_channels_; }

    void set_root_joint(const std::shared_ptr<Joint> arg) { root_joint_ = arg; }

    void set_joints(const std::vector <std::shared_ptr <Joint>> arg) {
      joints_ = arg;
    }

    void set_num_frames(const unsigned arg) { num_frames_ = arg; }

    void set_frame_time(const double arg) { frame_time_ = arg; }

  private:
    /** A root joint in this bvh file */
    std::shared_ptr<Joint> root_joint_;
    /** All joints in file in order of parse */
{'fraction_non_alphanumeric': 0.10063849194283978, 'fraction_numerical': 0.0018242626938279112, 'mean_word_length': 3.3808255659121174, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 26, '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': '564787', 'n_tokens_mistral': 1066, 'n_tokens_neox': 999, 'n_words': 310}