haskell - An array of triplets in repa checked at compile time -


first of all, i'm total newbie in repa , still consider myself beginner in haskell in general.

i need effective array of triplets of doubles. naïve approach [(double, double, double)] that's not effective. thought use repa supposed effective. however, don't know how should define array of triplets.

i array u dim2 double , store elements of triplets in second dimension (i.e. first index index of triplet , second index element of triplet). there nothing forces second dimension of size 3.

i need array u dim1 vec3d that's not possible vec3d not instance of data.vector.unboxed.base.unbox.

i may reading documentation wrong, think array u dim1 (double,double,double) want (why don't try it?). before tell me inefficient:

  • as far can tell, there no way of introducing array u sh u without constraints shape sh and unbox u. therefore, array u sh u efficient , unboxed.

  • in unbox notice instance (unbox a, unbox b, unbox c) => unbox (a, b, c), unbox (double, double, double) derivable.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -