Skip to content

Commit

Permalink
moved pseudocodeClosureClass def down
Browse files Browse the repository at this point in the history
  • Loading branch information
pzinn committed Jul 17, 2024
1 parent 7d6a777 commit ead4017
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 168 deletions.
3 changes: 1 addition & 2 deletions M2/Macaulay2/d/expr.d
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ export compiledFunctionClosureClass := newtypeof(functionClass);
export symbolClass := newbasictype();
export keywordClass := newtypeof(symbolClass);
export pseudocodeClass := newbasictype();
export pseudocodeClosureClass := newtypeof(pseudocodeClass);
export mysqlConnectionClass := newbasictype();
export mysqlFieldClass := newbasictype();
export mysqlResultClass := newbasictype();
Expand Down Expand Up @@ -347,7 +346,7 @@ export RRiClass := newbignumbertype();
export pointerClass := newbasictype();
export atomicIntClass := newbasictype();
-- all new types, dictionaries, and classes go just above this line, if possible, so hash codes don't change gratuitously!

export pseudocodeClosureClass := newtypeof(pseudocodeClass);

--Error Handling
export buildErrorPacket(message:string):Expr := Expr(Error(dummyPosition,message,nullE,false,dummyFrame));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -*- M2-comint -*- {* hash: 8304827897892544867
-- -*- M2-comint -*- hash: 10702941089498353388

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
| 1/2 1 3/4 |
| 9/4 3/4 7/4 |

3 3
o1 : Matrix QQ <--- QQ
3 3
o1 : Matrix QQ <-- QQ

i2 : (perm,LR)=LRdecomposition(A,j->-j);

Expand All @@ -23,26 +23,26 @@ o4 = | 1 0 0 |
| 0 1 0 |
| 0 0 1 |

3 3
o4 : Matrix QQ <--- QQ
3 3
o4 : Matrix QQ <-- QQ

i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2 3/2 |
| 0 17/18 7/12 |
| 0 0 47/68 |

3 3
o5 : Matrix QQ <--- QQ
3 3
o5 : Matrix QQ <-- QQ

i6 : L=extractLeftLower(LR)

o6 = | 1 0 0 |
| 1/9 1 0 |
| 1/2 9/17 1 |

3 3
o6 : Matrix QQ <--- QQ
3 3
o6 : Matrix QQ <-- QQ

i7 : L*R==P*A

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -*- M2-comint -*- {* hash: 7984992172877006531
-- -*- M2-comint -*- hash: 2904647246987054764

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
| 1/2 1 3/4 |
| 9/4 3/4 7/4 |

3 3
o1 : Matrix QQ <--- QQ
3 3
o1 : Matrix QQ <-- QQ

i2 : (perm,LR)=LRdecomposition(A,j->-j);

Expand All @@ -17,62 +17,62 @@ o3 = | 9/2 1/2 3/2 |
| 1/9 17/18 7/12 |
| 1/2 9/17 47/68 |

3 3
o3 : Matrix QQ <--- QQ
3 3
o3 : Matrix QQ <-- QQ

i4 : P=transpose (id_(QQ^3))_perm

o4 = | 1 0 0 |
| 0 1 0 |
| 0 0 1 |

3 3
o4 : Matrix QQ <--- QQ
3 3
o4 : Matrix QQ <-- QQ

i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2 3/2 |
| 0 17/18 7/12 |
| 0 0 47/68 |

3 3
o5 : Matrix QQ <--- QQ
3 3
o5 : Matrix QQ <-- QQ

i6 : L=extractLeftLower(LR)

o6 = | 1 0 0 |
| 1/9 1 0 |
| 1/2 9/17 1 |

3 3
o6 : Matrix QQ <--- QQ
3 3
o6 : Matrix QQ <-- QQ

i7 : L*R==P*A

o7 = true

i8 : b=random(QQ^3,QQ^1);

3 1
o8 : Matrix QQ <--- QQ
3 1
o8 : Matrix QQ <-- QQ

i9 : y=forwardSubstitution(LR,P*b)

o9 = | 7/9 |
| 497/810 |
| -109/510 |

3 1
o9 : Matrix QQ <--- QQ
3 1
o9 : Matrix QQ <-- QQ

i10 : x=backwardSubstitution(LR,y)

o10 = | 386/2115 |
| 1778/2115 |
| -218/705 |

3 1
o10 : Matrix QQ <--- QQ
3 1
o10 : Matrix QQ <-- QQ

i11 : inverse(A)*b==x

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -*- M2-comint -*- {* hash: 7196600487489436217
-- -*- M2-comint -*- hash: 9594713679095244738

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
| 1/2 1 3/4 |
| 9/4 3/4 7/4 |

3 3
o1 : Matrix QQ <--- QQ
3 3
o1 : Matrix QQ <-- QQ

i2 : (perm,LR)=LRdecomposition(A,j->-j);

Expand All @@ -17,35 +17,35 @@ o3 = | 9/2 1/2 3/2 |
| 1/9 17/18 7/12 |
| 1/2 9/17 47/68 |

3 3
o3 : Matrix QQ <--- QQ
3 3
o3 : Matrix QQ <-- QQ

i4 : P=transpose (id_(QQ^3))_perm

o4 = | 1 0 0 |
| 0 1 0 |
| 0 0 1 |

3 3
o4 : Matrix QQ <--- QQ
3 3
o4 : Matrix QQ <-- QQ

i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2 3/2 |
| 0 17/18 7/12 |
| 0 0 47/68 |

3 3
o5 : Matrix QQ <--- QQ
3 3
o5 : Matrix QQ <-- QQ

i6 : L=extractLeftLower(LR)

o6 = | 1 0 0 |
| 1/9 1 0 |
| 1/2 9/17 1 |

3 3
o6 : Matrix QQ <--- QQ
3 3
o6 : Matrix QQ <-- QQ

i7 : L*R==P*A

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -*- M2-comint -*- {* hash: 7196600487489436217
-- -*- M2-comint -*- hash: 9594713679095244738

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
| 1/2 1 3/4 |
| 9/4 3/4 7/4 |

3 3
o1 : Matrix QQ <--- QQ
3 3
o1 : Matrix QQ <-- QQ

i2 : (perm,LR)=LRdecomposition(A,j->-j);

Expand All @@ -17,35 +17,35 @@ o3 = | 9/2 1/2 3/2 |
| 1/9 17/18 7/12 |
| 1/2 9/17 47/68 |

3 3
o3 : Matrix QQ <--- QQ
3 3
o3 : Matrix QQ <-- QQ

i4 : P=transpose (id_(QQ^3))_perm

o4 = | 1 0 0 |
| 0 1 0 |
| 0 0 1 |

3 3
o4 : Matrix QQ <--- QQ
3 3
o4 : Matrix QQ <-- QQ

i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2 3/2 |
| 0 17/18 7/12 |
| 0 0 47/68 |

3 3
o5 : Matrix QQ <--- QQ
3 3
o5 : Matrix QQ <-- QQ

i6 : L=extractLeftLower(LR)

o6 = | 1 0 0 |
| 1/9 1 0 |
| 1/2 9/17 1 |

3 3
o6 : Matrix QQ <--- QQ
3 3
o6 : Matrix QQ <-- QQ

i7 : L*R==P*A

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
-- -*- M2-comint -*- {* hash: 7984992172877006531
-- -*- M2-comint -*- hash: 2904647246987054764

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
| 1/2 1 3/4 |
| 9/4 3/4 7/4 |

3 3
o1 : Matrix QQ <--- QQ
3 3
o1 : Matrix QQ <-- QQ

i2 : (perm,LR)=LRdecomposition(A,j->-j);

Expand All @@ -17,62 +17,62 @@ o3 = | 9/2 1/2 3/2 |
| 1/9 17/18 7/12 |
| 1/2 9/17 47/68 |

3 3
o3 : Matrix QQ <--- QQ
3 3
o3 : Matrix QQ <-- QQ

i4 : P=transpose (id_(QQ^3))_perm

o4 = | 1 0 0 |
| 0 1 0 |
| 0 0 1 |

3 3
o4 : Matrix QQ <--- QQ
3 3
o4 : Matrix QQ <-- QQ

i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2 3/2 |
| 0 17/18 7/12 |
| 0 0 47/68 |

3 3
o5 : Matrix QQ <--- QQ
3 3
o5 : Matrix QQ <-- QQ

i6 : L=extractLeftLower(LR)

o6 = | 1 0 0 |
| 1/9 1 0 |
| 1/2 9/17 1 |

3 3
o6 : Matrix QQ <--- QQ
3 3
o6 : Matrix QQ <-- QQ

i7 : L*R==P*A

o7 = true

i8 : b=random(QQ^3,QQ^1);

3 1
o8 : Matrix QQ <--- QQ
3 1
o8 : Matrix QQ <-- QQ

i9 : y=forwardSubstitution(LR,P*b)

o9 = | 7/9 |
| 497/810 |
| -109/510 |

3 1
o9 : Matrix QQ <--- QQ
3 1
o9 : Matrix QQ <-- QQ

i10 : x=backwardSubstitution(LR,y)

o10 = | 386/2115 |
| 1778/2115 |
| -218/705 |

3 1
o10 : Matrix QQ <--- QQ
3 1
o10 : Matrix QQ <-- QQ

i11 : inverse(A)*b==x

Expand Down
Loading

0 comments on commit ead4017

Please sign in to comment.