Skip to content

Commit

Permalink
Merge pull request #98 from fastalgorithms/dev/chunkgraph-routs
Browse files Browse the repository at this point in the history
Dev/chunkgraph routs
  • Loading branch information
askhamwhat authored Oct 17, 2024
2 parents fec212b + 7511883 commit 65ed58f
Show file tree
Hide file tree
Showing 25 changed files with 792 additions and 271 deletions.
6 changes: 3 additions & 3 deletions chunkie/@chunker/onesmat.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
%
% Output:
% mat - the matrix discretization of the operator W above. mat is
% (2*chnkr.npt) x (2*chnkr.npt)
% (chnkr.npt) x (chnkr.npt)
%
% Examples:
% mat = normonesmat(chnkr)
% mat = onesmat(chnkr)
%
% see also ONESMAT
% see also NORMONESMAT

% author: Travis Askham ([email protected])

Expand Down
30 changes: 16 additions & 14 deletions chunkie/@chunkgraph/build_v2emat.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@
for i = 1:nedges
j1 = obj.edgesendverts(1,i);
j2 = obj.edgesendverts(2,i);
if j1 == j2
nf = nf + 1;
ii(nf) = i;
jj(nf) = j1;
vv(nf) = 2;
else
nf = nf + 1;
ii(nf) = i;
jj(nf) = j1;
vv(nf) = -1;
nf = nf + 1;
ii(nf) = i;
jj(nf) = j2;
vv(nf) = 1;
if ~isnan(j1) && ~isnan(j2)
if j1 == j2
nf = nf + 1;
ii(nf) = i;
jj(nf) = j1;
vv(nf) = 2;
else
nf = nf + 1;
ii(nf) = i;
jj(nf) = j1;
vv(nf) = -1;
nf = nf + 1;
ii(nf) = i;
jj(nf) = j2;
vv(nf) = 1;
end
end
end

Expand Down
Loading

0 comments on commit 65ed58f

Please sign in to comment.