- Timestamp:
- Mar 10, 2020, 3:15:39 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- ed7384a7d318d0c134a4985e814a9a2ca3eeb1fa
- Parents:
- 0b3c231859f88bf091386e066109a0766f11896d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/algebra.lib
r0b3c23 r31c836 390 390 int m = ncols(A); 391 391 int s = size(B); 392 int i ;392 int i,@xx,@yy; 393 393 string mp = string(minpoly); 394 394 // --------------------- 1st variant of algorithm ---------------------- … … 397 397 { 398 398 list l6; 399 for ( int xx = 1; xx <= m;xx++)399 for (@xx = 1; @xx <= m; @xx++) 400 400 { 401 l6[size(l6)+1] = "y("+string( xx)+")";401 l6[size(l6)+1] = "y("+string(@xx)+")"; 402 402 } 403 403 ring R1 = create_ring(ringlist(br)[1], l6, "dp", "no_minpoly"); … … 411 411 // ---------- create new ring with extra variables -------------------- 412 412 list l7; 413 for ( int xx = 1; xx <= n; xx++)414 { 415 l7[ size(l7)+1] = "x("+string(xx)+")";416 } 417 for ( int yy = 1; yy <= m; yy++)418 { 419 l7[ size(l7)+1] = "y("+string(yy)+")";413 for (@xx = n; @xx >= 1; @xx--) 414 { 415 l7[@xx] = "x("+string(@xx)+")"; 416 } 417 for (@yy = m; @yy >= 1; @yy--) 418 { 419 l7[n+@yy] = "y("+string(@yy)+")"; 420 420 } 421 421 ring R2 = create_ring(ringlist(br)[1], l7, "dp", "no_minpoly"); … … 447 447 { 448 448 list l8; 449 for ( int xx = 1; xx <= n; xx++)449 for (@xx = n; @xx >=1; @xx--) 450 450 { 451 l8[ size(l8)+1] = "x("+string(xx)+")";451 l8[@xx] = "x("+string(@xx)+")"; 452 452 } 453 for ( int yy = 1; yy <= m; yy++)453 for (@yy = m; @yy >= 1; @yy--) 454 454 { 455 l8[ size(l8)+1] = "y("+string(yy)+")";455 l8[n+@yy] = "y("+string(@yy)+")"; 456 456 } 457 457 setring(br);
Note: See TracChangeset
for help on using the changeset viewer.