免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: tm_wb
打印 上一主题 下一主题

[C] cstl -- c语言编写通用数据结构和常用算法库(模仿SGI STL) [复制链接]

论坛徽章:
0
61 [报告]
发表于 2009-04-27 14:44 |只看该作者
google 上搜索 “C Data Structure Library” 了一下, c 的数据结构库有这么些个

#
GDSL - The Generic Data Structures Library, a free data structures ...
7 Jul 2006 ... A free data structures manipulation library under the GNU General ... for C programmers common data structures with powerful algorithms, ...
home.gna.org/gdsl/ - 7k - Cached - Similar pages
#
c-generic-library - Google Code
A generic data structure library modeled after C++ STL. ... The generic data structure library is a bunch of data structures that are designed and created ...
code.google.com/p/c-generic-library/ - 12k - Cached - Similar pages
#
Mathtools.net : C,C++/Algorithms and Data structures
This Library includes the most extensive data structures on the market, plus three options for fast, automatic persistence. Ideal for large, complex C++ ...
www.mathtools.net/C_C__/Algorithms_and_Data_structures/index.html - 37k - Cached - Similar pages
#
SourceForge.net: Kompimi C Data Structure Library
21 Nov 2008 ... A public domain C data structure library, with an emphasis on collections. Currently includes dynamic arrays and lists. ...
sourceforge.net/projects/kompimi-cdsl/ - Similar pages
#
Wayne's Little Data Structures and Algorithms Library
1 Jan 1997 ... Wayne's Little Data Structures and Algorithms Library ... textbooks on data structures and algorithms, and I simply translated them into C. ...
www.cs.toronto.edu/~wayne/libwayne/ - 13k - Cached - Similar pages
#
Part 1: An Introduction to Data Structures
An Extensive Examination of Data Structures Using C# 2.0 ... NET Framework adds new data structures to the Base Class Library, along with new features, ...
msdn.microsoft.com/en-us/library/ms379570.aspx - 46k - Cached - Similar pages
#
Erwin Data Structure Library v2.0.278
The Erwin library is a very efficient and robust data structure template library for C and C++. No templates are used; a Perl script generates C files.
www.programmersheaven.com/download/41177/download.aspx - 38k - Cached - Similar pages

论坛徽章:
0
62 [报告]
发表于 2009-04-28 10:48 |只看该作者
程序员都是喜欢重新发明轮子的。只是cstl的licence没说明?

论坛徽章:
0
63 [报告]
发表于 2009-04-30 13:40 |只看该作者
很尊敬有奉献精神的人~!

论坛徽章:
0
64 [报告]
发表于 2009-05-01 09:31 |只看该作者
支持楼主,我也写过一个期望泛用的C数据结构库,不过远远赶不上楼主这个好( http://code.google.com/p/ravenx/),我在我的一个regex引擎和我的一个LR-PARSER的早期版本中用过
http://code.google.com/p/tokendie/
http://code.google.com/p/arsenalcomp/
到最后都不用了,因为感觉用C去做泛用的库(尤其是数据结构这类基础库),如果这个库的接口没弄好的话,导致的问题比C++的模板设计错误还麻烦的多,侵入性太强了。而且很多时候在C这个层面需要面对的问题,是不是需要泛用的数据结构还很难说,对性能真正有要求的地方通常数据结构也同样有具体要求。反过来说,大部分没要求的地方,可能简简单单的一个数组,甚至就定义一个#define MAX_NUM ....  xxx zzz[MAX_NUM]就足够了(这类东西是我所见过的C工程里用的最多的),因为局部的简单问题在需求以及性能上是可以预先知道的,真正要改的话把子模块重写一遍就OK了,泛化反而会引来维护问题。

还有就是看见有人说楼主重复发明轮子什么的,其实以我不算丰富的编程经验来看,重复发明轮子通常有两个好处,最直接的是学习经验,第二个就是针对某个特定的问题,写一个不那么好但是够用的工具通常比直接引入一个优雅,高效但是庞大复杂的库进来在后期维护以及修改上要快的多得多,而且整体开发速度也要快很多。(当然我这里主要指的是核心功能),因为别人实现的工具针对你特定的问题永远有些不那么合适的地方,这时候修正起来要繁琐的多,而且过程通常很痛苦,程序这东西还远远没进化到只关注接口而完全忽略实现那个高度。

PS:这里仅仅是说点体会,俺也是个新手,虽然不喜欢泛化但还是相当支持并期待LZ让它更加泛用的!

论坛徽章:
0
65 [报告]
发表于 2009-05-06 12:37 |只看该作者
very good!

强烈建议楼主发布到souceforge或提交给GNU组织!!!!!!!!!!!!!!!!!!!!!!!

论坛徽章:
0
66 [报告]
发表于 2009-05-11 19:04 |只看该作者

回复 #1 tm_wb 的帖子

不能下了吗

论坛徽章:
0
67 [报告]
发表于 2009-05-12 01:26 |只看该作者
可否借鉴下bsd内的 sys/ queue.h,  tree.h ? 可以在很多开源代码里发现他的影子, 里面有多种链表/队列 /splay/rbtree结构及基本操作宏(函数)

[ 本帖最后由 bittertea 于 2009-5-12 01:33 编辑 ]

论坛徽章:
0
68 [报告]
发表于 2009-09-21 11:50 |只看该作者
谢谢了?这可是俺第一次回复哦

论坛徽章:
1
CU十二周年纪念徽章
日期:2013-10-24 15:41:34
69 [报告]
发表于 2009-11-05 13:27 |只看该作者
之前不是有一个tstl2cl库吗?

论坛徽章:
0
70 [报告]
发表于 2010-12-03 15:41 |只看该作者
直接用C++STL不就行了吗?
“不要重复发明轮子”
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP