MCXDIAMETER(1)
๐ mcx diameter(1) ๐
okay so bestie, welcome to the mcx diameter manual page, USER COMMANDS edition โจ this is the one that measures how stretched out your graph is, and honestly? it's giving main character energy.
๐ธ NAME ๐ธ
mcx_diameter โ compute the diameter of a graph ๐ฆ
โจ SYNOPSIS โจ
mcx diameter [options]
okay so real talk, mcxdiameter is not actually a program, no cap. this page is just documenting what the mcx program does when you invoke it in diameter mode. ๐
and btw, these options are accessible in all mcx modes: -h, --apropos, --version, -set, --nop, -progress <num>. they get described over in the mcx manual page, iykyk.
mcx diameter [-abc <fname> (specify label input)] [-imx <fname> (specify
matrix input)] [-o <fname> (output file name)] [-tab <fname> (use tab
file)] [-t <int> (use <int> threads)] [-J <intJ> (a total of <intJ> jobs
are used)] [-j <intj> (this job has index <intj>)] [--summary (output
diameter and average shortest path length)] [--list (list eccentricity
for all nodes)] [-h (print synopsis, exit)] [--apropos (print synopsis,
exit)] [--version (print version, exit)]
๐ DESCRIPTION ๐
mcx diameter computes the diameter of a graph. periodt. ๐
okay so here's the tea: your input graph should be symmetric. if it's a directed graph, the results will be unpredictable ๐ญ โ like, genuinely, we do not know what you'll get. but for label input this is literally irrelevant, because mcx diameter will just build a symmetric graph out of your input anyway. iconic behaviour fr fr. ๐ฆ
if you specify your input graph/matrix with the -imx option, it has to be in mcl matrix/graph format. you can also use label input instead with the -abc option. for a description of these two input formats, go peek at mcxio(5) ๐
by default, mcx diameter reads from STDIN and expects matrix format. and if you wanna specify label input from STDIN, use -abc - โจ
๐ OPTIONS ๐
-abc <fname>โ (label input) the file name for input that's in label format. ๐-imx <fname>โ (input matrix) the file name for input that's in mcl native matrix format. ๐ฆ-o <fname>โ (output file name) the name of the file to write output to. ๐-tab <fname>โ (use tab file) this one makes the output print with the labels found in the tab file. and with-abc, it'll additionally construct a graph only on the labels found in the tab file. if you use this option together with-imx, the tab domain and the matrix domain are required to be identical. no wiggle room, bestie. ๐-t <int>โ (use<int>threads)-J <intJ>โ (a total of<intJ>jobs are used)-j <intj>โ (this job has index<intj>)
so, computing the diameter of a graph is time-intensive for large graphs ๐ฎโ๐จ if you've got multiple CPUs available, consider using as many threads as you can. and on top of that, you can spread the computation over multiple jobs/machines. these three options are described in the clmprotocols manual page. ๐
the following set of options, if given to as many commands, defines three jobs, each running four threads:
-t 4 -J 3 -j 0 -o out.0
-t 4 -J 3 -j 1 -o out.1
-t 4 -J 3 -j 2 -o out.2
and then you can collect that output with:
mcx collect --add-column -o out.all out.[0-2]
--listโ (list eccentricity for all nodes)--summaryโ (output diameter and average eccentricity)
the default mode is --list, which results in output of the eccentricity of all nodes. so like, the eccentricity of a node is the distance to any node that is the furthest away from it. and the diameter of a graph is the maximum of the eccentricity taken over all nodes in a graph. ๐
heads up bestie: in this mode,mcx diameterwill not output the diameter itself. if you want just the diameter and the average eccentricity, use--summary. ๐
๐ SEE ALSO ๐
mcxio(5), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family. ๐ซถ
and that's the whole vibe, bestie!! ๐ this page is from mcx diameter 22-282, dated 9 Oct 2022. go forth and measure some diameters, you've absolutely got this. periodt. โจ๐๐ฆ๐
๐ฆ where this page comes from
- debian bookworm: mcl 1:22-282+ds-2 ยท GPL-3.0-or-later
- debian trixie: mcl 1:22-282+ds-4 ยท GPL-3.0-or-later
- ubuntu noble: mcl 1:22-282+ds-2 ยท GPL-3.0-or-later
- ubuntu questing: mcl 1:22-282+ds-4
- ubuntu resolute: mcl 1:22-282+ds-4build1 ยท GPL-3.0-or-later
- ubuntu stonking: mcl 1:22-282+ds-4build1 ยท GPL-3.0-or-later
- Copyright (c) 2022 Stijn van Dongen
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms