#pragma once
#include <Eigen/Dense>
#include <Eigen/Geometry>
class Rod2dMulti {
   public:
    explicit Rod2dMulti(double length, size_t num_particles);

    [[nodiscard]] const Eigen::Matrix2d &getDiff() const;

    [[nodiscard]] double getDRot() const;

    [[nodiscard]] const Eigen::Vector2d &getPos(size_t pos) const;

    void setPos(const Eigen::Vector2d &Pos, size_t pos);

    [[nodiscard]] const Eigen::Matrix2d &getDiff_Sqrt() const;

    [[nodiscard]] const Eigen::Vector2d &getE(size_t pos) const;

    void setE(const Eigen::Vector2d &mE, size_t pos);

    [[nodiscard]] double getDRot_Sqrt() const;
    [[nodiscard]] size_t num_parts()const;
   private:
    Eigen::Matrix2d m_Diff;
    Eigen::Matrix2d m_Diff_sqrt;
    double m_D_rot;
    double m_D_rot_sqrt;
    std::vector<Eigen::Vector2d> m_pos;  // position
    std::vector<Eigen::Vector2d> m_e;
};
