Changeset 7f11e05 in tol
- Timestamp:
- Jan 9, 2012, 10:12:53 AM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- acc9f1a
- Parents:
- 612d116
- File:
-
- 1 edited
-
tol/btol/matrix_type/matgra.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/matrix_type/matgra.cpp
r612d116 r7f11e05 3193 3193 BInt i, j, k=0, l; 3194 3194 BInt numCol = 0; 3195 BInt numRow = Mat(Arg(1)).Rows();3195 BInt numRow = 0; 3196 3196 BInt numMat = NumArgs(); 3197 3197 for(i=1; i<=numMat; i++) … … 3199 3199 BMat& Mi = Mat(Arg(i)); 3200 3200 numCol+=Mi.Columns(); 3201 if(!numRow) { numRow=Mi.Rows(); } 3201 if(numRow<Mi.Rows()) { numRow = Mi.Rows(); } 3202 } 3203 for(i=1; i<=numMat; i++) 3204 { 3205 BMat& Mi = Mat(Arg(i)); 3202 3206 if(Mi.Columns() && (Mi.Rows()!=numRow)) 3203 3207 { … … 3216 3220 { 3217 3221 DMat& Mi = dMat(Arg(i)); 3218 for(j=0; j < Mi.Columns(); j++, k++)3219 { 3220 for( l=0; l < numRow; l++)3222 if(Mi.Columns() && (Mi.Rows()==numRow)) 3223 { 3224 for(j=0; j < Mi.Columns(); j++, k++) 3221 3225 { 3222 b2dMat(contens_)(l,k)=Mi(l,j); 3226 for(l=0; l < numRow; l++) 3227 { 3228 b2dMat(contens_)(l,k)=Mi(l,j); 3229 } 3223 3230 } 3224 3231 } … … 3249 3256 { 3250 3257 BInt i, j, k=0, l; 3251 BInt numCol = Mat(Arg(1)).Columns();3258 BInt numCol = 0; 3252 3259 BInt numRow = 0; 3253 3260 BInt numMat = NumArgs(); … … 3256 3263 BMat& Mi = Mat(Arg(i)); 3257 3264 numRow+=Mi.Rows(); 3258 if(!numCol) { numRow=Mi.Columns(); } 3265 if(numCol<Mi.Columns()) { numCol = Mi.Columns(); } 3266 } 3267 for(i=1; i<=numMat; i++) 3268 { 3269 BMat& Mi = Mat(Arg(i)); 3259 3270 if(Mi.Rows() && (Mi.Columns()!=numCol)) 3260 3271 { … … 3273 3284 { 3274 3285 DMat& Mi = dMat(Arg(i)); 3275 for(j=0; j < Mi.Rows(); j++, k++)3276 { 3277 for( l=0; l < numCol; l++)3286 if(Mi.Rows() && (Mi.Columns()==numCol)) 3287 { 3288 for(j=0; j < Mi.Rows(); j++, k++) 3278 3289 { 3279 b2dMat(contens_)(k,l)=Mi(j,l); 3280 } 3290 for(l=0; l < numCol; l++) 3291 { 3292 b2dMat(contens_)(k,l)=Mi(j,l); 3293 } 3294 } 3281 3295 } 3282 3296 }
Note: See TracChangeset
for help on using the changeset viewer.
