-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add examples(ZZ) to see examples for the doc nodes from "about" #3483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add examples List
so examples methods rank
and examples about rank
can work?
19b93e1
to
d5ebdea
Compare
I'd added i1 : examples about rank
-- warning: symbol "isSimple" in Graphs.Dictionary is shadowed by a symbol in LieTypes.Dictionary
-- use the synonym Graphs$isSimple
-- tons of other similar warnings we should probably deal with at some point...
o1 = -- examples for tag: rank(ChordalNetNode)
-- M2/Macaulay2/packages/Chordal/ChordalDoc.m2:343:0
-- no examples
---------------------------------------------------------------------------------
-- examples for tag: rank(DiffAlgDistribution)
-- M2/Macaulay2/packages/DiffAlg.m2:833:0
X = random newField(2,2,"a")
Y = random newField(2,2,"a")
rank dist {X,Y}
rank dist {X,Y,X+Y,X-Y}
rank dist {X,Y,X|Y}
---------------------------------------------------------------------------------
-- examples for tag: rank(CentralArrangement)
-- M2/Macaulay2/packages/HyperplaneArrangements.m2:1571:0
R = QQ[x,y,z];
B = arrangement("braid", R)
rank B
assert(rank B === rank matroid B)
rank typeA 4
M = arrangement("MacLane")
rank M
trivial = arrangement(map(R^(numgens R),R^0,0),R)
rank trivial
assert(rank trivial === 0)
---------------------------------------------------------------------------------
-- examples for tag: rank(Flat)
-- M2/Macaulay2/packages/HyperplaneArrangements.m2:1595:0
A3 = typeA 3
F = flat(A3, {3,4,5})
assert(rank F == 2)
---------------------------------------------------------------------------------
-- examples for tag: rank(DiagonalAction)
-- M2/Macaulay2/packages/InvariantRing/AbelianGroupsDoc.m2:352:0
R = QQ[x_1..x_4]
W = matrix{{0,1,-1,1},{1,0,-1,-1}}
T = diagonalAction(W, R)
rank T
---------------------------------------------------------------------------------
-- examples for tag: rank
-- examples for tag: rank(MutableMatrix)
-- examples for tag: rank(Module)
-- examples for tag: rank(Matrix)
-- examples for tag: rank(GradedModule)
-- M2/Macaulay2/packages/Macaulay2Doc/functions/rank-doc.m2:32:0
R = ZZ/101[x,y,z]
p = vars R;
rank kernel p
rank cokernel p
C = res cokernel p
rank C
---------------------------------------------------------------------------------
-- examples for tag: rank of a matrix
-- M2/Macaulay2/packages/Macaulay2Doc/ov_matrices.m2:428:0
-- no examples
---------------------------------------------------------------------------------
-- examples for tag: rank(Matroid)
-- M2/Macaulay2/packages/Matroids/doc-Matroids.m2:989:0
M = matroid({a,b,c,d},{{a,b},{a,c}})
rank M
---------------------------------------------------------------------------------
-- examples for tag: rank(Matroid,Set)
-- examples for tag: rank(Matroid,List)
-- M2/Macaulay2/packages/Matroids/doc-Matroids.m2:1028:0
M = matroid({a,b,c,d},{{a,b},{a,c}})
for s in subsets M_* do print(toString s | " has rank " | rank_M s)
---------------------------------------------------------------------------------
-- examples for tag: rank(ToricVectorBundle)
-- M2/Macaulay2/packages/OldToricVectorBundles.m2:3397:0
E = tangentBundle projectiveSpaceFan 3
rank E
---------------------------------------------------------------------------------
-- examples for tag: rank(Poset)
-- M2/Macaulay2/packages/Posets.m2:4613:0
rankPoset chain 5
rankPoset booleanLattice 3
---------------------------------------------------------------------------------
-- examples for tag: rank(AbstractSheaf)
-- M2/Macaulay2/packages/Schubert2.m2:1855:0
rank tangentBundle abstractProjectiveSpace 4
---------------------------------------------------------------------------------
-- examples for tag: rank(MultidimensionalMatrix)
-- M2/Macaulay2/packages/SparseResultants.m2:1658:0
M = randomMultidimensionalMatrix(2,4,3,2,MaximalRank=>2)
rank M
M' = randomMultidimensionalMatrix(2,4,2,1,3,CoefficientRing=>ZZ/65521,MaximalRank=>4)
rank M'
---------------------------------------------------------------------------------
-- examples for tag: rank(ToricVectorBundle)
-- M2/Macaulay2/packages/ToricVectorBundles.m2:3464:0
E = tangentBundle projectiveSpaceFan 3
rank E
---------------------------------------------------------------------------------
-- examples for tag: rank(RootSystem)
-- M2/Macaulay2/packages/WeylGroups.m2:1626:0
R = rootSystemA(5)
rank R
---------------------------------------------------------------------------------
-- examples for tag: rank(DynkinDiagram)
-- M2/Macaulay2/packages/WeylGroups.m2:4212:0
R=rootSystemE(6)
D=dynkinDiagram(R);
rank(D) I'm getting a weird "example results terminate prematurely" error for |
i1 : examples about rank
-- warning: symbol "isSimple" in Graphs.Dictionary is shadowed by a symbol in LieTypes.Dictionary
-- use the synonym Graphs$isSimple
-- tons of other similar warnings we should probably deal with at some point... I agree ... Maybe during o1 = -- examples for tag: rank(ChordalNetNode)
-- M2/Macaulay2/packages/Chordal/ChordalDoc.m2:343:0
-- no examples Not a fan of this. Can we just say this? -- no examples for tag: rank(ChordalNetNode) |
d5ebdea
to
6a769fa
Compare
Done! |
0caed42
to
ed37308
Compare
@mahrud -- You've approved this, but I think there was some discussion and further changes afterwards. Is this good to merge? |
cfef3d1
to
a1ca854
Compare
So this doesn't mess up the internal use of "examples" by getExampleOutput for generating examples for documentation on the fly, we rename the original lower-level method as examples'.
Similar to code(List), we deduplicate nodes with the same location
Method no longer exists; replaced w/ unexported examples'(Hypertext)
Can I push a commit? |
This fixes locate(DocumentTag) for documentation created on the standard input. Previously, it would give something like /usr/share/Macaulay2/Core/stdio:2:0
a1ca854
to
500e362
Compare
Sure. I just force-pushed a couple changes addressing your comments, so you may need to rebase first. |
Feel free to merge once the tests pass. |
We also add some informative comments to the output. For example: