Loading src/libnptm/Configuration.cpp +37 −14 Original line number Diff line number Diff line Loading @@ -1111,16 +1111,29 @@ void ScattererConfiguration::write_formatted(string file_name) { } bool ScattererConfiguration::operator ==(ScattererConfiguration &other) { if (reference_variable_name.compare(other.reference_variable_name) != 0) return false; if (number_of_spheres != other.number_of_spheres) return false; if (number_of_scales != other.number_of_scales) return false; if (idfc != other.idfc) return false; if (exdc != other.exdc) return false; if (wp != other.wp) return false; if (xip != other.xip) return false; if (use_external_sphere != other.use_external_sphere) return false; if (number_of_spheres != other.number_of_spheres) { return false; } if (number_of_scales != other.number_of_scales) { return false; } if (idfc != other.idfc) { return false; } if (exdc != other.exdc) { return false; } if (wp != other.wp) { return false; } if (xip != other.xip) { return false; } //if (use_external_sphere != other.use_external_sphere) return false; for (int svi = 0; svi < number_of_scales; svi++) if (scale_vec[svi] != other.scale_vec[svi]) return false; if (scale_vec[svi] != other.scale_vec[svi]) { return false; } int dj_index = 0; for (int dj = 0; dj < number_of_spheres; dj++) { bool check_matrixes = false; Loading @@ -1128,15 +1141,25 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) { dj_index = iog_vec[dj] - 1; check_matrixes = true; } if (iog_vec[dj] != other.iog_vec[dj]) return false; if (radii_of_spheres[dj_index] != other.radii_of_spheres[dj_index]) return false; if (iog_vec[dj] != other.iog_vec[dj]) { return false; } if (radii_of_spheres[dj_index] != other.radii_of_spheres[dj_index]) { return false; } int layers = nshl_vec[dj_index]; if (layers != other.nshl_vec[dj_index]) return false; if (layers != other.nshl_vec[dj_index]) { return false; } if (check_matrixes) { for (int di = 0; di < layers; di++) { if (rcf[dj_index][di] != other.rcf[dj_index][di]) return false; if (rcf[dj_index][di] != other.rcf[dj_index][di]) { return false; } for (int dk = 0; dk < number_of_scales; dk++) { if (dc0_matrix[di][dj_index][dk] != other.dc0_matrix[di][dj_index][dk]) return false; if (dc0_matrix[di][dj_index][dk] != other.dc0_matrix[di][dj_index][dk]) { return false; } } // dk loop } // di loop } Loading Loading
src/libnptm/Configuration.cpp +37 −14 Original line number Diff line number Diff line Loading @@ -1111,16 +1111,29 @@ void ScattererConfiguration::write_formatted(string file_name) { } bool ScattererConfiguration::operator ==(ScattererConfiguration &other) { if (reference_variable_name.compare(other.reference_variable_name) != 0) return false; if (number_of_spheres != other.number_of_spheres) return false; if (number_of_scales != other.number_of_scales) return false; if (idfc != other.idfc) return false; if (exdc != other.exdc) return false; if (wp != other.wp) return false; if (xip != other.xip) return false; if (use_external_sphere != other.use_external_sphere) return false; if (number_of_spheres != other.number_of_spheres) { return false; } if (number_of_scales != other.number_of_scales) { return false; } if (idfc != other.idfc) { return false; } if (exdc != other.exdc) { return false; } if (wp != other.wp) { return false; } if (xip != other.xip) { return false; } //if (use_external_sphere != other.use_external_sphere) return false; for (int svi = 0; svi < number_of_scales; svi++) if (scale_vec[svi] != other.scale_vec[svi]) return false; if (scale_vec[svi] != other.scale_vec[svi]) { return false; } int dj_index = 0; for (int dj = 0; dj < number_of_spheres; dj++) { bool check_matrixes = false; Loading @@ -1128,15 +1141,25 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) { dj_index = iog_vec[dj] - 1; check_matrixes = true; } if (iog_vec[dj] != other.iog_vec[dj]) return false; if (radii_of_spheres[dj_index] != other.radii_of_spheres[dj_index]) return false; if (iog_vec[dj] != other.iog_vec[dj]) { return false; } if (radii_of_spheres[dj_index] != other.radii_of_spheres[dj_index]) { return false; } int layers = nshl_vec[dj_index]; if (layers != other.nshl_vec[dj_index]) return false; if (layers != other.nshl_vec[dj_index]) { return false; } if (check_matrixes) { for (int di = 0; di < layers; di++) { if (rcf[dj_index][di] != other.rcf[dj_index][di]) return false; if (rcf[dj_index][di] != other.rcf[dj_index][di]) { return false; } for (int dk = 0; dk < number_of_scales; dk++) { if (dc0_matrix[di][dj_index][dk] != other.dc0_matrix[di][dj_index][dk]) return false; if (dc0_matrix[di][dj_index][dk] != other.dc0_matrix[di][dj_index][dk]) { return false; } } // dk loop } // di loop } Loading