Skip to content

Commit

Permalink
slight efficiency in vertextract
Browse files Browse the repository at this point in the history
  • Loading branch information
askhamwhat committed Mar 29, 2024
1 parent 346d9d0 commit 49b71b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chunkie/@chunkgraph/vertextract.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@

% author: Jeremy Hoskins

irel = find(cgrph.v2emat(:,ivert) ~= 0);
% extract the indices of the edges which terminate at ivert.
ieplus = find(cgrph.edgesendverts(2,:) == ivert);
ieplus = find(cgrph.edgesendverts(2,irel) == ivert);
ieplus = irel(ieplus);
% extract the indices of the edges which begin at ivert.
ieminus = find(cgrph.edgesendverts(1,:) == ivert);
ieminus = find(cgrph.edgesendverts(1,irel) == ivert);
ieminus = irel(ieminus);

% for each incoming edge, get the tangent vector near the end (at the
% last discretization node)
Expand Down

0 comments on commit 49b71b2

Please sign in to comment.