gbase(1)
π NAME π
gbase β the lil icon that sets the base value of a source graph β¨
Fr fr, this is the glow-up tool for your graphs' index vibes. This page is from the Scotch user's manual, bestie, and it's about to be your new fave π«Ά
π SYNOPSIS π
gbase [options] bval [igfile] [ogfile]
That's the whole vibe check: options, a base value, an input, an output. Easy π
β¨ DESCRIPTION β¨
Okay so bestie, here's the tea β β the gbase program lets you set to bval the base value of a source graph. And what even is a base value, you ask? It's the starting index used to number its vertices and edges. Like, do your vertices start at 0 or at 1? That's the whole question. That's it. That's the base value.
The base value can be set to 0 or 1 β those are the only two options, no in-between, no base value of 7, sorry babe π β so that graphs can be easily imported from and/or exported to tools written in C or Fortran. The C girlies and the Fortran girlies need different numbers and gbase is the translator at the function, keeping the peace ποΈ
Scotch can handle graphs irrespective of their base value, ngl that's the most unbothered, well-adjusted behaviour and we love that for it. π
ποΈ Compression, because of course ποΈ
When the proper libraries have been included at compile time, gbase can directly handle compressed graphs, both as input and output. Iconic. π
A stream is treated as compressed whenever its name is postfixed with a compressed file extension β as in 'brol.grf.bz2' or '-.gz' π
The compression formats which can be supported are:
- the bzip2 format (
'.bz2') - the gzip format (
'.gz') - the lzma format (
'.lzma')
So yes, it sniffs the suffix and just knows. Main character energy, honestly π
π OPTIONS π
-hβ Display some help. A lil "here's what's up" when you need it π«Ά-Vβ Display program version and copyright. The receipts, the credentials, the whole origin story π
π EXAMPLE π
Set the base of graph 'brol.grf' to 1, and write the modified graph to file 'brol_b1.grf':
$ gbase 1 brol.grf brol_b1.grf
Look at her go πβ¨ one line, zero drama, base value handled.
π¦ SEE ALSO π¦
The whole friend group, say hi π
Also: Scotch user's manual. π
π AUTHOR π
Francois Pellegrini <francois.pellegrini@labri.fr> β the legend, the blueprint, the one who wrote the manual π
π bestie reminder: the base value is only0or1. Don't come at it with a 2 and expect slay. It won't.
k bye, love u, go fix ur indices ππ¦πΈ
This has been gbase(1), Scotch user's manual, dated 16 June 2026. Periodt. π β¨
π¦ where this page comes from
- arch rolling: scotch 7.0.17-1 Β· CECILL-C
- nixpkgs unstable: scotch 7.0.12
- ubuntu stonking: scotch 7.0.15-4ubuntu1 Β· CeCILL-C
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms