Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.24 KB

README.md

File metadata and controls

70 lines (49 loc) · 2.24 KB

Build status Build status

skalarprodukt Status Umbra

Experimental multidimensional arrays for F#

Dependencies

This project uses Paket dependency manager. Before opening the solution or building the project, you should install Paket bootstrapper into .paket directory and download the dependencies using the following commands:

$ .\.paket\paket.bootstrapper.exe
$ .\.paket\paket.exe restore

Build

To build the project, execute the following commands (assuming you have msbuild in your PATH):

$ .\.paket\paket.exe restore
$ msbuild /m /p:Platform="Any CPU" /p:Configuration=Release skalarprodukt.sln

Benchmarks

See the current benchmark results.

There's a script to run all the benchmarks and generate the reports: tools/Run-Benchmarks.ps1.

Example

// Learn more about F# at http://fsharp.org. See the 'F# Tutorial' project
// for more guidance on F# programming.

#r @"..\..\skalarprodukt\skalarprodukt\bin\Release\skalarprodukt.dll"

open skalarprodukt
open NDArray

let v1 : Vector<_> = NDArray.init 3 id
v1 |> NDArray.mapi (+)
v1 |> NDArray.iteri (fun i v -> printf "(%d) = %d\n" i v)

let m1 : Matrix<_> = NDArray.init (2, 2) (fun struct(i, j) -> if i = j then 1 else 0)
m1 |> NDArray.mapi (fun struct(i, j) v -> if i = j then -v else v)
m1 |> NDArray.iteri (fun struct(i, j) v -> printf "(%d, %d) = %d\n" i j v)

License

skalarprodukt is licensed under the terms of MIT License. See License.md file for details.