@@ -268,8 +268,8 @@ public static double IntegrateAdaptiveTransformedOdd(
268268 // First Level
269269 abcissasIterator . MoveNext ( ) ;
270270 weightsIterator . MoveNext ( ) ;
271- double [ ] abcissasL1 = abcissasIterator . Current ;
272- double [ ] weightsL1 = weightsIterator . Current ;
271+ double [ ] abcissasL1 = abcissasIterator . Current ?? throw new ArgumentNullException ( nameof ( levelAbscissas ) ) ;
272+ double [ ] weightsL1 = weightsIterator . Current ?? throw new ArgumentNullException ( nameof ( levelWeights ) ) ;
273273
274274 double sum = f ( linearOffset ) * weightsL1 [ 0 ] ;
275275 for ( int i = 1 ; i < abcissasL1 . Length ; i ++ )
@@ -283,8 +283,8 @@ public static double IntegrateAdaptiveTransformedOdd(
283283 double previousDelta = double . MaxValue ;
284284 for ( int level = 1 ; abcissasIterator . MoveNext ( ) && weightsIterator . MoveNext ( ) ; level ++ )
285285 {
286- double [ ] abcissas = abcissasIterator . Current ;
287- double [ ] weights = weightsIterator . Current ;
286+ double [ ] abcissas = abcissasIterator . Current ?? throw new ArgumentNullException ( nameof ( levelAbscissas ) ) ;
287+ double [ ] weights = weightsIterator . Current ?? throw new ArgumentNullException ( nameof ( levelWeights ) ) ;
288288
289289 double midpointsum = 0 ;
290290 for ( int i = 0 ; i < abcissas . Length ; i ++ )
@@ -367,8 +367,8 @@ public static Complex ContourIntegrateAdaptiveTransformedOdd(
367367 // First Level
368368 abcissasIterator . MoveNext ( ) ;
369369 weightsIterator . MoveNext ( ) ;
370- double [ ] abcissasL1 = abcissasIterator . Current ;
371- double [ ] weightsL1 = weightsIterator . Current ;
370+ double [ ] abcissasL1 = abcissasIterator . Current ?? throw new ArgumentNullException ( nameof ( levelAbscissas ) ) ;
371+ double [ ] weightsL1 = weightsIterator . Current ?? throw new ArgumentNullException ( nameof ( levelWeights ) ) ;
372372
373373 Complex sum = f ( linearOffset ) * weightsL1 [ 0 ] ;
374374 for ( int i = 1 ; i < abcissasL1 . Length ; i ++ )
@@ -382,8 +382,8 @@ public static Complex ContourIntegrateAdaptiveTransformedOdd(
382382 double previousDelta = double . MaxValue ;
383383 for ( int level = 1 ; abcissasIterator . MoveNext ( ) && weightsIterator . MoveNext ( ) ; level ++ )
384384 {
385- double [ ] abcissas = abcissasIterator . Current ;
386- double [ ] weights = weightsIterator . Current ;
385+ double [ ] abcissas = abcissasIterator . Current ?? throw new ArgumentNullException ( nameof ( levelAbscissas ) ) ;
386+ double [ ] weights = weightsIterator . Current ?? throw new ArgumentNullException ( nameof ( levelWeights ) ) ;
387387
388388 Complex midpointsum = 0 ;
389389 for ( int i = 0 ; i < abcissas . Length ; i ++ )
0 commit comments