Revision 2ce396a76821d352b608cbcadbb6c57de59620c3 authored by Alec Jacobson on 08 January 2020, 05:26:22 UTC, committed by Alec Jacobson on 08 January 2020, 05:26:22 UTC
1 parent 9d0a7c0
Raw File
remove_duplicate_simplices.m
function [SF,SFI,SFJ] = remove_duplicate_simplices(F)
  % REMOVE_DUPLICATE_SIMPLICES Remove duplicate simplices (regardless of order)
  %
  % Inputs:
  %   F  #F by ss list of simplex indices
  % Outputs:
  %   SF  #SF by ss list of unique simplices (maintaining original order of
  %     first simplex found)
  %   SFI  #SF list so that SF = F(SFI,:)
  %   SFJ  #SFI list so that F = SF(SFJ,:)
  [~,SFI,SFJ] = unique(sort(F,2),'rows','stable');
  SF = F(SFI,:);
end
back to top