https://github.com/axect/dnumeric
D language Numerical Computation Repository
https://github.com/axect/dnumeric
Last synced: 9 months ago
JSON representation
D language Numerical Computation Repository
- Host: GitHub
- URL: https://github.com/axect/dnumeric
- Owner: Axect
- Created: 2018-07-13T05:15:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-02T17:26:47.000Z (about 7 years ago)
- Last Synced: 2025-03-19T22:17:24.962Z (9 months ago)
- Language: D
- Size: 1.42 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DNumeric
D Numeric Library with R Syntax
## Import
Add next line to your dub.json
```json
"dnumeric": "~>0.6.1"
```
or dub.sdl
```sdl
dependency "dnumeric" version="~>0.6.1"
```
* Caution : After `0.6.0`, there are lots of changes.
## Usage
### 1. Matrix Declaration
```r
# R
a = matrix(c(1,2,3,4), 2, 2, T)
```
```d
// DNumeric
import dnum.matrix;
auto a = matrix([1,2,3,4], 2, 2, true);
```
### 2. Print
```r
# R
a = matrix(1:4, 2, 2, T)
print(a)
```
```d
// DNumeric
import dnum.matrix;
import std.stdio : writeln;
auto a = matrix([1,2,3,4], 2, 2, true);
a.writeln;
```