首页    期刊浏览 2024年11月30日 星期六
登录注册

文章基本信息

  • 标题:The interface for functions in the dune-functions module
  • 本地全文:下载
  • 作者:Christian Engwer ; Carsten Gräser ; Steffen Müthing
  • 期刊名称:Archive of Numerical Software
  • 印刷版ISSN:2197-8263
  • 出版年度:2017
  • 卷号:5
  • 期号:1
  • 页码:95-109
  • 语种:English
  • 出版社:Archive of Numerical Software
  • 摘要:The dune-functions Dune module introduces a new programmer interface for discrete and non-discrete functions. Unlike the previous interfaces considered in the existing Dune modules, it is based on overloading operator(), and returning values by-value. This makes user code much more readable, and allows the incorporation of newer C++ features such as lambda expressions. Run-time polymorphism is implemented not by inheritance, but by type erasure, generalizing the ideas of the std::function class from the C++11 standard library. We describe the new interface, show its possibilities, and measure the performance impact of type erasure and return-by-value.
  • 关键词:dune;dune-functions;functions;type erasure;return-by-value;duck typing
国家哲学社会科学文献中心版权所有