Skip to content

Commit

Permalink
Fix spelling error in libroom_src
Browse files Browse the repository at this point in the history
  • Loading branch information
ehabets committed Nov 11, 2024
1 parent 5564c7b commit 91d2579
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions deism/libroom_src/libroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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_<Wall_deism<3>::Isect>(wall_cls, "Isect_deism")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions deism/libroom_src/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ Room_deism<D>::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();
}
Expand All @@ -153,12 +153,12 @@ Room_deism<D>::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)
{
Expand Down
14 changes: 7 additions & 7 deletions deism/libroom_src/room.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Eigen::Matrix<float,D,D>> reflection_matrix;
/* */
Expand Down Expand Up @@ -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<Wall_deism<D>> &_walls,
Expand All @@ -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
Expand All @@ -250,7 +250,7 @@ class Room_deism
float _mic_radius,
float _mic_hist_res,
bool _is_hybrid_sim,
float _impedence
float _impedance
);
/**************************************************************************/

Expand Down Expand Up @@ -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;
Expand All @@ -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<D>& old_is,
Expand Down
12 changes: 6 additions & 6 deletions deism/libroom_src/wall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void Wall_deism<D>::init()
}
}

// original constructor without centroid and impedence
// original constructor without centroid and impedance
template<>
Wall_deism<2>::Wall_deism(
const Eigen::Matrix<float,2,Eigen::Dynamic> &_corners,
Expand Down Expand Up @@ -237,14 +237,14 @@ template<>
Wall_deism<2>::Wall_deism(
const Eigen::Matrix<float,2,Eigen::Dynamic> &_corners,
const Eigen::Matrix<float,2,1>& _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;
}
/******************************************************************************/

Expand Down Expand Up @@ -380,13 +380,13 @@ template<>
Wall_deism<3>::Wall_deism(
const Eigen::Matrix<float,3,Eigen::Dynamic> &_corners,
const Eigen::Matrix<float,3,1>& _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;
}
/******************************************************************************/

Expand Down Expand Up @@ -590,7 +590,7 @@ float Wall_deism<D>::cosine_angle(
// area for new member functions
template<size_t D>
float Wall_deism<D>::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);
};

/**************************************************************************/
Expand Down
6 changes: 3 additions & 3 deletions deism/libroom_src/wall.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Wall_deism

/**************************************************************************/
// area for new parameters
float impedence; //-->new
float impedance; //-->new

/**************************************************************************/

Expand Down Expand Up @@ -127,7 +127,7 @@ class Wall_deism
Wall_deism(
const Eigen::Matrix<float, D, Eigen::Dynamic> &_corners,
const Eigen::Matrix<float,D,1>& _centroid, //-->new
float _impedence,
float _impedance,
const Eigen::ArrayXf &_absorption,
const Eigen::ArrayXf &_scatter,
const std::string &_name
Expand All @@ -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)
{}

Expand Down

0 comments on commit 91d2579

Please sign in to comment.