[OT] Re: Lack of `outer` keyword makes inner class dup implossible

S. Chancellor dnewsgr at mephit.kicks-ass.org
Sun Jul 16 01:03:20 PDT 2006


On 2006-07-15 02:52:42 -0700, "Regan Heath" <regan at netwin.co.nz> said:

> ------------IvETWbTDu3bk1hw3mOmW4b
> Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
> Content-Transfer-Encoding: 8bit
> 
> On Fri, 14 Jul 2006 17:47:51 -0700, S. <user at pathlink.com> wrote:
>> On 2006-07-14 13:48:14 -0700, BCS <BCS at pathlink.com> said:
>> 
>>> S. wrote:
>>>> It seems that because inner classes lack an `outer` keyword it is  
>>>> impossible for
>>>> them to create a new instance for the purpose of COW when operators  like opCom
>>>> are called...
>>>> sudoku.d(318): outer class Foobar 'this' needed to 'new' nested class  BarBar
>>>> 
>>> sudoku.d as in the game? What does the program do? Is it a generator,  
>>> a solver, or a player? I ask because I have a solver done and would be  
>>> interested in comparing them.
>> 
>> Yes, I'm fiddling around with an analytical solver.  Mine currently  
>> doesn't solve as many as I would like.  I only implemented three  
>> elimination methods so far.
> 
> I wrote a sudoku solver too. It expects the puzzle in a CSV file, 
> example  attached.
> 
> As far as I know it will solve anything which is 'logically solvable' 
> ..  in other words as long as there is always at least one definate 
> next step  with no 2+ choices and guessing involved.

I peaked at your code. From a brief look it doesn't seem that it 
handles several more advanced analytical techniques.  For example if 
all the posibilities for a number within a box reside on the same row 
or column, then it is required that the other boxes that contain that 
column not have it within the column.  Etc,  There are some really 
advanced ones like X-Wing etc.  I don't fully understand those 
techniques yet though.

I'll post my current code here monday or so.  I broke it while 
implementing constraint propagation for fun.




More information about the Digitalmars-d mailing list