An open API service indexing awesome lists of open source software.

https://github.com/panagiotiskotsorgios/cdsx.h

The Official C DataTypes Extended Library ==== CROSS PLATFORM LIBRARY ====
https://github.com/panagiotiskotsorgios/cdsx.h

algorithms algorithms-and-data-structures c custom-datatypes custom-library data-structures data-types dynamic-memory-allocation examples free-to-use functional-programming header-files include library low-level low-level-programming memory-management open-source pointers team-repo

Last synced: about 1 month ago
JSON representation

The Official C DataTypes Extended Library ==== CROSS PLATFORM LIBRARY ====

Awesome Lists containing this project

README

        

> 🚩 Warning, the library is not yet complete, it has errors in the code ubt the version 0.0.2 will fix them.

# CDSX.H - `C Data Structures eXtended Library`

`CDSX.H` is an open-source library designed to bring advanced data structures and utilities to the C programming language. By extending the capabilities of C with custom implementations,
`CDSX.H` simplifies and enhances data handling in your applications.

---

## Features

- **`Dynamic Arrays`**: Resizeable arrays with built-in utility functions.
- **`Hash Maps`**: Efficient key-value pair storage.
- **`Tuples`**: Combine multiple values of different types.
- **`BitSet`**: Compact storage and manipulation of binary data.
- **`Matrix Operations`**: Support for creating and manipulating 2D matrices.
- **`Optionals`**: Safely handle nullable or missing values.
- **`MetaArray`**: Our Teams custom data type (no other language has it)
- And much more!

---

## Why Use CDSX.H?

`C`, while powerful, lacks many modern data structures that are common in higher-level languages. `**CDSX.H**` aims to fill this gap by providing:

- High-performance implementations tailored for C.
- Open-source flexibility for extension and customization.
- Allowing higher level like fucntionlities

---

## Getting Started

### Installation

`1. Clone the repository:`


git clone https://github.com/PanagiotisKots/cdsx.h

`2. Link the Static Library in Your Project.`

- Use `#include` to include the relevant headers in the src file:

ex. #include "arraylist.h"

`3. Compile and Run.`

ex. gcc -I../include/headers main.c ../src/utils/file_you_need.c -o name_of_the_exe

- **Dynamic Array**

```c
#include "dynamic_array.h" // Include the header file for the CDSX library

int main() {
// Create a new dynamic array
DynamicArray *arr = dynamic_array_create();

// Append values to the dynamic array
dynamic_array_append(arr, 42);
dynamic_array_append(arr, 84);

// Retrieve and print the value at index 0
printf("Value at index 0: %d\n", dynamic_array_get(arr, 0));

// Free the allocated memory for the dynamic array
dynamic_array_free(arr);

return 0;
}

```

### `Folder Structure`

- `build/`: Compiled source files(.o format).
- `docs/`: Documentation for the library.
- `examples/`: Example programs demonstrating library usage.

- `extended_docs/`: Extedned (analytic) documentations.
- `extended_guides/`: User - Developer analytic guides.
- `include/`: Header files.

- `metaArray/`: Includes, src for the metaArray structure.
- `src/`: Source code for the library.
- `tests/`: Unit tests for verifying functionality.

- `threading/`: Includes, src for the threading functionality.

### `Contribution`

- We welcome contributions! To get started:

> Fork the repository and create a feature branch.

> Write your changes and add tests if applicable.

> Open a pull request with a detailed description of your changes.

### Please see `CONTRIBUTING.md` for more details.

### `License`

This project is licensed under the `MIT License`. See LICENSE.md for more details.