changeset 32738:35290eb7a0e0

intersect.m: Name variables "_idx" instead of "_ind". * intersect.m: Rename "c_ind", "sort_ind" to "c_idx", "sort_idx" to match Octave norms.
author Rik <rik@octave.org>
date Fri, 12 Jan 2024 13:49:09 -0800
parents d8e5e55c3cf5
children 20724f5b80ac
files scripts/set/intersect.m
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/set/intersect.m	Thu Jan 11 22:06:54 2024 -0800
+++ b/scripts/set/intersect.m	Fri Jan 12 13:49:09 2024 -0800
@@ -111,8 +111,8 @@
     else
       c = [a; b];
       ## FIXME: Is there a way to avoid a call to sort?
-      [c_ind, sort_ind] = sort (ic(match));
-      c = c(c_ind, :);
+      [c_idx, sort_idx] = sort (ic(match));
+      c = c(c_idx, :);
     endif
     len_a = rows (a);
   else
@@ -133,8 +133,8 @@
     else
       c = [a(:); b(:)];
       ## FIXME: Is there a way to avoid a call to sort?
-      [c_ind, sort_ind] = sort (ic(match));
-      c = c(c_ind);
+      [c_idx, sort_idx] = sort (ic(match));
+      c = c(c_idx);
     endif
 
     ## Adjust output orientation for Matlab compatibility
@@ -149,7 +149,7 @@
     if (! optsorted)
       ## FIXME: Is there a way to avoid a call to sort?
       ia = sort (ia);
-      ib_ind(sort_ind) = 1:numel(sort_ind);
+      ib_ind(sort_idx) = 1:numel(sort_idx);
       ## Change ordering to conform to unsorted c
       ib(ib_ind) = ib;
     endif