From 91d25794fa68c56d396006240b7010bc9c579b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanu=C3=ABl=20Habets?= Date: Mon, 11 Nov 2024 08:54:28 +0100 Subject: [PATCH] Fix spelling error in libroom_src --- deism/libroom_src/libroom.cpp | 12 ++++++------ deism/libroom_src/room.cpp | 8 ++++---- deism/libroom_src/room.hpp | 14 +++++++------- deism/libroom_src/wall.cpp | 12 ++++++------ deism/libroom_src/wall.hpp | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/deism/libroom_src/libroom.cpp b/deism/libroom_src/libroom.cpp index c2bb5a0..27b7777 100644 --- a/deism/libroom_src/libroom.cpp +++ b/deism/libroom_src/libroom.cpp @@ -123,7 +123,7 @@ PYBIND11_MODULE(libroom_deism, m) { .def_readonly("obstructing_walls", &Room_deism<3>::obstructing_walls) .def_readonly("microphones", &Room_deism<3>::microphones) .def_readonly("max_dist", &Room_deism<3>::max_dist) - .def_readonly("impedence",&Room_deism<3>::impedence) //--> new + .def_readonly("impedance",&Room_deism<3>::impedance) //--> new .def_readonly("reflection_matrix",&Room_deism<3>::reflection_matrix) //--> new .def_readwrite("n_bands",&Room_deism<3>::n_bands); //--> new @@ -194,7 +194,7 @@ PYBIND11_MODULE(libroom_deism, m) { .def_readonly("obstructing_walls", &Room_deism<2>::obstructing_walls) .def_readonly("microphones", &Room_deism<2>::microphones) .def_readonly("max_dist", &Room_deism<2>::max_dist) - .def_readonly("impedence",&Room_deism<2>::impedence) //--> new + .def_readonly("impedance",&Room_deism<2>::impedance) //--> new .def_readonly("reflection_matrix",&Room_deism<2>::reflection_matrix) //--> new .def_readwrite("n_bands",&Room_deism<2>::n_bands); //--> new @@ -213,7 +213,7 @@ PYBIND11_MODULE(libroom_deism, m) { float&, const Eigen::ArrayXf &, const Eigen::ArrayXf &, const std::string &>(), - py::arg("corners"),py::arg("centroid"), py::arg("impedence"), + py::arg("corners"),py::arg("centroid"), py::arg("impedance"), py::arg("absorption") = Eigen::ArrayXf::Zero(1), py::arg("scattering") = Eigen::ArrayXf::Zero(1), py::arg("name") = "") //--> new @@ -242,7 +242,7 @@ PYBIND11_MODULE(libroom_deism, m) { .def_readonly("basis", &Wall_deism<3>::basis) .def_readonly("flat_corners", &Wall_deism<3>::flat_corners) .def_readonly("reflection_matrix", &Wall_deism<3>::reflection_matrix) //tan new - .def_readonly("impedence", &Wall_deism<3>::impedence) //tan new + .def_readonly("impedance", &Wall_deism<3>::impedance) //tan new .def_readonly("centroid", &Wall_deism<3>::centroid); //-->new py::enum_::Isect>(wall_cls, "Isect_deism") @@ -270,7 +270,7 @@ PYBIND11_MODULE(libroom_deism, m) { const Eigen::ArrayXf &, const std::string & >(), - py::arg("corners"),py::arg("centroid"), py::arg("impedence"), + py::arg("corners"),py::arg("centroid"), py::arg("impedance"), py::arg("absorption") = Eigen::ArrayXf::Zero(1), py::arg("scattering") = Eigen::ArrayXf::Zero(1), py::arg("name") = "") //--> new @@ -299,7 +299,7 @@ PYBIND11_MODULE(libroom_deism, m) { .def_readonly("basis", &Wall_deism<2>::basis) .def_readonly("flat_corners", &Wall_deism<2>::flat_corners) .def_readonly("reflection_matrix", &Wall_deism<2>::reflection_matrix) //--> new - .def_readonly("impedence", &Wall_deism<2>::impedence) //--> new + .def_readonly("impedance", &Wall_deism<2>::impedance) //--> new .def_readonly("centroid", &Wall_deism<2>::centroid); //--> new // The different wall intersection cases diff --git a/deism/libroom_src/room.cpp b/deism/libroom_src/room.cpp index 858cd9d..3a2457e 100644 --- a/deism/libroom_src/room.cpp +++ b/deism/libroom_src/room.cpp @@ -127,13 +127,13 @@ Room_deism::Room_deism( float _mic_radius, float _mic_hist_res, bool _is_hybrid_sim, - float _impedence + float _impedance ) : walls(_walls), obstructing_walls(_obstructing_walls), microphones(_microphones), sound_speed(_sound_speed), ism_order(_ism_order), energy_thres(_energy_thres), time_thres(_time_thres), mic_radius(_mic_radius), mic_radius_sq(_mic_radius * _mic_radius), - mic_hist_res(_mic_hist_res), is_hybrid_sim(_is_hybrid_sim),impedence(_impedence),is_shoebox(false) + mic_hist_res(_mic_hist_res), is_hybrid_sim(_is_hybrid_sim),impedance(_impedance),is_shoebox(false) { init(); } @@ -153,12 +153,12 @@ Room_deism::Room_deism( float _mic_radius, float _mic_hist_res, bool _is_hybrid_sim, - float _impedence + float _impedance ) : microphones(_microphones), sound_speed(_sound_speed), ism_order(_ism_order), energy_thres(_energy_thres), time_thres(_time_thres), mic_radius(_mic_radius), mic_radius_sq(_mic_radius * _mic_radius), - mic_hist_res(_mic_hist_res), is_hybrid_sim(_is_hybrid_sim),impedence(_impedence), + mic_hist_res(_mic_hist_res), is_hybrid_sim(_is_hybrid_sim),impedance(_impedance), is_shoebox(true), shoebox_size(_room_size), shoebox_absorption(_absorption), shoebox_scattering(_scattering) { diff --git a/deism/libroom_src/room.hpp b/deism/libroom_src/room.hpp index 3f74621..7d333d6 100644 --- a/deism/libroom_src/room.hpp +++ b/deism/libroom_src/room.hpp @@ -171,9 +171,9 @@ class Room_deism /*20240705*/ /**************************************************************************/ /* */ - // impedence is a ndarray value, each value correspondes to a wall, its value + // impedance is a ndarray value, each value correspondes to a wall, its value // type is complex, like[], but now is only a integer number - float impedence; // set initial value of impedence + float impedance; // set initial value of impedance // the last dimension of reflection matrix is dynamic, which depends on running std::vector> reflection_matrix; /* */ @@ -217,7 +217,7 @@ class Room_deism /**************************************************************************/ - // new constructor after increasing impedence variable + // new constructor after increasing impedance variable // Constructor for general rooms Room_deism( const std::vector> &_walls, @@ -232,7 +232,7 @@ class Room_deism float _mic_radius, float _mic_hist_res, bool _is_hybrid_sim, - float _impedence + float _impedance ); // Constructor for shoebox rooms @@ -250,7 +250,7 @@ class Room_deism float _mic_radius, float _mic_hist_res, bool _is_hybrid_sim, - float _impedence + float _impedance ); /**************************************************************************/ @@ -296,7 +296,7 @@ class Room_deism float _mic_radius, float _mic_hist_res, bool _is_hybrid_sim, - float _impedence + float _impedance ) { sound_speed = _sound_speed; @@ -307,7 +307,7 @@ class Room_deism mic_radius_sq = _mic_radius * _mic_radius; mic_hist_res = _mic_hist_res; is_hybrid_sim = _is_hybrid_sim; - impedence=_impedence; + impedance=_impedance; } Eigen::ArrayXf get_image_attenuation(ImageSource& old_is, diff --git a/deism/libroom_src/wall.cpp b/deism/libroom_src/wall.cpp index 751451a..5a939a9 100644 --- a/deism/libroom_src/wall.cpp +++ b/deism/libroom_src/wall.cpp @@ -166,7 +166,7 @@ void Wall_deism::init() } } -// original constructor without centroid and impedence +// original constructor without centroid and impedance template<> Wall_deism<2>::Wall_deism( const Eigen::Matrix &_corners, @@ -237,14 +237,14 @@ template<> Wall_deism<2>::Wall_deism( const Eigen::Matrix &_corners, const Eigen::Matrix& _centroid, - float _impedence, + float _impedance, const Eigen::ArrayXf &_absorption, const Eigen::ArrayXf &_scatter, const std::string &_name ) : Wall_deism<2>::Wall_deism(_corners,_centroid,_absorption,_scatter,_name) { - impedence=_impedence; + impedance=_impedance; } /******************************************************************************/ @@ -380,13 +380,13 @@ template<> Wall_deism<3>::Wall_deism( const Eigen::Matrix &_corners, const Eigen::Matrix& _centroid, - float _impedence, + float _impedance, const Eigen::ArrayXf &_absorption, const Eigen::ArrayXf &_scatter, const std::string &_name ):Wall_deism<3>::Wall_deism(_corners,_centroid,_absorption,_scatter,_name) { - impedence=_impedence; + impedance=_impedance; } /******************************************************************************/ @@ -590,7 +590,7 @@ float Wall_deism::cosine_angle( // area for new member functions template float Wall_deism::get_attenuation(float theta) const { - return (this->impedence*cos(theta)-1)/(this->impedence*cos(theta)+1); + return (this->impedance*cos(theta)-1)/(this->impedance*cos(theta)+1); }; /**************************************************************************/ diff --git a/deism/libroom_src/wall.hpp b/deism/libroom_src/wall.hpp index 3128d77..2929e02 100644 --- a/deism/libroom_src/wall.hpp +++ b/deism/libroom_src/wall.hpp @@ -88,7 +88,7 @@ class Wall_deism /**************************************************************************/ // area for new parameters - float impedence; //-->new + float impedance; //-->new /**************************************************************************/ @@ -127,7 +127,7 @@ class Wall_deism Wall_deism( const Eigen::Matrix &_corners, const Eigen::Matrix& _centroid, //-->new - float _impedence, + float _impedance, const Eigen::ArrayXf &_absorption, const Eigen::ArrayXf &_scatter, const std::string &_name @@ -141,7 +141,7 @@ class Wall_deism transmission(w.transmission), energy_reflection(w.energy_reflection), normal(w.normal), corners(w.corners), origin(w.origin), basis(w.basis), flat_corners(w.flat_corners), - impedence(w.impedence),reflection_matrix(w.reflection_matrix), + impedance(w.impedance),reflection_matrix(w.reflection_matrix), centroid(w.centroid) {}