argmin-rs / sphrs Goto Github PK
View Code? Open in Web Editor NEWSpherical harmonics and solid harmonics in Rust
License: Apache License 2.0
Spherical harmonics and solid harmonics in Rust
License: Apache License 2.0
Due to the low computation time of a single SH they may not parallelize well when evaluated at several positions. Evaluating an HarmonicsSet
in parallel may however increase performance and should be easy to implement (using rayon). This feature should be behind a feature gate.
Loop unrolling improved performance of eval_internal
by about a factor of 2. Currently loop unrolling is done manually up to degree 20. Automatic unrolling with a macro would be more convenient and less error prone.
There are significant differences between the complex SH provided by scipy.special.sph_harm
and those provided by sphrs
for high degrees. For example, the conjugate of the computed SH at the point Coordinates::spherical(1f64, 1.7453292519943295, 1.3962634015954636)
are
degree 11 and order 11:
scipy: 0.4405634627748642+0.16035198675529674j
sphrs: 3.561861287727778+1.2964114873179975j
degree 12 and order 12:
scipy: -0.23561802283529287+0.4081023867296495j
sphrs: -56.973351046253434+98.68073868956799j
degree 13 and order 13:
scipy: -0.3622756435535203-0.3039853588902706j
sphrs: -1770.9169188717583-1485.975733470897j
The dramatic increase in the values returned by sphrs
makes me think of numerical instability, but I couldn't pinpoint the issue.
Compare to other implementations and add the results to the documentation.
Currently there are no tests for solid harmonics. A comparison to a reference solution would be useful.
Performance is substantially improved by hardcoding spherical harmonics. Currently only real spherical harmonics are implemented hardcoded (up to dregree 3 only).
The benchmarks currently involve a lot of duplicated code which could be simplified with macros.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.