Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Apr 23, 2016
1 parent 34b238b commit eeca8a6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 37 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@ Generic Numerical Library for Science and Machine Learning.
Contents
--------

- `mir.ndslice` [Multidimensional Random Access Ranges and Arrays](http://dlang.org/phobos-prerelease/std_experimental_ndslice.html)
- `mir.las.sum` Functions and Output Ranges for Summation Algorithms. Works with user-defined types.
- Precise algorithm: improved analog of Python's `fsum`
- Pairwise algorithm: fast version for Input Ranges
- Kahan, KBN, and KB2 algorithms
- `mir.combinatorics` Combinations, combinations with repeats, cartesian power, permutations.
- `mir.ndslice` [Multidimensional Random Access Ranges and Arrays](http://dlang.org/phobos-prerelease/std_experimental_ndslice.html)
- `mir.sparse` Sparse Tensors
- `Sparse` - DOK format
- Different ranges for COO format
- `CompressedTensor` - CSR/CSC formats
- `mir.sparse.blas` - Sparse BLAS for `CompressedTensor`
- `mir.model.lda.hoffman` - Online variational Bayes for latent Dirichlet allocation (Online VB LDA) for sparse documents. LDA is used for topic modeling.
- `mir.combinatorics` Combinations, combinations with repeats, cartesian power, permutations.
- `mir.las.sum` Functions and Output Ranges for Summation Algorithms. Works with user-defined types.
- Precise algorithm: improved analog of Python's `fsum`
- Pairwise algorithm: fast version for Input Ranges
- Kahan, KBN, and KB2 algorithms
- `mir.blas` - this is slow snail, it is for experiments with BLAS API. Don't use for now.


### In progress

- `mir.sparse` Sparse Tensors (see sparse branch and `v0.15.1-beta2`+)
- `mir.sparse.blas` Spars BLAS
- `mir.random` - non-uniform RNGs.
- `mir.blas` - BLAS in D.

Documentation
-------------
Expand Down
19 changes: 0 additions & 19 deletions index.d
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
/**
Numerical library and mirror for upcoming numeric packages for the Dlang standard library.
$(DL
$(DT $(LINK2 http://dlang.org/phobos-prerelease/std_experimental_ndslice.html, ndslice package)
$(DD Multidimensional Random Access Ranges and Arrays)
)
$(DT $(DPMODULE2 las, sum)
$(DD Functions and Output Ranges for Summation Algorithms. Works with user-defined types.)
$(DD Precise algorithm: improved analog of Python's `fsum`)
$(DD Pairwise algorithm: fast version for Input Ranges)
$(DD Kahan, KBN, and KB2 algorithms)
)
$(DT $(DPMODULE2 combinatorics, package)
$(DD $(DPREF2 combinatorics, package, permutations))
$(DD $(DPREF2 combinatorics, package, cartesianPower))
$(DD $(DPREF2 combinatorics, package, combinations))
$(DD $(DPREF2 combinatorics, package, combinationsRepeat))
)
)
*/
module mir;
1 change: 1 addition & 0 deletions modules.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ MODULES =
$(MODULE mir.sparse.blas.gemv)
$(MODULE mir.sparse.blas.gemm)
$(MODULE mir.combinatorics.package)
$(MODULE mir.model.lda.hoffman)
24 changes: 14 additions & 10 deletions source/mir/sparse/package.d
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/++
$(H2 Sparse Tensors)
This is a submodule of $(LINK2 mir_ndslice.html, mir.ndslice).
License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Ilya Yaroshenko
Expand Down Expand Up @@ -84,7 +81,7 @@ Sparse Slice in Dictionary of Keys (DOK) format.
alias Sparse(size_t N, T) = Slice!(N, SparseMap!T);

/++
SparseMap is a range, which is used internally by $(LREF Sparse).
`SparseMap` is used internally by `Slice` type to represent $(LREF Sparse).
+/
struct SparseMap(T)
{
Expand Down Expand Up @@ -197,7 +194,7 @@ private sizediff_t cmpCoo(size_t N)(const auto ref size_t[N] a, const auto ref s
}

/++
Returns unsorted range of (coordinate, values) pairs.
Returns unsorted forward range of (coordinate, value) pairs.
Params:
slice = sparse slice with pure structure. Any operations on structure of a slice are not allowed.
+/
Expand Down Expand Up @@ -256,7 +253,7 @@ pure unittest
}

/++
Returns unsorted range of coordinates.
Returns unsorted forward range of coordinates.
Params:
slice = sparse slice with pure structure. Any operations on structure of a slice are not allowed.
+/
Expand Down Expand Up @@ -312,7 +309,7 @@ pure unittest
}

/++
Returns unsorted range of values.
Returns unsorted forward range of values.
Params:
slice = sparse slice with pure structure. Any operations on structure of a slice are not allowed.
+/
Expand Down Expand Up @@ -459,7 +456,7 @@ unittest
}

/++
Returns compressed tensor with changed element type.
Returns compressed tensor with different element type.
+/
CompressedTensor!(N, V, I, J)
compressWithType
Expand Down Expand Up @@ -553,7 +550,7 @@ CompressedTensor!(N, V, I, J)


/++
Re-compress already compressed tensor. Makes it consequent in memory.
Re-compresses a compressed tensor. Makes all values, indexes and pointers consequent in memory.
+/
CompressedTensor!(N + 1, V, I, J)
recompress
Expand Down Expand Up @@ -590,7 +587,7 @@ CompressedTensor!(N + 1, V, I, J)
return m.sliced(slice.shape);
}

/// Compresstion of compressed tensor
///
unittest
{
auto slice = slice!double(5, 8);
Expand Down Expand Up @@ -618,10 +615,16 @@ unittest
}

/++
`CompressedTensor!(N, T, I, J)` is `Slice!(N - 1, CompressedMap!(T, I, J))`.
See_also: $(LREF CompressedMap)
+/
alias CompressedTensor(size_t N, T, I = uint, J = size_t) = Slice!(N - 1, CompressedMap!(T, I, J));

/++
Compressed array is just a structure of values array and indexes array.
See_also: $(LREF CompressedTensor), $(LREF CompressedMap)
+/
struct CompressedArray(T, I = uint)
if (is(I : size_t) && isUnsigned!I)
Expand All @@ -636,6 +639,7 @@ struct CompressedArray(T, I = uint)
}

/++
`CompressedMap` is used internally by `Slice` type to represent $(LREF CompressedTensor).
+/
struct CompressedMap(T, I = uint, J = size_t)
if (is(I : size_t) && isUnsigned!I && is(J : size_t) && isUnsigned!J && I.sizeof <= J.sizeof)
Expand Down

0 comments on commit eeca8a6

Please sign in to comment.