package spurs
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c59be7af57a6902941cfa3d446fb83e4cb58876fc7208008d1ae38a1d4e189cc
sha512=86bd6e099ac1441e4fecd2ce59fdc878d437dc0f7f4d2bd21a08fac675a99355b745a009d1040104ef106220ede8aa10f71e7ca85c982d2ddc7bc5e76aa69166
Description
README
spurs
Rust's sprs crate is a sparse linear algebra library for Rust. This is a lightweight, natively implemented port of sprs to OCaml, which will (eventually) support all the same functionality.
The documentation can be found here!
Installation
opam install spursQuickstart Guide
wip, here's a snippet:
open Spurs
open Spurs.Csmat
open Spurs.Ops
let () =
let a =
[|
[| 0.; 0.; 2.; 0.; 0. |];
[| 0.; 1.; 2.; 0.; 0. |];
[| 0.; 0.; 2.; 0.; 0. |];
[| 0.; 0.; 0.; 4.; 0. |];
|]
|> csr_from_dense
in
let b =
[|
[| 0.; 0.; 2. |];
[| 0.; 1.; 2. |];
[| 0.; 0.; 2. |];
[| 0.; 0.; 0. |];
[| 0.; 0.; 0. |];
|]
|> csc_from_dense
in
let c = a *@ b in
print_float_matrix c;
print_matrix (to_dense c)Prints:
{ Csmat.storage = Csmat.CSR; nrows = 4; ncols = 3; indptr = [0, 1, 3, 4, 4];
indices = [2, 1, 2, 2]; data = [4, 1, 6, 4] }
[
[0.00; 0.00; 4.00];
[0.00; 1.00; 6.00];
[0.00; 0.00; 4.00];
[0.00; 0.00; 0.00];
]
Dependencies (5)
- fmt
- ppx_fields_conv
- ppx_deriving
-
ocaml
>= "5.3.0" -
dune
>= "3.17"
Dev Dependencies (4)
-
odoc
with-doc -
qcheck-alcotest
with-test & < "0.26" -
qcheck
with-test & < "0.26" -
alcotest
with-test & < "0.26"
Optional Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building spurs with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.1.1 (this version) | n/a | n/a | n/a | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure