Giter Site home page Giter Site logo

cgen's Introduction

cgen

Thư viện cgen hiện đang bao gồm tập macro để sinh các cấu trúc lưu trữ thông dụng như vec-tơ, ánh xạ khóa-giá trị dựa trên cây đỏ-đen, và danh sách móc nối đơn.

Bên cạnh đó thư viện cũng cung cấp các triển khai khái quát của các giải thuật thông dụng dựa trên mảng như sắp xếp nhanh, tìm kiếm nhị phân, v.v..

Trong tương lai gần nhất dự kiến sẽ bổ xung thêm bảng băm, và xa hơn có thể là những thành phần hữu ích khác nữa.

Tất cả mã nguồn cần thiết đã được đóng gói trong 1 tệp tiêu đề cgen.h trong thư mục all. Để sử dụng chỉ cần chèn vào đơn vị biên dịch, ví dụ đơn giản nhất:

#include "cgen.h"

Ví dụ tạo ánh xạ char * => int:

TDECL_IMPL(simap, char *, int, si);

Khởi tạo đối tượng:

struct simap *si = simap(cmps);

Thêm cặp khóa-giá trị:

siput(si, "abc", 10);

...

Tham khảo các ví dụ trong thư mục tests/cgen.

cgen's People

Contributors

bangoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.