Code covered by the BSD License  

Highlights from
Submodular Function Optimization

image thumbnail

Submodular Function Optimization

by

 

28 Jun 2008 (Updated )

This toolbox provides functions for maximizing and minimizing submodular set functions.

sfo_pspiel_sp(D)
% Andreas Krause (krausea@gmail.com)
% pSPIEL helper function: Computes the all-pairs shortest path solution 
% from distance matrix D, by repeatedly calling Dijkstra's algorithm n times
%
% function result = sfo_pspiel_sp(D)
% D: adjacency matrix
% result: shortest path closure matrix
%
% Example: See tutorial script.

function result = sfo_pspiel_sp(D)
n = size(D,1);
result = zeros(n,n);
for i = 1:n
    result(i,:) = sfo_pspiel_dijkstra(D,i,i);
end

Contact us