没有合适的资源?快使用搜索试试~ 我知道了~
haclib:提供数据类型C的实用程序库应该已经使用矢量和序列之类的东西制作,主要是作为宏
共99个文件
h:42个
c:21个
expected:17个
需积分: 5 0 下载量 24 浏览量
2021-05-18
16:22:45
上传
评论
收藏 100KB ZIP 举报
温馨提示
哈里卜 Haclib向C添加了高阶通用类型。这些类型包括向量(自动调整大小的数组),序列(链表)和树。 这些数据结构实现为标头为宏的头类型中的宏,基本类型为第一个参数,因此将为每种类型生成特定的代码,并且不会产生来自标记或空指针的开销。 请注意,由于C中的特殊性,即相同的结构类型不兼容(例如struct{int i;} a; struct{int i;} b = a;将不起作用),因此必须使用*_T_NEW(base_t)宏在宏*_T(base_t)之前设置一次typedef。 向量示例: #include <stdio> #include "hac_vec.h" int main(void){ HAC_VEC_T_NEW(int); HAC_VEC_T(int) primes = HAC_VEC_LIST(int, 2); for(int i = 2; i < 100;
资源推荐
资源详情
资源评论
收起资源包目录
haclib-master.zip (99个子文件)
haclib-master
undefs
seq.undefs 1KB
it.undefs 278B
avl.undefs 2KB
undefs.py 490B
vec.undefs 1KB
pair.undefs 192B
util.undefs 223B
obj.undefs 44B
.gitignore 155B
test.conf 41B
src
hac_it.h 2KB
hac_seq.h 6KB
hac_it
_hac_it_forward.h 2KB
_hac_seq_it.h 3KB
_hac_it_random_access.h 4KB
_hac_it_bidirectional.h 1KB
_hac_vec_it.h 3KB
hac_pair.h 2KB
hac_avl
_hac_avl_remove.h 5KB
_hac_avl_balance.h 1KB
_hac_avl_get.h 6KB
_hac_avl___postorder.h 2KB
_hac_avl_insert.h 3KB
_hac_avl_rotation_k.h 5KB
_hac_avl_rotation.h 3KB
_hac_avl_base.h 5KB
_hac_avl___inorder.h 3KB
_hac_avl_check.h 3KB
_hac_avl___traversal.h 531B
_hac_avl___preorder.h 3KB
_hac_avl___breadthfirst.h 3KB
hac_obj.h 207B
hac_vec
_hac_vec_collection.h 1KB
_hac_vec_base.h 7KB
_hac_vec_forward.h 3KB
_hac_vec_access.h 2KB
_hac_vec_functor.h 2KB
_hac_vec_sortable.h 10KB
_hac_vec_reverse.h 2KB
_hac_vec_monoid.h 5KB
hac_avl.h 3KB
hac_vec.h 5KB
hac_util.h 4KB
haclib.h 196B
hac_seq
_hac_seq_collection.h 1023B
_hac_seq_base.h 5KB
_hac_seq_forward.h 4KB
_hac_seq_reverse.h 4KB
_hac_seq_shuffle.h 2KB
_hac_seq_functor.h 3KB
_hac_seq_sortable.h 4KB
_hac_seq_monoid.h 6KB
.travis.yml 255B
makefile.template 187B
doxygen.conf 101KB
LICENSE.txt 16KB
README.md 3KB
makefile 751B
test
avl
remove
hac_avl_remove_test.c 992B
insert
hac_avl_insert_test.c 838B
traversal
postorder
hac_avl_postorder_test.c 1KB
test.expected 30B
preorder
hac_avl_preorder_test.c 1KB
test.expected 30B
inorder
test.expected 30B
hac_avl_inorder_test.c 1KB
new
hac_avl_new_test.c 282B
remove_trunk
hac_avl_remove_trunk_test.c 1KB
rotation
rotate
hac_avl_rotate_test.c 2KB
test.expected 516B
seq
filter
hac_seq_filter_test.c 892B
test.expected 24B
foldl
hac_seq_foldl_test.c 515B
test.expected 28B
reverse
test.expected 19B
hac_seq_reverse_test.c 512B
foldr
test.expected 5B
hac_seq_foldr_test.c 641B
sort
test.conf 19B
hac_seq_sort_test.c 937B
test.expected 31B
foreach
hac_seq_foreach_test.c 664B
test.expected 82B
test.py 4KB
vec
filter
hac_vec_filter_test.c 914B
test.expected 24B
foldl
hac_vec_foldl_test.c 515B
test.expected 32B
it
hac_vec_it_test.c 597B
test.expected 11B
foldr
test.expected 5B
hac_vec_foldr_test.c 641B
sort
hac_vec_sort_test.c 1KB
test.conf 19B
test.expected 301B
index_s
test.expected 15B
hac_vec_index_s_test.c 777B
foreach
hac_vec_foreach_test.c 682B
test.expected 82B
共 99 条
- 1
资源评论
蜜柚酱Lolita
- 粉丝: 28
- 资源: 4623
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功