Code covered by the BSD License  

Highlights from
Graph manipulation

Graph manipulation



These four files are intended for adding/deleting nodes and edges in biograph object

edge_del(bg, SourceInd, SinkInd)
function bg = edge_del(bg, SourceInd, SinkInd)
% bg = edge_del(bg, SourceInd, SinkInd)
% Delete selected edge from graph
% SourceInd, SinkInd are node IDs
if nargin < 3
    error('function requires at leat graph, source and sink');
elseif nargin > 3
    error('edge_del requires exactly 3 arguments');

to = full(;
edge_id = to(SourceInd,SinkInd);
bg.edges(edge_id) = [];
[x,y] = find(to>edge_id);
for i = 1:length(x)
    if to(x(i),y(i)) >edge_id
        to(x(i),y(i)) = to(x(i),y(i))-1;
end = sparse(to);
bg.from = to';

Contact us