From 62bdde9f57cdd98708e0fada77fe6570b86a3738 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 30 Sep 2025 16:52:01 -0600 Subject: [PATCH] Don't increment iterators beyond the end of the state vector Fixes #95 --- examples/gram_schmidt.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gram_schmidt.hpp b/examples/gram_schmidt.hpp index f5f56808b..3aa37a4c3 100644 --- a/examples/gram_schmidt.hpp +++ b/examples/gram_schmidt.hpp @@ -55,11 +55,11 @@ void gram_schmidt( StateType &x , LyapType &lyap , size_t n ) norm[0] = sqrt( std::inner_product( beg1 , end1 , beg1 , 0.0 ) ); normalize( beg1 , end1 , norm[0] ); - beg1 += n; - end1 += n; - - for( size_t j=1 ; j