[concurrency-interest] jsr166y common ops
kasper at kav.dk
Wed Feb 6 06:19:13 EST 2008
I've started on a small library with different Op implementations. So
far its mostly various Predicate, Op, Comparator implementations.
I'll be moving it somewhere permanently soon, but for now you can find
the source can be build with Ant
The naming is still a bit inconsistent, for example, I haven't yet
changed the name of Mappers.java to something else after Ops.Mapper has
been renamed to Ops.Op. (Let's see what Doug comes up with next time :)
There is also the _very_ beginning of a ParallelDoubleMatrix. Internally
it is based on a single array of doubles
uses a double).
I haven't implemented matrix multiplication yet (or
anything fancy such as diagonalization, decomposition, etc.) If someone
wants to have a bit of fun the matrix multiply demo by Doug is a good
describes how it works.
Now, back to ParallelDoubleMatrix here is sample usage:
ParallelDoubleMatrix A = ParallelDoubleMatrix.create(3, 4,
ParallelDoubleMatrix B = ParallelDoubleMatrix.create(3, 4,
// fill randomly
B.fill(12); // sets all elements to 12
A.add(5); // scalar add
B.multiply(3); // scalar multiplication
ParallelDoubleMatrix C = A.copy().add(B); // copy A and add (matrix) B
| 75,275 64,167 78,069 85,196 |
| 59,765 87,388 72,701 77,251 |
| 73,585 71,770 83,098 56,890 |
Eventually, I hope to end up with a number of different standard
libraries utilizing the fork-join-framework that aren't likely JDK
components. I'm also working on a distributed ParallelMap (long way to
Contributions and comments are more then welcome.
More information about the Concurrency-interest