From 49b71b2d35303439ad25217bf773655de75be9d5 Mon Sep 17 00:00:00 2001 From: Travis Askham Date: Thu, 28 Mar 2024 23:05:21 -0400 Subject: [PATCH] slight efficiency in vertextract --- chunkie/@chunkgraph/vertextract.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chunkie/@chunkgraph/vertextract.m b/chunkie/@chunkgraph/vertextract.m index 9a3a240..691ec88 100644 --- a/chunkie/@chunkgraph/vertextract.m +++ b/chunkie/@chunkgraph/vertextract.m @@ -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)