Anyone come up with some cool algorithms/templates for D lately?

Bill Baxter dnewsgroup at billbaxter.com
Thu Apr 17 23:36:38 PDT 2008


Walter Bright wrote:
> Bill Baxter wrote:
>> For instance (this is all from my matrix/vector classes in OpenMesh/D 
>> which are basically a complete rewrite of the original C++ versions)
> 
> Got a link to your code?
> 
> (What you're doing looks pretty cool!)

It's on dsource.
http://www.dsource.org/projects/openmeshd

The snippet was from the Geometry dir:
http://www.dsource.org/projects/openmeshd/browser/trunk/OpenMeshD/OpenMesh/Core/Geometry

specifically, MatrixT:
http://www.dsource.org/projects/openmeshd/browser/trunk/OpenMeshD/OpenMesh/Core/Geometry/MatrixT.d


My other big dsource project is MultiArray.

http://www.dsource.org/projects/multiarray

I recently added DFLAT (D Flexible Linear Algebra Types) which is a 
port+improvements of the C++ library, FLENS.  DFLAT has templates to 
supports all the matrix storage types used by BLAS and LAPACK, and also 
the sparse matrix libraries SuperLU, TAUCS, and UMFPACK.

No CTFE there, but plenty of template logic, like here:
http://www.dsource.org/projects/multiarray/browser/trunk/multiarray/dflat/Blas.d

...which tries to take any type of matrix arguments and figure out the 
right BLAS call to make to multiply them together.

--bb



More information about the Digitalmars-d mailing list