I also get 3890 on “data6a”, as it appears listed in the message, below. Here’s a list of all 27 non-infinite areas, though in a different order, probably because I worked on the transposed example in order to reproduce the regions shown in the example.
3 by 9 to avoid line-wrapping: 1899 2320 1627 1382 2266 2293 1312 1259 1599 2207 2891 1479 2111 1667 1339 1323 3198 1600 1849 1482 1331 1507 2235 3890 2179 2125 1889 Cheers, Mike Please reply to [email protected]. Sent from my iPad > On 10 Dec 2018, at 19:42, Brian Schott <[email protected]> wrote: > > Jimmy, > > I tried to perform your steps on the day 6 part a sample data, but must be > doing something wrong because I get 23 vectors in the final step, which > means that 23 areas can be eliminated, but according to my other analysis, > that eliminates too many (infinite) areas. According to my work, the 10th > area of 3890 was largest corresponding to 149,172 . > > _50]\5!:5 <'data6a' > 50 2$81 157 209 355 111 78 179 211 224 268 93 268 > 237 120 345 203 72 189 298 265 190 67 319 233 328 > 40 323 292 125 187 343 186 46 331 106 350 247 332 > 349 145 217 329 48 177 105 170 257 166 225 113 44 > 98 358 92 251 209 206 215 115 283 206 195 144 157 > 246 302 306 157 185 353 117 344 251 155 160 48 119 > 131 343 349 223 291 256 89 133 96 240 271 322 73 > 324 56 149 272 161 107 172 171 301 291 > coordinates=. (4 $. $.)@:$&1 > notborder =. ,/(<({.each@{.}.each i.each@{:)@(<./,:>./) data6a){ > ($coordinates) 359 359 > border =. notborder -.~ coordinates 359 359 > $distance =: +/"1|data6a-"1"1 2 border > 50 29971 > $min=:(<./distance) ="1 distance > 50 29971 > $I. +./"1 (1=+/min)#"1 min > 23 > I. +./"1 (1=+/min)#"1 min > 1 2 5 7 9 10 11 12 13 15 16 17 18 19 21 25 26 34 35 37 39 41 45 > > >> On Sun, Dec 9, 2018 at 7:59 PM Jimmy Gauvin <[email protected]> wrote: >> >> Hi, >> >> The method I used to determine the infinite vertices is very close to >> David's approach. >> The main difference is to drop the border points that are equidistant to 2 >> or more input points. >> >> - calculate the coordinates of all border points (all points just >> outside the minimum and maximum of input coordinates) >> >> - calculate the distance between all border points and input coordinates >> input and border are n by 2 matrices >> distance =: +/"1|input-"1"1 2 border >> >> - tag the input points that are a minimum distance to each border >> coordinate >> min=:(<./distance) ="1 distance >> >> - keep border points that correspond to only one input point >> min=: (1=+/min)#"1 min >> >> - list infinite vertices >> I. +./"1 min >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > > -- > (B=) <-----my sig > Brian Schott > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
