This page contains software written by me or patches on others'
people software.
Any software on this page is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Rank-Maximal Matchings
Here you can find a LEDA extension package for computing a rank-maximal matching in an undirected bipartite graph.Minimum Cycle Basis
Here you can find a LEDA extension package for computing a minimum cycle basis of a directed or undirected graph.Vim's manual folding for noweb and Lweb
Using noweb may have its benefits, but in my case the mixture of documentation and code makes it difficult to focus. Especially when the documentation is latex code. LEDA uses a similar system called Lweb.
I wrote some simple vim scripts to support folding on noweb and Lweb files. This folding has two states:
The first state gives an impression of editing a C++ file and the second one of editing a latex file.syntax
A syntax file for Lweb can be found here. The file is based on noweb.vim by Christian Lindig, but uses C++ as a programming language.installation
First copy lwebfold.vim file in ~/.vim/lwebfold.vim and then create a file ~/.vim/after/filetype.vim with contents:augroup filetypedetect au BufNewFile,BufRead *.lw setf lweb au BufNewFile,BufRead *.nw setf noweb augroup ENDThen add the following lines to your ~/.vimrc
" Load lwebfold let g:noLwebAutoFolding=1 let g:noLwebManualFolding=1 au BufNewFile,BufRead *.lw source ~/.vim/lwebfold.vim au BufNewFile,BufRead *.nw source ~/.vim/lwebfold.vimComment the first let command to force automatic folding on startup. The default mode for folding is to fold documentation chunks. Comment the second let command to also fold manual entries appearing in Lweb format.
In case you also want syntax highlighting copy noweb.vim and lweb.vim to ~/.vim/after/syntax
use
F6 and Shift-F6 toggle between folding documentation and code chunks.known bugs
LEDA's Lweb supports manual entries which look like
/*{ Manual entry }*/
There is a problem with folding, when g:noLwebManualFolding is 0
and there are such manual entries which take up only one line.
To avoid this either set g:noLwebManualFolding to 1, or write
one line manual entries as
/*{ Manual entry
}*/