不完美C++:实践检验的编程策略

3星 · 超过75%的资源 需积分: 10 2 下载量 28 浏览量 更新于2024-07-27 收藏 606KB PDF 举报
《Imperfect C++ 中文版-2009》是由 Matthew Wilson 著作,刘未鹏翻译的一本关于C++编程的实用指南。这本书强调了C++虽然是一门杰出的语言,支持高级概念如接口设计、泛型、多态和元编程,但同时也并非完美,存在一些缺陷和局限性。作者提出了“不完美主义实践者”的四个基本原则:C++虽卓越但不完美;提倡在编程中采用适度的“苦行衣”原则,即在追求效率的同时注重代码的简洁性和可维护性;利用编译器的优势,将其作为开发工具的一部分;面对挑战时,持之以恒地寻找解决问题的方法。 书中指出,C++并非在所有领域都是最佳选择,比如在专家系统开发中,Prolog更适合,而在系统脚本方面,Python和Ruby更占优势。C++的缺陷部分源自其历史和设计上的折衷,包括从前辈语言继承的问题,以及为了追求效率而做出的妥协。随着语言的复杂性和多样性增加,这些问题更加显著。 作者特别强调,理解并接受C++的不完美性对于现实世界的编程至关重要。书中可能会深入探讨如何在实践中巧妙地运用C++的优点,同时规避或解决其存在的问题,以实现更安全、实际的编程解决方案。读者可以从这本书中学习到如何成为一名更有效率、更灵活的C++开发者,即使面对语言的不足,也能找到适应和改进的方法。

Please revise the paper:Accurate determination of bathymetric data in the shallow water zone over time and space is of increasing significance for navigation safety, monitoring of sea-level uplift, coastal areas management, and marine transportation. Satellite-derived bathymetry (SDB) is widely accepted as an effective alternative to conventional acoustics measurements over coastal areas with high spatial and temporal resolution combined with extensive repetitive coverage. Numerous empirical SDB approaches in previous works are unsuitable for precision bathymetry mapping in various scenarios, owing to the assumption of homogeneous bottom over the whole region, as well as the limitations of constructing global mapping relationships between water depth and blue-green reflectance takes no account of various confounding factors of radiance attenuation such as turbidity. To address the assumption failure of uniform bottom conditions and imperfect consideration of influence factors on the performance of the SDB model, this work proposes a bottom-type adaptive-based SDB approach (BA-SDB) to obtain accurate depth estimation over different sediments. The bottom type can be adaptively segmented by clustering based on bottom reflectance. For each sediment category, a PSO-LightGBM algorithm for depth derivation considering multiple influencing factors is driven to adaptively select the optimal influence factors and model parameters simultaneously. Water turbidity features beyond the traditional impact factors are incorporated in these regression models. Compared with log-ratio, multi-band and classical machine learning methods, the new approach produced the most accurate results with RMSE value is 0.85 m, in terms of different sediments and water depths combined with in-situ observations of airborne laser bathymetry and multi-beam echo sounder.

2023-02-18 上传