prompts
Grammar actions
Examine "./lib/Math/NIntegrate/Processing/Grammar.rakumod" and fill-in the corresponding actions in
"./lib/Math/NIntegrate/Processing/Actions/MethodSpec.rakumod".
I want those actions to produce a Raku nested hashmap. The integration rules should produce a hashmap like:
`{name => 'GaussKronrodRule', type => 'rule', points => 4}`.
Integration strategies like:
`{name => 'GlobalAdaptive', type => 'strategy', method => <integration-rule>, max-recursion => 12}`.Several changes and completions had to be done.
Newton-Cotes rule
Implement the method `make-weights` for the class `Math::NIntegrate::Rule::NewtonCotes` in the file "./lib/Math/NIntegrate/Rule/NewtonCotes.rakumod";
Make sure:
- If the flag `is-open` is true then open Newton-Cotes rule is computed
- The `points` is for the seed points -- the total number of points is `2 * points - 1` (because we want both rule weights and error-weights)(As expected) the code generated by "GPT-5.6-Terra" worked right away. I refactored it a little to reflect my tastes.
Gauss-Kronrod rule
Implement the method `make-weights` for the class `Math::NIntegrate::Rule::GaussKronrod` in the file "./lib/Math/NIntegrate/Rule/GaussKronrod.rakumod";
- The argument `points` is for the "seed" Gauss points, the total number of points is `2 * points + 1`
- I.e. there are `points + 1` Kronrod extension pointsFully symmetric multidimensional rules
Preliminary
I want to implement fully symmetric integration rules in the class file
"lib/Math/NIntegrate/Rule/MultiDimensional.rakumod". Before starting doing anything please answer these questions:
- Are you familiar with multidimensional fully symmetric rules?
- Based on orbits, null rules, etc.
- Do you know which rules I refer to if I say "DCUHRE rules with generators 7 and 9"?Ok, reprogram to Raku the FORTRAN code in the file "./resources/D07HRE.f". Make a separate method for it named "d07hre".Ok, reprogram to Raku the FORTRAN code in the file "./resources/D09HRE.f". Make a separate method for it named "d09hre".