C ++中的功能数据结构 [英] Functional data structures in C++

查看:333
本文介绍了C ++中的功能数据结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道一个C ++数据结构库,提供功能(在FP意义上是不可变的或持久的)熟悉的STL结构的等价物?



功能我的意思是对象本身是不可变的,而对这些对象的修改会返回与父对象共享相同内部的新对象。



理想情况下,图书馆将类似于STL,并且可以与Boost.Phoenix(注意事项 - 我并没有真正使用Phoenix,但据我所知,它提供了许多算法但没有数据结构,除非对现有数据进行了延迟计算的更改结构计数 - 是吗?)

解决方案

我会看看是否 FC ++ 包括任何数据结构。当然,这个项目比其他任何一个都是关于在C ++中支持功能性风格。


Does anyone know of a C++ data structure library providing functional (a.k.a. immutable, or "persistent" in the FP sense) equivalents of the familiar STL structures?

By "functional" I mean that the objects themselves are immutable, while modifications to those objects return new objects sharing the same internals as the parent object where appropriate.

Ideally, such a library would resemble STL, and would work well with Boost.Phoenix (caveat- I haven't actually used Phoenix, but as far as I can tell it provides many algorithms but no data structures, unless a lazily-computed change to an existing data structure counts - does it?)

解决方案

I would look and see whether FC++ developed by Yannis Smaragdakis includes any data structures. Certainly this project more than any other is about supporting a functional style in C++.

这篇关于C ++中的功能数据结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆