Skip to content

A lightweight, optimized Odin library for dealing with n-dimensional slices

License

Notifications You must be signed in to change notification settings

MoxyFoxy/odin-sprawl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprawl

Sprawl is a lightweight, optimized Odin library for dealing with n-dimensional slices without indirection.

To read up on the base library, please read Structless. To read up on the library using Sprawl_Slice (an abstraction), please read Sprawl_Slice. Note this abstracts everything in Structless and essentially replaces it.

Collaborators

  • Tetralux (optimization)
  • sci4me (optimization)

Formulae

The variables and parameters are as follows:

| l - lengths

| i - indexes

| n - length of lengths and indexes (they are the same)

| j - iterator

| k - iterator

The formulae are 0-based. The upper values on the summation and multiplication are inclusive, hence why they are one lower than how they appear in the code. The formulae for this library are as follows.

g

formula g

LaTeX: g(l, i) = i_1 \cdot l_0 i_0

h

formula h

LaTeX: h(l, n, i, j) = i_{n - j - 1} \cdot \prod_{k = 0}^{n - j - 2} l_k

f (_index)

formula f

LaTeX: f(l, n, i) = \sum_{j = 0}^{n - 3} (h(l_j, i, j)) g(l, i)

Expanded

expanded formula

LaTeX: f(l, n, i) = \sum_{j = 0}^{n - 3} \left(i_{n - j - 1} \cdot \prod_{k = 0}^{n - j - 2} l_k\right) i_1 \cdot l_0 i_0

About

A lightweight, optimized Odin library for dealing with n-dimensional slices

Resources

License

Stars

Watchers

Forks