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_opt_get(opt,name,default)
% Andreas Krause (krausea@cs.cmu.edu)
% Get a value from an option struct
%
% function val = sfo_opt_get(opt,name,default)
% opt: option struct (created using sfo_opt)
% name: field name
% default (optional): default value
%
% Example: TOL = sfo_opt_get(opt,'tolerance',1e-10)

function val = sfo_opt_get(opt,name,default)
if isfield(opt,name)
    val = getfield(opt,name);
else
    val = default;
end

Contact us