Mercurial > hg > octave-lyh
comparison scripts/geometry/voronoi.m @ 11191:01ddaedd6ad5
Reverse changeset b1f4bdc276b6. Use all lower case for "uniformoutput" option.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 04 Nov 2010 12:18:08 -0700 |
parents | be55736a0783 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11190:b1f4bdc276b6 | 11191:01ddaedd6ad5 |
---|---|
129 idx = find (!infi); | 129 idx = find (!infi); |
130 ll = length (idx); | 130 ll = length (idx); |
131 c = c(idx).'; | 131 c = c(idx).'; |
132 k = sum (cellfun ('length', c)); | 132 k = sum (cellfun ('length', c)); |
133 edges = cell2mat(cellfun (@(x) [x ; [x(end), x(1:end-1)]], c, | 133 edges = cell2mat(cellfun (@(x) [x ; [x(end), x(1:end-1)]], c, |
134 "UniformOutput", false)); | 134 "uniformoutput", false)); |
135 | 135 |
136 ## Identify the unique edges of the Voronoi diagram | 136 ## Identify the unique edges of the Voronoi diagram |
137 edges = sortrows (sort (edges).').'; | 137 edges = sortrows (sort (edges).').'; |
138 edges = edges (:, [(edges(1, 1: end - 1) != edges(1, 2 : end) | ... | 138 edges = edges (:, [(edges(1, 1: end - 1) != edges(1, 2 : end) | ... |
139 edges(2, 1 :end - 1) != edges(2, 2 : end)), true]); | 139 edges(2, 1 :end - 1) != edges(2, 2 : end)), true]); |