Instructions to use ReasoningKingdom/LITOperator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use ReasoningKingdom/LITOperator with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download lit_operator/dense.h from ReasoningKingdom/LITOperator: direct link, hf CLI and curl.
- Browser
- Download file 2.05 kB
-
https://huggingface.co/ReasoningKingdom/LITOperator/resolve/main/lit_operator/dense.h
- Command line
-
hf download hf://ReasoningKingdom/LITOperator/lit_operator/dense.h
-
curl -L -o dense.h https://huggingface.co/ReasoningKingdom/LITOperator/resolve/main/lit_operator/dense.h
2.05 kB
| /* | |
| * dense.h — the dense body simulator: symbols x symbols x time. | |
| * | |
| * Nothing is materialized. The cell count, the linear index, and the | |
| * decode are pure arithmetic; the structural mark (cut) is computed by | |
| * the mask callback on demand. The body is dense in names and sparse | |
| * in memory: a search spends only the tree it actually walks. | |
| * | |
| * A cell is (a, b, t): symbol a at time t, symbol b at time t+1. Every | |
| * cell is hard-connected to every other cell; no edge is stored, and a | |
| * DO names a cell by its linear index and jumps there in O(1). | |
| */ | |
| extern "C" { | |
| typedef struct { | |
| uint32_t symbols; /* X: the alphabet size */ | |
| uint64_t steps; /* T: the time slices */ | |
| uint64_t cells; /* X * X * T */ | |
| /* The causal/domain mask: return non-zero to cut the cell. It is | |
| evaluated on demand; no cut is ever stored. */ | |
| int (*cut)(void *ctx, uint32_t a, uint32_t b, uint64_t t); | |
| void *ctx; | |
| } dense; | |
| /* Define the body. No allocation: `cells` is computed, nothing is | |
| * stored. `cut` may be NULL (nothing is cut). Returns 0 or -1. */ | |
| int dense_init(dense *d, uint32_t symbols, uint64_t steps, | |
| int (*cut)(void *ctx, uint32_t a, uint32_t b, uint64_t t), | |
| void *ctx); | |
| void dense_free(dense *d); | |
| uint64_t dense_cells(const dense *d); | |
| /* The O(1) jump: (a, b, t) -> linear cell, or UINT64_MAX if out of | |
| * range. Any cell to any cell is one DO, so the target needs no edge. */ | |
| uint64_t dense_index(const dense *d, uint32_t a, uint32_t b, uint64_t t); | |
| /* Decode a linear cell back to (a, b, t). Any out pointer may be NULL. | |
| * Returns 0 or -1. */ | |
| int dense_cell(const dense *d, uint64_t cell, uint32_t *a, uint32_t *b, | |
| uint64_t *t); | |
| /* Evaluate the mask for a cell: 1 = cut, 0 = open. Nothing is written; | |
| * the whole body is computable at any time. */ | |
| int dense_cut(const dense *d, uint64_t cell); | |
| } | |