dune-functions模块中函数的接口
The interface for functions in the dune-functions module
摘要:
dune模块为离散和非离散函数引入了一个新的编程接口。与现有dune模块中考虑的以前的接口不同,它基于重载operator(),并按值返回值。这使得用户代码更具可读性,并允许合并较新的C++功能,如lambda表达式。运行时多态性不是通过继承实现的,而是通过类型擦除实现的,这概括了C++11标准库中std::function类的思想。我们描述了新的接口,显示其可能性,并测量类型擦除和按值返回的性能影响。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。