diff --git a/src/Matrix.cpp b/src/Matrix.cpp index aec01ea..5e9fccb 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -620,7 +620,7 @@ namespace Aurora { bool Matrix::setBlockValue(int aDim,int aBeginIndex, int aEndIndex, double value) { if(aDim>2 ){ - std::cerr<<"block only support 1D-3D data!"<=getDimSize(aDim) || aBeginIndex<0){ - std::cerr<<"block BeginIndx error!BeginIndx:"<=getDimSize(aDim) || aEndIndex<0){ - std::cerr<<"block EndIndex error!EndIndex:"<2 ){ + std::cerr<<"setBlock only support 1D-3D data!"<1){ + aDim = 1; + } + if (aBeginIndex>=getDimSize(aDim) || aBeginIndex<0){ + std::cerr<<"setBlock BeginIndx error!BeginIndx:"<=getDimSize(aDim) || aEndIndex<0){ + std::cerr<<"block EndIndex error!EndIndex:"<9?1.0:0.0); + } + } \ No newline at end of file