[Kst] kdeextragear-2/kst/plugins/noise_addition

Andrew Walker arwalker at sumusltd.com
Wed Apr 14 21:21:14 CEST 2004


CVS commit by arwalker: 

Fixed build problems.


  M +8 -6      noise_addition.cpp   1.2


--- kdeextragear-2/kst/plugins/noise_addition/noise_addition.cpp  #1.1:1.2
@@ -9,6 +9,6 @@
 #include <math.h>
 #include <string.h>
-#include <gsl_rng.h>
-#include <gsl_randist.h>
+#include <gsl/gsl_rng.h>
+#include <gsl/gsl_randist.h>
 
 #define KST_UNUSED(x) if(x){};
@@ -28,4 +28,5 @@ int noise_addition( 
   KST_UNUSED( outScalars )
    
+  const gsl_rng_type* pGeneratorType;
   gsl_rng* pRandomNumberGenerator;
   double* pResult[1];
@@ -35,12 +36,13 @@ int noise_addition( 
   
   if( iLength > 0 ) {   
-    if( outArrayLens[i] != iLength ) {
-      pResult[0] = (double*)realloc( outArrays[i], iLength * sizeof( double ) );
+    if( outArrayLens[0] != iLength ) {
+      pResult[0] = (double*)realloc( outArrays[0], iLength * sizeof( double ) );
     } else {
-      pResult[0] = outArrays[i];
+      pResult[0] = outArrays[0];
     }
   }
   
-  pRandomNumberGenerator = gsl_rng_alloc( gsl_rang_taus );
+  pGeneratorType = gsl_rng_default;
+  pRandomNumberGenerator = gsl_rng_alloc( pGeneratorType );
   if( pRandomNumberGenerator != NULL ) {
     if( pResult[0] != NULL ) {  





More information about the Kst mailing list