I think there's an issue with this line:

   d6ni =: I. -. +./"1 (1=+/d6dm)#"1 d6dm

Looking at it, I suspect this could an early draft of the code, rather
than a working version. Either that or it's part of a heuristic which
only works some of the time

What's happening here is that we're selecting columns with exactly one
1 (most of them), then we look for rows with no 1s, and there aren't any.

--
Raul

On Mon, Dec 10, 2018 at 11:20 PM Brian Schott <[email protected]> wrote:
>
> Jimmy,
>
> I copied and pasted your solution into my jcon and get an empty value of
> d6ni for some reason. My version of d6a looks very promising, and I can't
> see how d6ni could be empty. Otoh, the expression for d6ni now looks
> slightly different from the expression in your earlier email; it includes
> an extra -. now. But leaving out the -. does not seem to work any better.
>
> I posted my data6a earlier in this thread and from you code it looks like
> you used my data6a in your calculations, also.
>
> Can you or anyone see why my answer is empty?
>
> Thanks,
>
>    NB. d6c : input coordinates
>    d6c =: data6a
>    NB. d6t : transpose coordinates to start at 1,1
>    d6t =: d6c-"1 (<./d6c)-1
>    NB. region size
>    (<./,>./)d6t
> 1 1 315 316
>    NB. coordinates of all points in region
>    coor =: 1+(315 316)#:i.315*316
>    NB. d6d : Distances between input points and all points in region
>    d6d =: +/"1|d6t-"1"1 2 coor
>    NB. d6dm : points equal to minimum distance
>    d6dm =: (<./d6d) =("1) d6d
>    NB. non-infinite points
>    d6ni =: I. -. +./"1 (1=+/d6dm)#"1 d6dm
>    NB. d6a : size of areas for each input coordinate excluding equidistant
>    points
> |value error: points
>    d6a =: +/"1 (1=+/d6dm)#"1 d6dm
>    NB. size of bounded areas
>    d6ni { d6a
>
>    d6ni
>
>    $coor
> 99540 2
>    $d6dm
> 50 99540
>    $d6a
> 50
>    _10]\d6a
> 1899  452 3414 2320 1627 4146 1382 1234 2266 2004
> 2892 2794  661 2418 2293 1204 2253 1295 2192 1632
> 1312 1338 1259 1599 2207 2724 1102 2891 1479 2111
> 1667 1339 1323 3198 1758 1742 1600 1574 1849 2062
> 1482 3646 1331 1507 2235 1313 3890 2179 2125 1889
>    JVERSION
> Engine: j807/j64/darwin
> Beta-f: commercial/2018-06-28T12:14:57
> Library: 8.07.16
> Platform: Darwin 64
> Installer: J807 install
> InstallPath: /users/brian/j64-807
> Contact: www.jsoftware.com
>
>
> On Mon, Dec 10, 2018 at 9:19 PM Jimmy Gauvin <[email protected]> wrote:
>
> > Hi,
> >
> > I get the following result for the size of bounded areas with point 46
> > attaining 3980 :
> >
> >    0    3    4    6    8   14   20   22   23
> > 1899 2320 1627 1382 2266 2293 1312 1259 1599
> >
> >   24   27   28   29   30   31   32   33   36
> > 2207 2891 1479 2111 1667 1339 1323 3198 1600
> >
> >   38   40   42   43   44   46   47   48   49
> > 1849 1482 1331 1507 2235 3890 2179 2125 1889
> >
> > NB. d6c : input coordinates
> > d6c =: data6a
> > NB. d6t : transpose coordinates to start at 1,1
> > d6t =: d6c-"1 (<./d6c)-1
> > NB. region size
> > (<./,>./)d6t
> > NB. coordinates of all points in region
> > coor =: 1+(315 316)#:i.315*316
> > NB. d6d : Distances between input points and all points in region
> > d6d =: +/"1|d6t-"1"1 2 coor
> > NB. d6dm : points equal to minimum distance
> > d6dm =: (<./d6d) =("1) d6d
> > NB. non-infinite points
> > d6ni =: I. -. +./"1 (1=+/d6dm)#"1 d6dm
> > NB. d6a : size of areas for each input coordinate excluding equidistant
> > points
> > d6a =: +/"1 (1=+/d6dm)#"1 d6dm
> > NB. size of bounded areas
> > d6ni { d6a
> >
> >
> > On Mon, Dec 10, 2018 at 6:33 PM 'Mike Day' via Programming <
> > [email protected]> wrote:
> > >
> > > 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:
> > > >
> > >
> > ----------------------------------------------------------------------
> > 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

Reply via email to