Skip to content

thelowsunoverthemoon/daikon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimized matrix operations via generated expressions in Batch

Features

  • Easy-to-use interface
  • Supports all basic matrix operations
  • Generates expressions instead of FOR loops
  • Allows calculations in a single SET /A
  • No external exes, contained within a single batch file

Usage

daikon is a simple Batch library that allows matrix operations through generating expressions. It includes a "building block" interface that allows you to compose operations together, allowing you to run them using a single SET /A. It is ideal for simulations or programs where the operations are defined beforehand. Furthermore, through the use of line continuations, one can create extremely readable code. For example, a grayscale filter is as simple as

SET matrix=255 255 32; ^
           255 12 255; ^
           213 77 196; ^
           100 123 57; ^
           120 50 140; ^
           100 255 140; ^
           62 230 98

CALL DAIKON SET_MATRIX cols "%matrix%"
CALL DAIKON SET_CONST_MATRIX avg 3 1 1

CALL DAIKON GEN_EXPR "MULT cols avg gray" ^
                     "DIV_CONST gray 3"
                     
SET /A "%$expr%"

Documentation

Visit the documentation here!

Examples

Look at the examples here! To run them, copy daikon.bat here into the same directory.

About

Optimized matrix operations via generated expressions in Batch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published