aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scm/extent-sampling/wrap.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/scm/extent-sampling/wrap.scm b/scm/extent-sampling/wrap.scm
index e22e299..25b9970 100644
--- a/scm/extent-sampling/wrap.scm
+++ b/scm/extent-sampling/wrap.scm
@@ -290,3 +290,24 @@
((true-volume-procedure "spheroid_true_volume")
dimension (make-spheroid-params eccentricity)))
+;; integrands
+
+(define (make-integrand integrand params)
+ (make-c-struct (list '* '*)
+ (list integrand params)))
+
+(define-public (make-polynomial-integrand polynomial)
+ (make-integrand (dynamic-func "polynomial_integrand" lib-extentsampling)
+ (make-c-struct (list '* int)
+ (list (bytevector->pointer
+ (list->typed-array 'f64 1 polynomial))
+ (1- (length polynomial))))))
+
+(define-public gaussian-integrand
+ (make-integrand (dynamic-func "gaussian_integrand" lib-extentsampling)
+ %null-pointer))
+
+(define-public x-coordinate-integrand
+ (make-integrand (dynamic-func "x_coordinate_integrand" lib-extentsampling)
+ %null-pointer))
+