Skip to content

Conversation

ivan-pi
Copy link
Member

@ivan-pi ivan-pi commented Feb 15, 2022

GitHub just added the capability to include graphs in Markdown: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

The decision tree can be found on page 11 of the MINPACK User Guide: http://cds.cern.ch/record/126569/files/CM-P00068642.pdf

A preview can be seen in the README of my fork: https://github.com/ivan-pi/minpack-1/tree/mermaid#decision-tree (edit: in Mozilla I have to switch tabs to make the flowchart render the boxes)

If you like the idea, I'll also prepare the tree for nonlinear least squares.

@awvwgk awvwgk added the documentation Improvements or additions to documentation label Feb 15, 2022
@ivan-pi
Copy link
Member Author

ivan-pi commented Feb 15, 2022

In the future we should add links to a website hosting the documentation.

@jacobwilliams
Copy link
Member

This is terrific!!

@jacobwilliams
Copy link
Member

Note: the ford docs (https://fortran-lang.github.io/minpack/) include the Readme as an include file. I assume these diagrams are not going to render there?

@ivan-pi
Copy link
Member Author

ivan-pi commented Feb 16, 2022

Depends whether the generated website supports integration: https://mermaid-js.github.io/mermaid/#/./integrations. I'm not too attached to FORD to be honest.

We could also just export PNG or SVG images from the https://mermaid.live editor and place them in the media folder. According to some blog posts, since 2022 GitHub supports SVG images (apparently they were disallowed previously due to some security vulnerabilities).

@jacobwilliams
Copy link
Member

jacobwilliams commented Feb 18, 2022

I'm OK with just leaving the mermaid code, since it's easy to update when we need to. What we can do is just make the FORD landing page something simpler that just doesn't have the diagrams?

But...it would be nice to have the diagrams as part of the api docs so everything is in one place...

@jacobwilliams
Copy link
Member

I tried to push this update to your branch, but I guess I don't have permission. this has the links:

Decision tree for systems of nonlinear equations

flowchart TB
	start[Is the Jacobian matrix available?]
	start--Yes-->middle1[Is flexibility required?]
	start--No-->middle2[Is flexibility required?]
	middle1--Yes-->b1[<a href='https://fortran-lang.github.io/minpack/proc/hybrj.html'>hybrj</a>]
	middle1--No-->b2[<a href='https://fortran-lang.github.io/minpack/proc/hybrj1.html'>hybrj1</a>]
	middle2--Yes-->b3[<a href='https://fortran-lang.github.io/minpack/proc/hybrd.html'>hybrd</a>]
	middle2--No-->b4[<a href='https://fortran-lang.github.io/minpack/proc/hybrd1.html'>hybrd1</a>]
Loading

Decision tree for nonlinear least squares problems

flowchart TB
	start[Is the Jacobian matrix available?]
	start--Yes-->m1[Is storage limited?]
	start--No-->m2[Is flexibility required?]
	m1--Yes-->ml1[Is flexibility required?]
	m1--No-->ml2[Is flexibility required?]
	ml1--Yes-->b1[<a href='https://fortran-lang.github.io/minpack/proc/lmstr.html'>lmstr</a/>]
	ml1--No-->b2[<a href='https://fortran-lang.github.io/minpack/proc/lmstr1.html'>lmstr1</a/>]
	ml2--Yes-->b3[<a href='https://fortran-lang.github.io/minpack/proc/lmder.html'>lmder</a/>]
	ml2--No-->b4[<a href='https://fortran-lang.github.io/minpack/proc/lmder1.html'>lmder1</a/>]
	m2--Yes-->mr1[<a href='https://fortran-lang.github.io/minpack/proc/lmdif.html'>lmdif</a/>]
	m2--No-->mr2[<a href='https://fortran-lang.github.io/minpack/proc/lmdif1.html'>lmdif1</a/>]
Loading

@awvwgk awvwgk merged commit 917c198 into fortran-lang:main Feb 23, 2022
@awvwgk awvwgk added this to the v2.0.0 milestone Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants